diff options
author | Prashant Malani <pmalani@google.com> | 2015-09-03 17:26:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-03 17:26:13 +0000 |
commit | 13c638255f2223cb9c455d519ff1003fc0221537 (patch) | |
tree | 28b40b23d3dfcedc44711808a5c8d523950eb4f8 /libs/gui | |
parent | fb1c507b5e442fc8bac059816a3a1534152cd7c4 (diff) | |
parent | e35c7d65bb3c226fe3c5fc5e3933f64f0963eaeb (diff) | |
download | frameworks_native-13c638255f2223cb9c455d519ff1003fc0221537.zip frameworks_native-13c638255f2223cb9c455d519ff1003fc0221537.tar.gz frameworks_native-13c638255f2223cb9c455d519ff1003fc0221537.tar.bz2 |
am e35c7d65: Add body sensors app op for custom sensors
* commit 'e35c7d65bb3c226fe3c5fc5e3933f64f0963eaeb':
Add body sensors app op for custom sensors
Diffstat (limited to 'libs/gui')
-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) { |