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

Commit b351db72 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "Volume: dismiss volume UI to avoid HUNs." into mnc-dev

parents 09404dd1 b349af57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2158,7 +2158,7 @@ public class NotificationPanelView extends PanelView implements
    }

    @Override
    public void onPinnedModeChanged(final boolean inPinnedMode) {
    public void onHeadsUpPinnedModeChanged(final boolean inPinnedMode) {
        if (inPinnedMode) {
            mHeadsUpExistenceChangedRunnable.run();
            updateNotificationTranslucency();
+9 −4
Original line number Diff line number Diff line
@@ -1852,7 +1852,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    }

    @Override
    public void onPinnedModeChanged(boolean inPinnedMode) {
    public void onHeadsUpPinnedModeChanged(boolean inPinnedMode) {
        if (inPinnedMode) {
            mStatusBarWindowManager.setHeadsUpShowing(true);
        } else {
@@ -1874,6 +1874,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,

    @Override
    public void onHeadsUpPinned(ExpandableNotificationRow headsUp) {
        dismissVolumeDialog();
    }

    @Override
@@ -2377,12 +2378,16 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        }
        // manually dismiss the volume panel when interacting with the nav bar
        if (changing && interacting && barWindow == StatusBarManager.WINDOW_NAVIGATION_BAR) {
            dismissVolumeDialog();
        }
        checkBarModes();
    }

    private void dismissVolumeDialog() {
        if (mVolumeComponent != null) {
            mVolumeComponent.dismissNow();
        }
    }
        checkBarModes();
    }

    private void resumeSuspendedAutohide() {
        if (mAutohideSuspended) {
+1 −1
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener,
    }

    @Override
    public void onPinnedModeChanged(boolean inPinnedMode) {
    public void onHeadsUpPinnedModeChanged(boolean inPinnedMode) {
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
        }
        mHasPinnedNotification = hasPinnedNotification;
        for (OnHeadsUpChangedListener listener : mListeners) {
            listener.onPinnedModeChanged(hasPinnedNotification);
            listener.onHeadsUpPinnedModeChanged(hasPinnedNotification);
        }
    }

@@ -539,7 +539,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
         *
         * @param inPinnedMode whether there are any pinned heads-ups
         */
        void onPinnedModeChanged(boolean inPinnedMode);
        void onHeadsUpPinnedModeChanged(boolean inPinnedMode);

        /**
         * A notification was just pinned to the top.