Merge "Don't require awakeKeyguard for activeUnlock" into tm-dev am: 6a69a2c844 am: 92b65722f8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18186409

Change-Id: I85158f68f24dfcd277d358d5a92457586ac9584f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Beverly Tai
2022-05-12 18:03:50 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 2 deletions

View File

@@ -71,13 +71,16 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView>
public void onTrustGrantedWithFlags(int flags, int userId) {
if (userId != KeyguardUpdateMonitor.getCurrentUser()) return;
boolean bouncerVisible = mView.isVisibleToUser();
boolean temporaryAndRenewable =
(flags & TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE)
!= 0;
boolean initiatedByUser =
(flags & TrustAgentService.FLAG_GRANT_TRUST_INITIATED_BY_USER) != 0;
boolean dismissKeyguard =
(flags & TrustAgentService.FLAG_GRANT_TRUST_DISMISS_KEYGUARD) != 0;
if (initiatedByUser || dismissKeyguard) {
if (mViewMediatorCallback.isScreenOn()
if ((mViewMediatorCallback.isScreenOn() || temporaryAndRenewable)
&& (bouncerVisible || dismissKeyguard)) {
if (!bouncerVisible) {
// The trust agent dismissed the keyguard without the user proving

View File

@@ -2437,7 +2437,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
// Triggers:
final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant();
final boolean awakeKeyguard = mBouncerFullyShown || mUdfpsBouncerShowing
|| (mKeyguardIsVisible && mDeviceInteractive && !mGoingToSleep
|| (mKeyguardIsVisible && !mGoingToSleep
&& mStatusBarState != StatusBarState.SHADE_LOCKED);
// Gates: