Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +1 −1 Original line number Diff line number Diff line Loading @@ -1602,7 +1602,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab requestActiveUnlock( ActiveUnlockConfig.ActiveUnlockRequestOrigin.ASSISTANT, "assistant", false); /* dismissKeyguard */ true); } } Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +20 −0 Original line number Diff line number Diff line Loading @@ -2244,6 +2244,26 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { assertThat(mKeyguardUpdateMonitor.shouldListenForFace()).isFalse(); } @Test public void assistantVisible_requestActiveUnlock() { // GIVEN active unlock requests from the assistant are allowed when(mActiveUnlockConfig.shouldAllowActiveUnlockFromOrigin( ActiveUnlockConfig.ActiveUnlockRequestOrigin.ASSISTANT)).thenReturn(true); // GIVEN should trigger active unlock keyguardIsVisible(); keyguardNotGoingAway(); statusBarShadeIsNotLocked(); when(mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser())).thenReturn(true); // WHEN the assistant is visible mKeyguardUpdateMonitor.setAssistantVisible(true); // THEN request unlock with keyguard dismissal verify(mTrustManager).reportUserRequestedUnlock(eq(KeyguardUpdateMonitor.getCurrentUser()), eq(true)); } @Test public void fingerprintFailure_requestActiveUnlock_dismissKeyguard() throws RemoteException { Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +1 −1 Original line number Diff line number Diff line Loading @@ -1602,7 +1602,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab requestActiveUnlock( ActiveUnlockConfig.ActiveUnlockRequestOrigin.ASSISTANT, "assistant", false); /* dismissKeyguard */ true); } } Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +20 −0 Original line number Diff line number Diff line Loading @@ -2244,6 +2244,26 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { assertThat(mKeyguardUpdateMonitor.shouldListenForFace()).isFalse(); } @Test public void assistantVisible_requestActiveUnlock() { // GIVEN active unlock requests from the assistant are allowed when(mActiveUnlockConfig.shouldAllowActiveUnlockFromOrigin( ActiveUnlockConfig.ActiveUnlockRequestOrigin.ASSISTANT)).thenReturn(true); // GIVEN should trigger active unlock keyguardIsVisible(); keyguardNotGoingAway(); statusBarShadeIsNotLocked(); when(mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser())).thenReturn(true); // WHEN the assistant is visible mKeyguardUpdateMonitor.setAssistantVisible(true); // THEN request unlock with keyguard dismissal verify(mTrustManager).reportUserRequestedUnlock(eq(KeyguardUpdateMonitor.getCurrentUser()), eq(true)); } @Test public void fingerprintFailure_requestActiveUnlock_dismissKeyguard() throws RemoteException { Loading