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

Commit a6d0f1f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "When the notification shade is shown the functionality to show/hide HUN...

Merge "When the notification shade is shown the functionality to show/hide HUN should be controlled via a config flag." into qt-dev
parents 1d439158 8bd920f8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -29,6 +29,9 @@
    <bool name="config_enableRightNavigationBar">false</bool>
    <bool name="config_enableBottomNavigationBar">true</bool>

    <!-- Whether heads-up notifications should be shown when shade is open. -->
    <bool name="config_enableHeadsUpNotificationWhenNotificationShadeOpen">true</bool>

    <bool name="config_hideNavWhenKeyguardBouncerShown">true</bool>
    <bool name="config_enablePersistentDockedActivity">false</bool>
    <string name="config_persistentDockedActivityIntentUri" translatable="false"></string>
+12 −1
Original line number Diff line number Diff line
@@ -165,6 +165,8 @@ public class CarStatusBar extends StatusBar implements
    private boolean mIsNotificationCardSwiping;
    // If notification shade is being swiped vertically to close.
    private boolean mIsSwipingVerticallyToClose;
    // Whether heads-up notifications should be shown when shade is open.
    private boolean mEnableHeadsUpNotificationWhenNotificationShadeOpen;

    private final CarPowerStateListener mCarPowerStateListener =
            (int state) -> {
@@ -459,6 +461,8 @@ public class CarStatusBar extends StatusBar implements
                    }
                });

        mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean(
                R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen);
        CarHeadsUpNotificationManager carHeadsUpNotificationManager =
                new CarSystemUIHeadsUpNotificationManager(mContext,
                        mNotificationClickHandlerFactory, mNotificationDataManager);
@@ -1272,12 +1276,19 @@ public class CarStatusBar extends StatusBar implements
            mHeadsUpPanel.setVisibility(View.INVISIBLE);
        }

        @Override
        protected void setInternalInsetsInfo(ViewTreeObserver.InternalInsetsInfo info,
                HeadsUpEntry currentNotification, boolean panelExpanded) {
            super.setInternalInsetsInfo(info, currentNotification, mPanelExpanded);
        }

        @Override
        protected void setHeadsUpVisible() {
            // if the Notifications panel is showing don't show the Heads up
            if (mPanelExpanded) {
            if (!mEnableHeadsUpNotificationWhenNotificationShadeOpen && mPanelExpanded) {
                return;
            }

            super.setHeadsUpVisible();
            if (mHeadsUpPanel.getVisibility() == View.VISIBLE) {
                mStatusBarWindowController.setHeadsUpShowing(true);