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

Commit 50701a0b authored by Jamie Garside's avatar Jamie Garside Committed by Automerger Merge Worker
Browse files

Merge "Fix bugs with QS customizer when split shade is active." into sc-v2-dev...

Merge "Fix bugs with QS customizer when split shade is active." into sc-v2-dev am: 1351c6f6 am: 8aafc9d8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16123522

Change-Id: I1c95ea4ef645b595f3a7da2bdd5e2291a97dbf2f
parents 89d29b89 8aafc9d8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public interface QS extends FragmentBase {

    String ACTION = "com.android.systemui.action.PLUGIN_QS";

    int VERSION = 11;
    int VERSION = 12;

    String TAG = "QS";

@@ -46,6 +46,8 @@ public interface QS extends FragmentBase {
    void setHeightOverride(int desiredHeight);
    void setHeaderClickable(boolean qsExpansionEnabled);
    boolean isCustomizing();
    /** Close the QS customizer, if it is open. */
    void closeCustomizer();
    void setOverscrolling(boolean overscrolling);
    void setExpanded(boolean qsExpanded);
    void setListening(boolean listening);
+6 −1
Original line number Diff line number Diff line
@@ -15,10 +15,10 @@
package com.android.systemui.qs;

import static android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS;
import static com.android.systemui.statusbar.DisableFlagsLogger.DisableState;

import static com.android.systemui.media.dagger.MediaModule.QS_PANEL;
import static com.android.systemui.media.dagger.MediaModule.QUICK_QS_PANEL;
import static com.android.systemui.statusbar.DisableFlagsLogger.DisableState;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -696,6 +696,11 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
        mQSPanelController.closeDetail();
    }

    @Override
    public void closeCustomizer() {
        mQSCustomizerController.hide();
    }

    public void notifyCustomizeChanged() {
        // The customize state changed, so our height changed.
        mContainer.updateExpansion();
+14 −0
Original line number Diff line number Diff line
@@ -3020,6 +3020,10 @@ public class NotificationPanelViewController extends PanelViewController {
            mStatusBarTouchableRegionManager.setPanelExpanded(isExpanded);
            mStatusBar.setPanelExpanded(isExpanded);
            mPanelExpanded = isExpanded;

            if (!isExpanded && mQs != null && mQs.isCustomizing()) {
                mQs.closeCustomizer();
            }
        }
    }

@@ -3318,10 +3322,20 @@ public class NotificationPanelViewController extends PanelViewController {
        return mQs.isShowingDetail();
    }

    /** Returns whether the QS customizer is currently active. */
    public boolean isQsCustomizing() {
        return mQs.isCustomizing();
    }

    public void closeQsDetail() {
        mQs.closeDetail();
    }

    /** Close the QS customizer if it is open. */
    public void closeQsCustomizer() {
        mQs.closeCustomizer();
    }

    public boolean isLaunchTransitionFinished() {
        return mIsLaunchTransitionFinished;
    }
+4 −0
Original line number Diff line number Diff line
@@ -3278,6 +3278,10 @@ public class StatusBar extends CoreStartable implements
            }
            return true;
        }
        if (mNotificationPanelViewController.isQsCustomizing()) {
            mNotificationPanelViewController.closeQsCustomizer();
            return true;
        }
        if (mNotificationPanelViewController.isQsExpanded()) {
            if (mNotificationPanelViewController.isQsDetailShowing()) {
                mNotificationPanelViewController.closeQsDetail();