From a7765759c438a9cfb358128422b6ba58869de2d5 Mon Sep 17 00:00:00 2001 From: Ivan Gorinov Date: Tue, 4 May 2021 21:10:52 -0700 Subject: [PATCH] Sensors: Set the wakeup LOW_LATENCY_OFFBODY_DETECT as default This sensor type is included in the wakeup sensor list returned by the native sensor API, but missing in the list returned by Java API. Test: Sensor.isWakeUpSensor() Bug: 187181510 Change-Id: I8de98755af7c85a7a4c907c83d69c254ea8f8d7b --- core/java/android/hardware/SensorManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java index 0a76a9c6bee35..928e79c77a650 100644 --- a/core/java/android/hardware/SensorManager.java +++ b/core/java/android/hardware/SensorManager.java @@ -497,6 +497,7 @@ public abstract class SensorManager { if (type == Sensor.TYPE_PROXIMITY || type == Sensor.TYPE_SIGNIFICANT_MOTION || type == Sensor.TYPE_TILT_DETECTOR || type == Sensor.TYPE_WAKE_GESTURE || type == Sensor.TYPE_GLANCE_GESTURE || type == Sensor.TYPE_PICK_UP_GESTURE + || type == Sensor.TYPE_LOW_LATENCY_OFFBODY_DETECT || type == Sensor.TYPE_WRIST_TILT_GESTURE || type == Sensor.TYPE_DYNAMIC_SENSOR_META || type == Sensor.TYPE_HINGE_ANGLE) { wakeUpSensor = true;