Merge "Remove overflow experiment flags" into rvc-dev am: c25e26ae8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11964765 Change-Id: I83c0a677c978305d3adf51e39fed1c9024d5d3a9
This commit is contained in:
@@ -70,9 +70,6 @@ public class BubbleExperimentConfig {
|
|||||||
|
|
||||||
private static final String WHITELISTED_AUTO_BUBBLE_APPS = "whitelisted_auto_bubble_apps";
|
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
|
* 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}
|
* 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;
|
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
|
* Same as {@link #allowAnyNotifToBubble(Context)} except it filters for notifications that
|
||||||
* are using {@link Notification.MessagingStyle} and have remote input.
|
* are using {@link Notification.MessagingStyle} and have remote input.
|
||||||
|
|||||||
@@ -1152,9 +1152,6 @@ public class BubbleStackView extends FrameLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setUpOverflow() {
|
private void setUpOverflow() {
|
||||||
if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int overflowBtnIndex = 0;
|
int overflowBtnIndex = 0;
|
||||||
if (mBubbleOverflow == null) {
|
if (mBubbleOverflow == null) {
|
||||||
mBubbleOverflow = new BubbleOverflow(getContext());
|
mBubbleOverflow = new BubbleOverflow(getContext());
|
||||||
@@ -1520,8 +1517,7 @@ public class BubbleStackView extends FrameLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateOverflowVisibility() {
|
private void updateOverflowVisibility() {
|
||||||
if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)
|
if (mBubbleOverflow == null) {
|
||||||
|| mBubbleOverflow == null) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mBubbleOverflow.setVisible(mIsExpanded ? VISIBLE : GONE);
|
mBubbleOverflow.setVisible(mIsExpanded ? VISIBLE : GONE);
|
||||||
@@ -2778,11 +2774,8 @@ public class BubbleStackView extends FrameLayout
|
|||||||
* @return the number of bubbles in the stack view.
|
* @return the number of bubbles in the stack view.
|
||||||
*/
|
*/
|
||||||
public int getBubbleCount() {
|
public int getBubbleCount() {
|
||||||
if (BubbleExperimentConfig.allowBubbleOverflow(mContext)) {
|
// Subtract 1 for the overflow button that is always in the bubble container.
|
||||||
// Subtract 1 for the overflow button that is always in the bubble container.
|
return mBubbleContainer.getChildCount() - 1;
|
||||||
return mBubbleContainer.getChildCount() - 1;
|
|
||||||
}
|
|
||||||
return mBubbleContainer.getChildCount();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user