diff options
author | Prashant Malani <pmalani@google.com> | 2015-09-03 18:14:43 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-03 18:14:43 +0000 |
commit | 2f7531fb7a5d0c764c222f5acae0b487578629ab (patch) | |
tree | cd415e7a472f601cd1ad4c65fec64c90b20be5b0 | |
parent | dcdc161063640cf8666a45b8dfd6acf063476acb (diff) | |
parent | 13c638255f2223cb9c455d519ff1003fc0221537 (diff) | |
download | frameworks_native-2f7531fb7a5d0c764c222f5acae0b487578629ab.zip frameworks_native-2f7531fb7a5d0c764c222f5acae0b487578629ab.tar.gz frameworks_native-2f7531fb7a5d0c764c222f5acae0b487578629ab.tar.bz2 |
am 13c63825: am e35c7d65: Add body sensors app op for custom sensors
* commit '13c638255f2223cb9c455d519ff1003fc0221537':
Add body sensors app op for custom sensors
-rw-r--r-- | libs/gui/Sensor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp index 2545eec..4b3603e 100644 --- a/libs/gui/Sensor.cpp +++ b/libs/gui/Sensor.cpp @@ -223,6 +223,10 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) } if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->requiredPermission) { mRequiredPermission = hwSensor->requiredPermission; + if (!strcmp(mRequiredPermission, SENSOR_PERMISSION_BODY_SENSORS)) { + AppOpsManager appOps; + mRequiredAppOp = appOps.permissionToOpCode(String16(SENSOR_PERMISSION_BODY_SENSORS)); + } } if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) { |