summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Kaye <jameskaye@google.com>2017-04-14 15:20:07 -0700
committerJim Kaye <jameskaye@google.com>2017-04-14 22:59:12 +0000
commit2c5c16504da917ece2e7d5d004b4c5a383c62bd5 (patch)
treecd88a7f8e6fc4c54d80bfe8b0c3d7c5892672314
parent06e141a637136930282d31c2d59a871bb4f11846 (diff)
downloaddevice_generic_goldfish-2c5c16504da917ece2e7d5d004b4c5a383c62bd5.tar.gz
device_generic_goldfish-2c5c16504da917ece2e7d5d004b4c5a383c62bd5.tar.bz2
device_generic_goldfish-2c5c16504da917ece2e7d5d004b4c5a383c62bd5.zip
Make Emulator's Light sensor recognized
The framework didn't like the Light Sensor to include SENSOR_FLAG_WAKE_UP as one of its flags. With this flag, the system did not recognize the sensor. After removing this flag, the system recognizes the Light Sensor and accepts data from it. Test: Verified the behavior using the SensorKinetics app Verified on 'master' and 'oc-emu-dev' branches. The full app name is SensorKinetics_v2.1.2_apkpure.com.apk Bug: 36726002 Change-Id: Id87c5e73804f1519ce46c37249765ca0966a185a (cherry picked from commit b0bfdbccecbb10baa176e38e13d90c48f6cbb31c)
-rw-r--r--sensors/sensors_qemu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sensors/sensors_qemu.c b/sensors/sensors_qemu.c
index 9f3f2e5b..c397dd5d 100644
--- a/sensors/sensors_qemu.c
+++ b/sensors/sensors_qemu.c
@@ -336,7 +336,7 @@ static int sensor_device_poll_event_locked(SensorDevice* dev)
events[ID_TEMPERATURE].type = SENSOR_TYPE_AMBIENT_TEMPERATURE;
continue;
}
-
+
/* "proximity:<value>" */
if (sscanf(buff, "proximity:%g", params+0) == 1) {
new_sensors |= SENSORS_PROXIMITY;
@@ -718,7 +718,7 @@ static const struct sensor_t sSensorListInit[] = {
.fifoMaxEventCount = 0,
.stringType = 0,
.requiredPermission = 0,
- .flags = SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE,
+ .flags = SENSOR_FLAG_ON_CHANGE_MODE,
.reserved = {}
},