If the custom sensor requires the BODY SENSOR permission, we should add
the body sensors app op for the custom sensor
Bug:
23396558
Change-Id: I132917d1bca12c76c8a9fb146e00951cba3e6d7a
}
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) {