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

Commit 922f12ac authored by András Kurucz's avatar András Kurucz
Browse files

Don't pin notifications when the shade is expanded

Follow the behaviour in the legacy path of this refactor, and keep the
expanded state updated un the HeadsUpManager.

Fixes: 352042267
Test: HUN appears above the overscrolled stack
      Scroll the stack below the HUN
      => HUN animates to expanded as it gets more space with the scrolling

Flag: com.android.systemui.notifications_heads_up_refactor
Change-Id: I35e357535bb3ce86b65425327d269cf7d57f1f5a
parent b97c066a
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.SystemBarUtils;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
@@ -172,11 +171,9 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
                updateResources();
            }
        });
        if (!NotificationsHeadsUpRefactor.isEnabled()) {
        javaAdapter.alwaysCollectFlow(shadeInteractor.isAnyExpanded(),
                    this::onShadeOrQsExpanded);
    }
    }

    public void setAnimationStateHandler(AnimationStateHandler handler) {
        mAnimationStateHandler = handler;
@@ -270,10 +267,9 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
    }

    private void onShadeOrQsExpanded(Boolean isExpanded) {
        NotificationsHeadsUpRefactor.assertInLegacyMode();
        if (isExpanded != mIsExpanded) {
            mIsExpanded = isExpanded;
            if (isExpanded) {
            if (!NotificationsHeadsUpRefactor.isEnabled() && isExpanded) {
                mHeadsUpAnimatingAway.setValue(false);
            }
        }