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

Commit 00c05f8c authored by Matt Pietal's avatar Matt Pietal
Browse files

Fix first swipe after exiting AOD

I can't explain what changed, but the NPVC height
calculation is no longer getting updated when exiting
AOD. This leads to the incorrect height being used
in a swipe calculation that is off by quite a bit,
and preventing the drag from being processed and
sending events on the first swipe only.

Fixes: 371527677
Test: manual - exit AOD, and swipe up
Flag: EXEMPT bugfix
Change-Id: I8c89262a62840005ba4f423f99bb3092811f5a28
parent ab1a29e9
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import static com.android.systemui.classifier.Classifier.BOUNCER_UNLOCK;
import static com.android.systemui.classifier.Classifier.GENERIC;
import static com.android.systemui.classifier.Classifier.QUICK_SETTINGS;
import static com.android.systemui.classifier.Classifier.UNLOCK;
import static com.android.systemui.keyguard.shared.model.KeyguardState.AOD;
import static com.android.systemui.keyguard.shared.model.KeyguardState.DREAMING;
import static com.android.systemui.keyguard.shared.model.KeyguardState.DREAMING_LOCKSCREEN_HOSTED;
import static com.android.systemui.keyguard.shared.model.KeyguardState.GONE;
@@ -1213,6 +1214,16 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                    }, mMainDispatcher);
        }

        if (MigrateClocksToBlueprint.isEnabled()) {
            collectFlow(mView, mKeyguardTransitionInteractor.transition(
                    Edge.Companion.create(AOD, LOCKSCREEN)),
                    (TransitionStep step) -> {
                    if (step.getTransitionState() == TransitionState.FINISHED) {
                        updateExpandedHeightToMaxHeight();
                    }
                }, mMainDispatcher);
        }

        // Ensures that flags are updated when an activity launches
        collectFlow(mView,
                mShadeAnimationInteractor.isLaunchingActivity(),
+3 −1
Original line number Diff line number Diff line
@@ -556,11 +556,13 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
            return null;
        }).when(mView).setOnTouchListener(any(NotificationPanelViewController.TouchHandler.class));

        // Dreaming->Lockscreen
        // Any edge transition
        when(mKeyguardTransitionInteractor.transition(any()))
                .thenReturn(emptyFlow());
        when(mKeyguardTransitionInteractor.transition(any(), any()))
                .thenReturn(emptyFlow());

        // Dreaming->Lockscreen
        when(mDreamingToLockscreenTransitionViewModel.getLockscreenAlpha())
                .thenReturn(emptyFlow());
        when(mDreamingToLockscreenTransitionViewModel.lockscreenTranslationY(anyInt()))