summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2019-09-23 11:54:56 -0700
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-11-16 00:26:59 +0000
commitbfeaf4e4a824d467cf755a3f7b47bd10cda42286 (patch)
tree162c444a112398c8d33c84f9a52da91d7ccb0610
parentf04d32b8b0a89dcef3e67f7835375070d5a88abc (diff)
downloadbase-bfeaf4e4a824d467cf755a3f7b47bd10cda42286.tar.gz
Do not register lift when sensor is not present
Bug: 141284056 Fixes: 142365481 Test: force snesor to return null Change-Id: I45583e4f1c06ec7088a7d6335597a8671555f339 (cherry picked from commit 3b745ddf4a0105ee01b42f5024be4e0370a89b6b) (cherry picked from commit 0a410d3a6c4d7cff0d617e501ecc14e61219a358)
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
index f4635d1270a8..f7b8a2e29129 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
@@ -67,6 +67,9 @@ class KeyguardLiftController constructor(
}
private fun updateListeningState() {
+ if (pickupSensor == null) {
+ return
+ }
val onKeyguard = keyguardUpdateMonitor.isKeyguardVisible &&
!statusBarStateController.isDozing