Merge "Don't require awakeKeyguard for activeUnlock" into tm-dev
This commit is contained in:
@@ -71,13 +71,16 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView>
|
|||||||
public void onTrustGrantedWithFlags(int flags, int userId) {
|
public void onTrustGrantedWithFlags(int flags, int userId) {
|
||||||
if (userId != KeyguardUpdateMonitor.getCurrentUser()) return;
|
if (userId != KeyguardUpdateMonitor.getCurrentUser()) return;
|
||||||
boolean bouncerVisible = mView.isVisibleToUser();
|
boolean bouncerVisible = mView.isVisibleToUser();
|
||||||
|
boolean temporaryAndRenewable =
|
||||||
|
(flags & TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE)
|
||||||
|
!= 0;
|
||||||
boolean initiatedByUser =
|
boolean initiatedByUser =
|
||||||
(flags & TrustAgentService.FLAG_GRANT_TRUST_INITIATED_BY_USER) != 0;
|
(flags & TrustAgentService.FLAG_GRANT_TRUST_INITIATED_BY_USER) != 0;
|
||||||
boolean dismissKeyguard =
|
boolean dismissKeyguard =
|
||||||
(flags & TrustAgentService.FLAG_GRANT_TRUST_DISMISS_KEYGUARD) != 0;
|
(flags & TrustAgentService.FLAG_GRANT_TRUST_DISMISS_KEYGUARD) != 0;
|
||||||
|
|
||||||
if (initiatedByUser || dismissKeyguard) {
|
if (initiatedByUser || dismissKeyguard) {
|
||||||
if (mViewMediatorCallback.isScreenOn()
|
if ((mViewMediatorCallback.isScreenOn() || temporaryAndRenewable)
|
||||||
&& (bouncerVisible || dismissKeyguard)) {
|
&& (bouncerVisible || dismissKeyguard)) {
|
||||||
if (!bouncerVisible) {
|
if (!bouncerVisible) {
|
||||||
// The trust agent dismissed the keyguard without the user proving
|
// The trust agent dismissed the keyguard without the user proving
|
||||||
|
|||||||
@@ -2417,7 +2417,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
// Triggers:
|
// Triggers:
|
||||||
final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant();
|
final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant();
|
||||||
final boolean awakeKeyguard = mBouncerFullyShown || mUdfpsBouncerShowing
|
final boolean awakeKeyguard = mBouncerFullyShown || mUdfpsBouncerShowing
|
||||||
|| (mKeyguardIsVisible && mDeviceInteractive && !mGoingToSleep
|
|| (mKeyguardIsVisible && !mGoingToSleep
|
||||||
&& mStatusBarState != StatusBarState.SHADE_LOCKED);
|
&& mStatusBarState != StatusBarState.SHADE_LOCKED);
|
||||||
|
|
||||||
// Gates:
|
// Gates:
|
||||||
|
|||||||
Reference in New Issue
Block a user