summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2019-10-09 12:16:40 -0700
committer android-build-merger <android-build-merger@google.com> 2019-10-09 12:16:40 -0700
commite64e30fb687c40f805dd420ce2afcf87978509a3 (patch)
tree2e9523557602fdec1ca2d092ce56109d4922a945
parent87bc4f1ee74e6f7abe4611d7618f0404e4981290 (diff)
parent0a410d3a6c4d7cff0d617e501ecc14e61219a358 (diff)
Do not register lift when sensor is not present
am: 0a410d3a6c Change-Id: I4dd5483a7ef208eb65a1690ed6c5182923ccd02e
-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