am e35c7d65: Add body sensors app op for custom sensors

* commit 'e35c7d65bb3c226fe3c5fc5e3933f64f0963eaeb':
  Add body sensors app op for custom sensors
This commit is contained in:
Prashant Malani 2015-09-03 17:26:13 +00:00 committed by Android Git Automerger
commit 13c638255f
1 changed files with 4 additions and 0 deletions

View File

@ -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) {