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

Commit 2467aa18 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Making sure QS are visible when expanding shade with heads-up...

Merge "Making sure QS are visible when expanding shade with heads-up notification" into tm-qpr-dev am: dae823a3

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



Change-Id: I193a7b41dfb025b537d4ab05dd62ec81476c66d1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d75a26d0 dae823a3
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -465,7 +465,11 @@ public final class NotificationPanelViewController implements Dumpable {
    private boolean mQsTouchAboveFalsingThreshold;
    private int mQsFalsingThreshold;

    /** Indicates drag starting height when swiping down or up on heads-up notifications */
    /**
     * Indicates drag starting height when swiping down or up on heads-up notifications.
     * This usually serves as a threshold from when shade expansion should really start. Otherwise
     * this value would be height of shade and it will be immediately expanded to some extent.
     */
    private int mHeadsUpStartHeight;
    private HeadsUpTouchHelper mHeadsUpTouchHelper;
    private boolean mListenForHeadsUp;
@@ -3412,9 +3416,12 @@ public final class NotificationPanelViewController implements Dumpable {
                && mQsExpansionAnimator == null && !mQsExpansionFromOverscroll;
        boolean goingBetweenClosedShadeAndExpandedQs =
                mQsExpandImmediate || collapsingShadeFromExpandedQs;
        // we don't want to update QS expansion when HUN is visible because then the whole shade is
        // initially hidden, even though it has non-zero height
        if (goingBetweenClosedShadeAndExpandedQs && !mHeadsUpManager.isTrackingHeadsUp()) {
        // in split shade we react when HUN is visible only if shade height is over HUN start
        // height - which means user is swiping down. Otherwise shade QS will either not show at all
        // with HUN movement or it will blink when touching HUN initially
        boolean qsShouldExpandWithHeadsUp = !mSplitShadeEnabled
                || (!mHeadsUpManager.isTrackingHeadsUp() || expandedHeight > mHeadsUpStartHeight);
        if (goingBetweenClosedShadeAndExpandedQs && qsShouldExpandWithHeadsUp) {
            float qsExpansionFraction;
            if (mSplitShadeEnabled) {
                qsExpansionFraction = 1;