diff options
| author | 2019-07-31 13:28:36 -0700 | |
|---|---|---|
| committer | 2019-07-31 13:28:36 -0700 | |
| commit | 7db94e4a2703d054f010a18c2c5d8cc110b3130c (patch) | |
| tree | b89f349517cb4f93ef88594af157b6d467a9f0bc | |
| parent | 09ed3f9ea46adc547141cee7a2c860971f390067 (diff) | |
| parent | 545bd4dee3392f85e2cbbf611bd31b0047cee1e4 (diff) | |
Merge "Do not gate bypass on isHardwareAvailable" into qt-r1-dev
am: 545bd4dee3
Change-Id: Ic8a5639cd89603118e98796bb5592fc5f91f7956
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt index 70d3bff9b822..832ea9e3d72e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt @@ -19,7 +19,6 @@ package com.android.systemui.statusbar.phone import android.content.Context import android.content.pm.PackageManager import android.hardware.biometrics.BiometricSourceType -import android.hardware.face.FaceManager import android.provider.Settings import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.statusbar.NotificationLockscreenUserManager @@ -34,6 +33,7 @@ class KeyguardBypassController { private val unlockMethodCache: UnlockMethodCache private val statusBarStateController: StatusBarStateController + private var hasFaceFeature: Boolean /** * The pending unlock type which is set if the bypass was blocked when it happened. @@ -71,11 +71,8 @@ class KeyguardBypassController { unlockMethodCache = UnlockMethodCache.getInstance(context) this.statusBarStateController = statusBarStateController - if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) { - return - } - val faceManager = context.getSystemService(FaceManager::class.java) - if (faceManager?.isHardwareDetected != true) { + hasFaceFeature = context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE) + if (!hasFaceFeature) { return } @@ -165,7 +162,7 @@ class KeyguardBypassController { pw.print(" isPulseExpanding: "); pw.println(isPulseExpanding) pw.print(" launchingAffordance: "); pw.println(launchingAffordance) pw.print(" qSExpanded: "); pw.println(qSExpanded) - pw.print(" bouncerShowing: "); pw.println(bouncerShowing) + pw.print(" hasFaceFeature: "); pw.println(hasFaceFeature) } companion object { |