Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6d3eecb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "NotificationShade should animate away on MODE_UNLOCK_COLLAPSING" into...

Merge "NotificationShade should animate away on MODE_UNLOCK_COLLAPSING" into sc-qpr1-dev am: a22f94bd am: e6e35ab0 am: 0daa1fc6

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

Change-Id: I4dfb9b86299aee70ab67c79d70e677541fb811c2
parents 4d4ac7cb 0daa1fc6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp

    /**
     * Mode in which fingerprint unlocks the device or passive auth (ie face auth) unlocks the
     * device while being requested when keyguard is occluded.
     * device while being requested when keyguard is occluded or showing.
     */
    public static final int MODE_UNLOCK_COLLAPSING = 5;

@@ -425,6 +425,11 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
                if (!wasDeviceInteractive) {
                    mPendingShowBouncer = true;
                } else {
                    mShadeController.animateCollapsePanels(
                            CommandQueue.FLAG_EXCLUDE_NONE,
                            true /* force */,
                            false /* delayed */,
                            BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
                    mPendingShowBouncer = false;
                    mKeyguardViewController.notifyKeyguardAuthenticated(
                            false /* strongAuth */);
+20 −0
Original line number Diff line number Diff line
@@ -273,6 +273,26 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
                .isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
    }

    @Test
    public void onBiometricAuthenticated_onLockScreen() {
        // GIVEN not dozing
        when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);

        // WHEN we want to unlock collapse
        mBiometricUnlockController.startWakeAndUnlock(
                BiometricUnlockController.MODE_UNLOCK_COLLAPSING);

        // THEN we collpase the panels and notify authenticated
        verify(mShadeController).animateCollapsePanels(
                /* flags */ anyInt(),
                /* force */ eq(true),
                /* delayed */ eq(false),
                /* speedUpFactor */ anyFloat()
        );
        verify(mStatusBarKeyguardViewManager).notifyKeyguardAuthenticated(
                /* strongAuth */ eq(false));
    }

    @Test
    public void onBiometricAuthenticated_whenFace_noBypass_encrypted_doNothing() {
        reset(mUpdateMonitor);