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

Commit d54f00e3 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Revert LockIcon click behavior

Modifying StatusBar#showBouncer to collapse the shade is not always the right things to do.
It caused a regression where KeyguardSecurityView would be visible but KeyguardSecurityContainer
would never be initialized.
This is a partial revert of ag/7157531

Fixes: 131322107
Test: remove locked sim card, add locked sim card, swipe up
Change-Id: I5fe41b0426c2975c0b0ffdc30c0f5e8adb3b00bc
parent d7314d7a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ public class KeyguardIndicationController implements StateListener,
        if (!mAccessibilityController.isAccessibilityEnabled()) {
            return;
        }
        mShadeController.showBouncer(false /* scrimmed */);
        mShadeController.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
    }

    /**
+6 −0
Original line number Diff line number Diff line
@@ -42,6 +42,12 @@ public interface ShadeController {
     */
    void instantExpandNotificationsPanel();

    /**
     * Collapse the shade animated, showing the bouncer when on {@link StatusBarState#KEYGUARD} or
     * dismissing {@link StatusBar} when on {@link StatusBarState#SHADE}.
     */
    void animateCollapsePanels(int flags, boolean force);

    /**
     * If the notifications panel is not fully expanded, collapse it animated.
     *
+1 −5
Original line number Diff line number Diff line
@@ -3296,12 +3296,8 @@ public class StatusBar extends SystemUI implements DemoMode,

    @Override
    public void showBouncer(boolean scrimmed) {
        if (!mIsOccluded && !scrimmed && mState == StatusBarState.KEYGUARD) {
            animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
        } else {
        mStatusBarKeyguardViewManager.showBouncer(scrimmed);
    }
    }

    @Override
    public void instantExpandNotificationsPanel() {
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {

        when(mAccessibilityController.isAccessibilityEnabled()).thenReturn(true);
        clickCaptor.getValue().onClick(mLockIcon);
        verify(mShadeController).showBouncer(eq(false));
        verify(mShadeController).animateCollapsePanels(anyInt(), eq(true));

        longClickCaptor.getValue().onLongClick(mLockIcon);
        verify(mLockPatternUtils).requireCredentialEntry(anyInt());