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

Commit b56b197c authored by Steve Elliott's avatar Steve Elliott Committed by Android (Google) Code Review
Browse files

Merge "Flag-guard usages of speedbump" into main

parents 16e2b2eb aaf37858
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -229,7 +229,9 @@ public class NotificationShelf extends ActivatableNotificationView {
            } else {
                viewState.setAlpha(1f - ambientState.getHideAmount());
            }
            if (!NotificationIconContainerRefactor.isEnabled()) {
                viewState.belowSpeedBump = getSpeedBumpIndex() == 0;
            }
            viewState.hideSensitive = false;
            viewState.setXTranslation(getTranslationX());
            viewState.hasItemsInStableShelf = lastViewState.inShelf;
+2 −4
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import com.android.systemui.statusbar.NotificationShelf;
import com.android.systemui.statusbar.notification.FakeShadowView;
import com.android.systemui.statusbar.notification.NotificationUtils;
import com.android.systemui.statusbar.notification.SourceType;
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
import com.android.systemui.util.DumpUtilsKt;
@@ -229,17 +230,14 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView

    @Override
    public void setBelowSpeedBump(boolean below) {
        NotificationIconContainerRefactor.assertInLegacyMode();
        super.setBelowSpeedBump(below);
        if (below != mIsBelowSpeedBump) {
            mIsBelowSpeedBump = below;
            updateBackgroundTint();
            onBelowSpeedBumpChanged();
        }
    }

    protected void onBelowSpeedBumpChanged() {
    }

    /**
     * Sets the tint color of the background
     */
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.systemui.res.R;
import com.android.systemui.statusbar.StatusBarIconView;
import com.android.systemui.statusbar.notification.Roundable;
import com.android.systemui.statusbar.notification.RoundableState;
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor;
import com.android.systemui.statusbar.notification.stack.ExpandableViewState;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.util.Compile;
@@ -400,6 +401,7 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable, Ro
     * @param below true if it is below.
     */
    public void setBelowSpeedBump(boolean below) {
        NotificationIconContainerRefactor.assertInLegacyMode();
    }

    public int getPinnedHeadsUpHeight() {
+7 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.app.animation.Interpolators;
import com.android.systemui.res.R;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor;

/**
* A state of an expandable view
@@ -162,7 +163,9 @@ public class ExpandableViewState extends ViewState {
                    this.hideSensitive, false /* animated */, 0 /* delay */, 0 /* duration */);

            // apply below shelf speed bump
            if (!NotificationIconContainerRefactor.isEnabled()) {
                expandableView.setBelowSpeedBump(this.belowSpeedBump);
            }

            // apply clipping
            final float oldClipTopAmount = expandableView.getClipTopAmount();
@@ -217,7 +220,9 @@ public class ExpandableViewState extends ViewState {
        expandableView.setDimmed(this.dimmed, animationFilter.animateDimmed);

        // apply below the speed bump
        if (!NotificationIconContainerRefactor.isEnabled()) {
            expandableView.setBelowSpeedBump(this.belowSpeedBump);
        }

        // start hiding sensitive animation
        expandableView.setHideSensitive(this.hideSensitive, animationFilter.animateHideSensitive,