OSDN Git Service

Assume sensors perform prox check
authorLucas Dupin <dupin@google.com>
Wed, 7 Aug 2019 22:55:00 +0000 (15:55 -0700)
committerMady Mellor <madym@google.com>
Thu, 12 Sep 2019 21:04:53 +0000 (21:04 +0000)
commit9bab4a26245ecbc204b617cc3c046bdadf9e65e2
treea039d6f00a032260319bb8c454709d7c4a500d56
parente601fa89014fa50c88da6402fe9b31a0a7e41b30
Assume sensors perform prox check

Assume that doze sensors will be prox gated.
Not doing so would be a bad idea anyway since the device would wake
up way more often than it should and drain battery.

Another improvement on this CL is that regular DozeSensors prox
checks are trying to use a binned brightness sensor instead.

Fixes: 138765669
Test: atest DozeSensorsTest DozeTriggersTest
Test: single tap from AOD (observe no re-registration of lift)
Test: 'reach' from AOD (observe no re-registration of lift)
Test: receive notification with prox covered or unobstructed
Change-Id: I1961ff9b16480ba1a60c397570494dd7acb4802d
(cherry picked from commit f40bd8fbb65c896c824fe3f1a5be857bbe8ae281)
Merged-In: I1961ff9b16480ba1a60c397570494dd7acb4802d
packages/SystemUI/res/values/config.xml
packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationUtil.java
packages/SystemUI/tests/src/com/android/systemui/doze/DozeSensorsTest.java
packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java