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

Commit 8782caa6 authored by Aaron Liu's avatar Aaron Liu
Browse files

Scrim: Do not interact with scrim with hint

When hint animation is running, we want to disable scrim logic.

Bug: 226403870
Test: Manual on device
Change-Id: Ibf12fce8ab167a641d1089e4bce7163ca66d5a51
parent 9dc8e3b2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3203,12 +3203,14 @@ public class NotificationPanelViewController extends PanelViewController {
    @Override
    protected void onUnlockHintFinished() {
        super.onUnlockHintFinished();
        mScrimController.setExpansionAffectsAlpha(true);
        mNotificationStackScrollLayoutController.setUnlockHintRunning(false);
    }

    @Override
    protected void onUnlockHintStarted() {
        super.onUnlockHintStarted();
        mScrimController.setExpansionAffectsAlpha(false);
        mNotificationStackScrollLayoutController.setUnlockHintRunning(true);
    }

+8 −0
Original line number Diff line number Diff line
@@ -930,6 +930,14 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
        verify(mLargeScreenShadeHeaderController).setActive(false);
    }

    @Test
    public void testUnlockAnimationDoesNotAffectScrim() {
        mNotificationPanelViewController.onUnlockHintStarted();
        verify(mScrimController).setExpansionAffectsAlpha(false);
        mNotificationPanelViewController.onUnlockHintFinished();
        verify(mScrimController).setExpansionAffectsAlpha(true);
    }

    private void triggerPositionClockAndNotifications() {
        mNotificationPanelViewController.closeQs();
    }