summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff DeCew <jeffdq@google.com> 2024-03-06 19:23:08 +0000
committer Jeff DeCew <jeffdq@google.com> 2024-03-08 14:09:25 +0000
commitc09eeda49995aaa4d7128fa228102e3aa5f77ecb (patch)
tree78b4f84e4592113b81199ef7ce5a1f90800b4c90
parentb6615b0d8dd27afc80786774b61675caae540fc2 (diff)
Clean up ANIMATED_NOTIFICATION_SHADE_INSETS flag
Fix: 270682168 Test: atest SystemUITests Flag: LEGACY ANIMATED_NOTIFICATION_SHADE_INSETS ENABLED Change-Id: I8aef4238b921c03fe992c3fa224a465bfbf5ed5e
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java32
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java1
3 files changed, 3 insertions, 34 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 29e09d58d58f..e24a03116892 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -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")
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index bfda6d5ca2c9..2b500ffe7a13 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -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,9 +650,7 @@ 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);
- }
+ setWindowInsetsAnimationCallback(mInsetsCallback);
}
/**
@@ -1733,11 +1727,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
return;
}
mForcedScroll = v;
- if (mAnimatedInsets.isEnabled()) {
- updateForcedScroll();
- } else {
- scrollTo(v);
- }
+ updateForcedScroll();
}
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;
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
index 28dfbbb64777..a6650257184b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
@@ -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);