diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-12-26 23:21:15 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-12-26 23:21:15 +0100 |
commit | be13fc257596527d37e1f8b0c47a442cbbc8f551 (patch) | |
tree | e11ed1e6acf6e38a37dec0ad8073436041968929 | |
parent | 2a9abccdfb8a52b0ff684a5cf04d200cdeda9982 (diff) | |
parent | b17c928090764a0bdefefa17ae31326e02b55d62 (diff) | |
download | frameworks_native-be13fc257596527d37e1f8b0c47a442cbbc8f551.zip frameworks_native-be13fc257596527d37e1f8b0c47a442cbbc8f551.tar.gz frameworks_native-be13fc257596527d37e1f8b0c47a442cbbc8f551.tar.bz2 |
Merge remote-tracking branch 'cyanogenmod/cm-13.0' into replicant-6.0
-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 e62c585..e423a8e 100644 --- a/libs/gui/Sensor.cpp +++ b/libs/gui/Sensor.cpp @@ -118,9 +118,11 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) break; case SENSOR_TYPE_HEART_RATE: { mStringType = SENSOR_STRING_TYPE_HEART_RATE; +#ifndef NO_SENSOR_PERMISSION_CHECK mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS; AppOpsManager appOps; mRequiredAppOp = appOps.permissionToOpCode(String16(SENSOR_PERMISSION_BODY_SENSORS)); +#endif mFlags |= SENSOR_FLAG_ON_CHANGE_MODE; } break; case SENSOR_TYPE_LIGHT: @@ -221,6 +223,7 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->stringType) { mStringType = hwSensor->stringType; } +#ifndef NO_SENSOR_PERMISSION_CHECK if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->requiredPermission) { mRequiredPermission = hwSensor->requiredPermission; if (!strcmp(mRequiredPermission, SENSOR_PERMISSION_BODY_SENSORS)) { @@ -228,6 +231,7 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) mRequiredAppOp = appOps.permissionToOpCode(String16(SENSOR_PERMISSION_BODY_SENSORS)); } } +#endif if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) { mFlags = static_cast<uint32_t>(hwSensor->flags); |