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

Commit 0cf1ecf1 authored by Shawn Lee's avatar Shawn Lee Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Relocate call to HeadsUpManager.unpinAll" into main

parents 1b5134c9 d43e402d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ fun SceneScope.SnoozeableHeadsUpNotificationSpace(

    LaunchedEffect(scrollableState.isScrollInProgress) {
        if (!scrollableState.isScrollInProgress && scrollOffset <= minScrollOffset) {
            viewModel.setHeadsUpAnimatingAway(false)
            viewModel.snoozeHun()
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -3519,7 +3519,7 @@ public class NotificationStackScrollLayout
    // Only when scene container is enabled, mark that we are being dragged so that we start
    // dispatching the rest of the gesture to scene container.
    void startOverscrollAfterExpanding() {
        SceneContainerFlag.isUnexpectedlyInLegacyMode();
        if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
        getExpandHelper().finishExpanding();
        setIsBeingDragged(true);
    }
@@ -3527,7 +3527,7 @@ public class NotificationStackScrollLayout
    // Only when scene container is enabled, mark that we are being dragged so that we start
    // dispatching the rest of the gesture to scene container.
    void startDraggingOnHun() {
        SceneContainerFlag.isUnexpectedlyInLegacyMode();
        if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
        setIsBeingDragged(true);
    }

+1 −0
Original line number Diff line number Diff line
@@ -2034,6 +2034,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                hunWantsIt = mHeadsUpTouchHelper.onInterceptTouchEvent(ev);
                if (hunWantsIt) {
                    mView.startDraggingOnHun();
                    mHeadsUpManager.unpinAll(true);
                }
            }
            boolean swipeWantsIt = false;
+5 −0
Original line number Diff line number Diff line
@@ -110,6 +110,11 @@ constructor(
        interactor.setScrolledToTop(scrolledToTop)
    }

    /** Sets whether the heads up notification is animating away. */
    fun setHeadsUpAnimatingAway(animatingAway: Boolean) {
        headsUpNotificationInteractor.setHeadsUpAnimatingAway(animatingAway)
    }

    /** Snooze the currently pinned HUN. */
    fun snoozeHun() {
        headsUpNotificationInteractor.snooze()
+0 −1
Original line number Diff line number Diff line
@@ -124,7 +124,6 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
                    mPanel.setHeadsUpDraggingStartingHeight(startHeight);
                    mPanel.startExpand(x, y, true /* startTracking */, startHeight);

                    // TODO(b/340514839): Figure out where to move this side effect in flexiglass
                    if (!SceneContainerFlag.isEnabled()) {
                        // This call needs to be after the expansion start otherwise we will get a
                        // flicker of one frame as it's not expanded yet.