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

Commit 1966f4a4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Flexiglass] Follow HunSharedAnimationValues refactor in SSA" into main

parents b6159811 a06b4ff0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.systemui.statusbar.ui.fakeSystemBarUtilsProxy
import com.android.systemui.testKosmos
import com.google.common.truth.Expect
import com.google.common.truth.Truth.assertThat
import kotlin.math.roundToInt
import org.junit.Assume
import org.junit.Before
import org.junit.Rule
@@ -1572,7 +1573,11 @@ class StackScrollAlgorithmTest(flags: FlagsParameterization) : SysuiTestCase() {
        fullStackHeight: Float = 3000f,
    ) {
        ambientState.headsUpTop = headsUpTop
        if (NotificationsHunSharedAnimationValues.isEnabled) {
            headsUpAnimator.headsUpAppearHeightBottom = headsUpBottom.roundToInt()
        } else {
            ambientState.headsUpBottom = headsUpBottom
        }
        ambientState.stackTop = stackTop
        ambientState.stackCutoff = stackCutoff

+3 −1
Original line number Diff line number Diff line
@@ -36,13 +36,14 @@ import com.android.systemui.statusbar.NotificationShelf;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRepository;
import com.android.systemui.statusbar.notification.headsup.AvalancheController;
import com.android.systemui.statusbar.notification.headsup.NotificationsHunSharedAnimationValues;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.shared.NotificationBundleUi;
import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm.BypassController;
import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm.SectionProvider;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.notification.headsup.AvalancheController;

import java.io.PrintWriter;

@@ -424,6 +425,7 @@ public class AmbientState implements Dumpable {
    /** the bottom-most y position where we can draw pinned HUNs  */
    public float getHeadsUpBottom() {
        if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return 0f;
        NotificationsHunSharedAnimationValues.assertInLegacyMode();
        return mHeadsUpBottom;
    }

+4 −1
Original line number Diff line number Diff line
@@ -967,9 +967,12 @@ public class StackScrollAlgorithm {
                            childState.setZTranslation(baseZ);
                        }
                        if (isTopEntry && row.isAboveShelf()) {
                            float headsUpBottom = NotificationsHunSharedAnimationValues.isEnabled()
                                    ? mHeadsUpAnimator.getHeadsUpAppearHeightBottom()
                                    : ambientState.getHeadsUpBottom();
                            clampHunToMaxTranslation(
                                    /* headsUpTop =  */ headsUpTranslation,
                                    /* headsUpBottom =  */ ambientState.getHeadsUpBottom(),
                                    /* headsUpBottom =  */ headsUpBottom,
                                    /* viewState = */ childState
                            );
                            updateCornerRoundnessForPinnedHun(row, ambientState.getStackTop());