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

Commit e86ce8f2 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Fixing QS appearing when going from AOD to unlocked in split shade

Bug was caused by steadily decreasing height of panel instead of snapping it to 0 immediately. While transitioning from AOD to UNLOCKED, we’re using collapsePanel with animation call which creates height animator. That animator is progressing through shade collapse from fraction of 1 through 0.9, 0. 8 etc making the whole shade visible for some time. We need to immediately collapse shade in that case instead of animating the transition, which is done automatically when changing states.
This animation was triggered from resetViews() when going out of doze and resetting views doesn’t seem to be necessary as shade is already getting collapsed when going into doze.

Bug: 244777135
Test: go to AOD in split shade, unlock with fingerprint without showing keyguard first, QS are not flashing for a moment
Change-Id: Ice020b5d40148026709a78b22af9de4dbc203984
parent 0b180ddb
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -425,8 +425,6 @@ public final class NotificationPanelViewController extends PanelViewController {
            new KeyguardClockPositionAlgorithm.Result();
    private boolean mIsExpanding;

    private boolean mBlockTouches;

    /**
     * Determines if QS should be already expanded when expanding shade.
     * Used for split shade, two finger gesture as well as accessibility shortcut to QS.
@@ -1692,7 +1690,6 @@ public final class NotificationPanelViewController extends PanelViewController {

    public void resetViews(boolean animate) {
        mIsLaunchTransitionFinished = false;
        mBlockTouches = false;
        mCentralSurfaces.getGutsManager().closeAndSaveGuts(true /* leavebehind */, true /* force */,
                true /* controls */, -1 /* x */, -1 /* y */, true /* resetMenu */);
        if (animate && !isFullyCollapsed()) {
@@ -4186,7 +4183,7 @@ public final class NotificationPanelViewController extends PanelViewController {
                            "NPVC onInterceptTouchEvent (" + event.getId() + "): (" + event.getX()
                                    + "," + event.getY() + ")");
                }
                if (mBlockTouches || mQs.disallowPanelTouches()) {
                if (mQs.disallowPanelTouches()) {
                    return false;
                }
                initDownStates(event);
@@ -4229,8 +4226,7 @@ public final class NotificationPanelViewController extends PanelViewController {
                }


                if (mBlockTouches || (mQsFullyExpanded && mQs != null
                        && mQs.disallowPanelTouches())) {
                if (mQsFullyExpanded && mQs != null && mQs.disallowPanelTouches()) {
                    return false;
                }

+3 −2
Original line number Diff line number Diff line
@@ -4453,10 +4453,11 @@ public class CentralSurfacesImpl extends CoreStartable implements
                    Trace.beginSection("CentralSurfaces#updateDozing");
                    mDozing = isDozing;

                    // Collapse the notification panel if open
                    boolean dozingAnimated = mDozeServiceHost.getDozingRequested()
                            && mDozeParameters.shouldControlScreenOff();
                    mNotificationPanelViewController.resetViews(dozingAnimated);
                    // resetting views is already done when going into doze, there's no need to
                    // reset them again when we're waking up
                    mNotificationPanelViewController.resetViews(dozingAnimated && isDozing);

                    updateQsExpansionEnabled();
                    mKeyguardViewMediator.setDozing(mDozing);