diff options
author | Ethan Halsall <ethan.halsall@gmail.com> | 2020-04-09 23:35:54 +0100 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2021-09-27 21:17:05 +0800 |
commit | 4c5ca4cc714cfe352561f167fd58eab635a49dca (patch) | |
tree | 5f0d698e500c166d91b6032dbdd28c366d8da442 | |
parent | d1c73c47f07181844bdbe7bfcb0b20072e7456f0 (diff) |
[ArrowOS][11.0] base: do not use new lockscreen layout for bypass
- bypassEnabled will always evaluate to false now.
- Introduce bypassEnabledBiometric which is only used to tell the biometric service whether we can bypass lockscreen without swipe dependant on Settings.Secure.FACE_UNLOCK_DISMISSES_KEYGUARD.
Signed-off-by: Ethan Halsall <ethan.halsall@gmail.com>
Change-Id: Ibdbf16df18543382219a75ce1aaf4e25f3fb4ddb
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java | 2 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index 0e76c904f8cd..20ed8491bd69 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -533,7 +533,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp boolean unlockingAllowed = mUpdateMonitor.isUnlockingWithBiometricAllowed(isStrongBiometric); boolean deviceDreaming = mUpdateMonitor.isDreaming(); - boolean bypass = mKeyguardBypassController.getBypassEnabled(); + boolean bypass = mKeyguardBypassController.getBypassEnabledBiometric(); if (!mUpdateMonitor.isDeviceInteractive()) { if (!mKeyguardViewController.isShowing()) { 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 0827511cac34..c01132fb5b68 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt @@ -63,6 +63,8 @@ open class KeyguardBypassController : Dumpable { get() = field && mKeyguardStateController.isFaceAuthEnabled private set + var bypassEnabledBiometric: Boolean = false + var bouncerShowing: Boolean = false var launchingAffordance: Boolean = false var qSExpanded = false @@ -104,7 +106,7 @@ open class KeyguardBypassController : Dumpable { com.android.internal.R.bool.config_faceAuthDismissesKeyguard)) 1 else 0 tunerService.addTunable(object : TunerService.Tunable { override fun onTuningChanged(key: String?, newValue: String?) { - bypassEnabled = tunerService.getValue(key, dismissByDefault) != 0 + bypassEnabledBiometric = tunerService.getValue(key, dismissByDefault) != 0 } }, Settings.Secure.FACE_UNLOCK_DISMISSES_KEYGUARD) lockscreenUserManager.addUserChangedListener( @@ -124,8 +126,8 @@ open class KeyguardBypassController : Dumpable { biometricSourceType: BiometricSourceType, isStrongBiometric: Boolean ): Boolean { - if (bypassEnabled) { - val can = canBypass() + if (bypassEnabledBiometric) { + val can = biometricSourceType != BiometricSourceType.FACE || canBypass() if (!can && (isPulseExpanding || qSExpanded)) { pendingUnlock = PendingUnlock(biometricSourceType, isStrongBiometric) } @@ -149,7 +151,7 @@ open class KeyguardBypassController : Dumpable { * If keyguard can be dismissed because of bypass. */ fun canBypass(): Boolean { - if (bypassEnabled) { + if (bypassEnabledBiometric) { return when { bouncerShowing -> true statusBarStateController.state != StatusBarState.KEYGUARD -> false @@ -165,7 +167,7 @@ open class KeyguardBypassController : Dumpable { * If shorter animations should be played when unlocking. */ fun canPlaySubtleWindowAnimations(): Boolean { - if (bypassEnabled) { + if (bypassEnabledBiometric) { return when { statusBarStateController.state != StatusBarState.KEYGUARD -> false qSExpanded -> false @@ -188,6 +190,7 @@ open class KeyguardBypassController : Dumpable { pw.println(" mPendingUnlock: $pendingUnlock") } pw.println(" bypassEnabled: $bypassEnabled") + pw.println(" bypassEnabledBiometric: $bypassEnabledBiometric") pw.println(" canBypass: ${canBypass()}") pw.println(" bouncerShowing: $bouncerShowing") pw.println(" isPulseExpanding: $isPulseExpanding") |