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

Commit c09eeda4 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Clean up ANIMATED_NOTIFICATION_SHADE_INSETS flag

Fix: 270682168
Test: atest SystemUITests
Flag: LEGACY ANIMATED_NOTIFICATION_SHADE_INSETS ENABLED
Change-Id: I8aef4238b921c03fe992c3fa224a465bfbf5ed5e
parent b6615b0d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -76,10 +76,6 @@ object Flags {
    val NOTIFICATION_MEMORY_LOGGING_ENABLED =
            releasedFlag("notification_memory_logging_enabled")

    @JvmField
    val ANIMATED_NOTIFICATION_SHADE_INSETS =
        releasedFlag("animated_notification_shade_insets")

    // TODO(b/268005230): Tracking Bug
    @JvmField
    val SENSITIVE_REVEAL_ANIM = releasedFlag("sensitive_reveal_anim")
+3 −29
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@ import com.android.systemui.Dumpable;
import com.android.systemui.ExpandHelper;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.flags.RefactorFlag;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper;
import com.android.systemui.res.R;
@@ -196,7 +195,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private Set<Integer> mDebugTextUsedYPositions;
    private final boolean mDebugRemoveAnimation;
    private final boolean mSensitiveRevealAnimEndabled;
    private final RefactorFlag mAnimatedInsets;
    private int mContentHeight;
    private float mIntrinsicContentHeight;
    private int mPaddingBetweenElements;
@@ -618,8 +616,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mDebugLines = mFeatureFlags.isEnabled(Flags.NSSL_DEBUG_LINES);
        mDebugRemoveAnimation = mFeatureFlags.isEnabled(Flags.NSSL_DEBUG_REMOVE_ANIMATION);
        mSensitiveRevealAnimEndabled = mFeatureFlags.isEnabled(Flags.SENSITIVE_REVEAL_ANIM);
        mAnimatedInsets =
                new RefactorFlag(mFeatureFlags, Flags.ANIMATED_NOTIFICATION_SHADE_INSETS);
        mSectionsManager = Dependency.get(NotificationSectionsManager.class);
        mScreenOffAnimationController =
                Dependency.get(ScreenOffAnimationController.class);
@@ -654,10 +650,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mGroupMembershipManager = Dependency.get(GroupMembershipManager.class);
        mGroupExpansionManager = Dependency.get(GroupExpansionManager.class);
        setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
        if (mAnimatedInsets.isEnabled()) {
        setWindowInsetsAnimationCallback(mInsetsCallback);
    }
    }

    /**
     * Set the overexpansion of the panel to be applied to the view.
@@ -1733,11 +1727,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            return;
        }
        mForcedScroll = v;
        if (mAnimatedInsets.isEnabled()) {
        updateForcedScroll();
        } else {
            scrollTo(v);
        }
    }

    public boolean scrollTo(View v) {
@@ -1782,31 +1772,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable

    @Override
    public WindowInsets onApplyWindowInsets(WindowInsets insets) {
        if (!mAnimatedInsets.isEnabled()) {
            mBottomInset = insets.getInsets(WindowInsets.Type.ime()).bottom;
        }
        mWaterfallTopInset = 0;
        final DisplayCutout cutout = insets.getDisplayCutout();
        if (cutout != null) {
            mWaterfallTopInset = cutout.getWaterfallInsets().top;
        }
        if (mAnimatedInsets.isEnabled() && !mIsInsetAnimationRunning) {
        if (!mIsInsetAnimationRunning) {
            // update bottom inset e.g. after rotation
            updateBottomInset(insets);
        }
        if (!mAnimatedInsets.isEnabled()) {
            int range = getScrollRange();
            if (mOwnScrollY > range) {
                // HACK: We're repeatedly getting staggered insets here while the IME is
                // animating away. To work around that we'll wait until things have settled.
                removeCallbacks(mReclamp);
                postDelayed(mReclamp, 50);
            } else if (mForcedScroll != null) {
                // The scroll was requested before we got the actual inset - in case we need
                // to scroll up some more do so now.
                scrollTo(mForcedScroll);
            }
        }
        return insets;
    }

+0 −1
Original line number Diff line number Diff line
@@ -169,7 +169,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        //  and then we would test both configurations, but currently they are all read
        //  in the constructor.
        mFeatureFlags.setDefault(Flags.SENSITIVE_REVEAL_ANIM);
        mFeatureFlags.setDefault(Flags.ANIMATED_NOTIFICATION_SHADE_INSETS);
        mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION);
        mFeatureFlags.setDefault(Flags.UNCLEARED_TRANSIENT_HUN_FIX);