Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExperimentConfig.java +0 −13 Original line number Diff line number Diff line Loading @@ -73,9 +73,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 = false; /** * 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} Loading Loading @@ -130,16 +127,6 @@ public class BubbleExperimentConfig { return false; } /** * When true, show a menu when a bubble is long-pressed, which will allow the user to take * actions on that bubble. */ static boolean allowBubbleOverflow(Context context) { return Settings.Secure.getInt(context.getContentResolver(), ALLOW_BUBBLE_OVERFLOW, ALLOW_BUBBLE_OVERFLOW_DEFAULT ? 1 : 0) != 0; } /** * If {@link #allowAnyNotifToBubble(Context)} is true, this method creates and adds * {@link android.app.Notification.BubbleMetadata} to the notification entry as long as Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +4 −15 Original line number Diff line number Diff line Loading @@ -520,9 +520,6 @@ public class BubbleStackView extends FrameLayout { } private void setUpOverflow() { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { return; } int overflowBtnIndex = 0; if (mBubbleOverflow == null) { mBubbleOverflow = new BubbleOverflow(mContext); Loading Loading @@ -733,8 +730,7 @@ public class BubbleStackView extends FrameLayout { @Nullable Bubble getExpandedBubble() { if (mExpandedBubble == null || (BubbleExperimentConfig.allowBubbleOverflow(mContext) && mExpandedBubble.getIconView() == mBubbleOverflow.getBtn() || (mExpandedBubble.getIconView() == mBubbleOverflow.getBtn() && mExpandedBubble.getKey() == BubbleOverflow.KEY)) { return null; } Loading Loading @@ -785,9 +781,6 @@ public class BubbleStackView extends FrameLayout { } private void updateOverflowBtnVisibility(boolean apply) { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { return; } if (mIsExpanded) { if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "Show overflow button."); Loading Loading @@ -911,8 +904,7 @@ public class BubbleStackView extends FrameLayout { float y = event.getRawY(); if (mIsExpanded) { if (isIntersecting(mBubbleContainer, x, y)) { if (BubbleExperimentConfig.allowBubbleOverflow(mContext) && isIntersecting(mBubbleOverflow.getBtn(), x, y)) { if (isIntersecting(mBubbleOverflow.getBtn(), x, y)) { return mBubbleOverflow.getBtn(); } // Could be tapping or dragging a bubble while expanded Loading Loading @@ -1645,12 +1637,9 @@ 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 which 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(); } /** * Finds the bubble index within the stack. Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExperimentConfig.java +0 −13 Original line number Diff line number Diff line Loading @@ -73,9 +73,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 = false; /** * 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} Loading Loading @@ -130,16 +127,6 @@ public class BubbleExperimentConfig { return false; } /** * When true, show a menu when a bubble is long-pressed, which will allow the user to take * actions on that bubble. */ static boolean allowBubbleOverflow(Context context) { return Settings.Secure.getInt(context.getContentResolver(), ALLOW_BUBBLE_OVERFLOW, ALLOW_BUBBLE_OVERFLOW_DEFAULT ? 1 : 0) != 0; } /** * If {@link #allowAnyNotifToBubble(Context)} is true, this method creates and adds * {@link android.app.Notification.BubbleMetadata} to the notification entry as long as Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +4 −15 Original line number Diff line number Diff line Loading @@ -520,9 +520,6 @@ public class BubbleStackView extends FrameLayout { } private void setUpOverflow() { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { return; } int overflowBtnIndex = 0; if (mBubbleOverflow == null) { mBubbleOverflow = new BubbleOverflow(mContext); Loading Loading @@ -733,8 +730,7 @@ public class BubbleStackView extends FrameLayout { @Nullable Bubble getExpandedBubble() { if (mExpandedBubble == null || (BubbleExperimentConfig.allowBubbleOverflow(mContext) && mExpandedBubble.getIconView() == mBubbleOverflow.getBtn() || (mExpandedBubble.getIconView() == mBubbleOverflow.getBtn() && mExpandedBubble.getKey() == BubbleOverflow.KEY)) { return null; } Loading Loading @@ -785,9 +781,6 @@ public class BubbleStackView extends FrameLayout { } private void updateOverflowBtnVisibility(boolean apply) { if (!BubbleExperimentConfig.allowBubbleOverflow(mContext)) { return; } if (mIsExpanded) { if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "Show overflow button."); Loading Loading @@ -911,8 +904,7 @@ public class BubbleStackView extends FrameLayout { float y = event.getRawY(); if (mIsExpanded) { if (isIntersecting(mBubbleContainer, x, y)) { if (BubbleExperimentConfig.allowBubbleOverflow(mContext) && isIntersecting(mBubbleOverflow.getBtn(), x, y)) { if (isIntersecting(mBubbleOverflow.getBtn(), x, y)) { return mBubbleOverflow.getBtn(); } // Could be tapping or dragging a bubble while expanded Loading Loading @@ -1645,12 +1637,9 @@ 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 which 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(); } /** * Finds the bubble index within the stack. Loading