From 437dfac051d0095ec306a7a69701fd12f141b36b Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Mon, 22 Jun 2020 18:45:54 -0700 Subject: [PATCH] Remove overflow experiment flags Bug: 138116789 Test: atest Change-Id: Ie6744c08f1b89aa0f2b5ea5a09cc63fb6e2d8bd2 --- .../systemui/bubbles/BubbleExperimentConfig.java | 12 ------------ .../android/systemui/bubbles/BubbleStackView.java | 13 +++---------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExperimentConfig.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExperimentConfig.java index a888bd57c699d..ffb650d620648 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExperimentConfig.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExperimentConfig.java @@ -70,9 +70,6 @@ public class BubbleExperimentConfig { private static final String WHITELISTED_AUTO_BUBBLE_APPS = "whitelisted_auto_bubble_apps"; - private static final String ALLOW_BUBBLE_OVERFLOW = "allow_bubble_overflow"; - private static final boolean ALLOW_BUBBLE_OVERFLOW_DEFAULT = true; - /** * When true, if a notification has the information necessary to bubble (i.e. valid * contentIntent and an icon or image), then a {@link android.app.Notification.BubbleMetadata} @@ -86,15 +83,6 @@ public class BubbleExperimentConfig { ALLOW_ANY_NOTIF_TO_BUBBLE_DEFAULT ? 1 : 0) != 0; } - /** - * When true, show a menu with dismissed and aged-out bubbles. - */ - static boolean allowBubbleOverflow(Context context) { - return Settings.Secure.getInt(context.getContentResolver(), - ALLOW_BUBBLE_OVERFLOW, - ALLOW_BUBBLE_OVERFLOW_DEFAULT ? 1 : 0) != 0; - } - /** * Same as {@link #allowAnyNotifToBubble(Context)} except it filters for notifications that * are using {@link Notification.MessagingStyle} and have remote input. diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index c985b083f9a9e..9b1646e49aa45 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -1145,9 +1145,6 @@ public class BubbleStackView extends FrameLayout } private void setUpOverflow() { - if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { - return; - } int overflowBtnIndex = 0; if (mBubbleOverflow == null) { mBubbleOverflow = new BubbleOverflow(getContext()); @@ -1512,8 +1509,7 @@ public class BubbleStackView extends FrameLayout } private void updateOverflowVisibility() { - if (!BubbleExperimentConfig.allowBubbleOverflow(mContext) - || mBubbleOverflow == null) { + if (mBubbleOverflow == null) { return; } mBubbleOverflow.setVisible(mIsExpanded ? VISIBLE : GONE); @@ -2754,11 +2750,8 @@ public class BubbleStackView extends FrameLayout * @return the number of bubbles in the stack view. */ public int getBubbleCount() { - if (BubbleExperimentConfig.allowBubbleOverflow(mContext)) { - // Subtract 1 for the overflow button that is always in the bubble container. - return mBubbleContainer.getChildCount() - 1; - } - return mBubbleContainer.getChildCount(); + // Subtract 1 for the overflow button that is always in the bubble container. + return mBubbleContainer.getChildCount() - 1; } /**