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

Commit 3808adc5 authored by Mady Mellor's avatar Mady Mellor
Browse files

Don't show the app badge on app bubbles

Flag: com.android.wm.shell.enable_bubble_anything
Test: manual - add an app bubble to bubble bar, observe it's not
               badged (with sysui CL)
Bug: 342245211
Change-Id: I768fa9bb478eeaba587b90d478f32f8c2ee88be1
parent dd981d78
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -237,7 +237,11 @@ public class BubbleView extends ConstraintLayout {
        mBubble = bubble;
        mIcon = bubble.getIcon();
        updateBubbleIcon();
        if (bubble.getInfo().showAppBadge()) {
            mAppIcon.setImageBitmap(bubble.getBadge());
        } else {
            mAppIcon.setVisibility(GONE);
        }
        mDotColor = bubble.getDotColor();
        mDotRenderer = new DotRenderer(mBubbleSize, bubble.getDotPath(), DEFAULT_PATH_SIZE);
        String contentDesc = bubble.getInfo().getTitle();
@@ -302,9 +306,11 @@ public class BubbleView extends ConstraintLayout {
    }

    void setBadgeScale(float fraction) {
        if (mAppIcon.getVisibility() == VISIBLE) {
            mAppIcon.setScaleX(fraction);
            mAppIcon.setScaleY(fraction);
        }
    }

    boolean hasUnseenContent() {
        return mBubble != null
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) {
        val flags =
            if (suppressNotification) Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION else 0
        val bubbleInfo =
            BubbleInfo("key", flags, null, null, 0, context.packageName, null, null, false)
            BubbleInfo("key", flags, null, null, 0, context.packageName, null, null, false, true)
        val bubbleView = inflater.inflate(R.layout.bubblebar_item_view, null) as BubbleView
        val dotPath =
            PathParser.createPathFromPathData(
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class BubbleViewTest {
            overflowView.setOverflow(BubbleBarOverflow(overflowView), bitmap)

            val bubbleInfo =
                BubbleInfo("key", 0, null, null, 0, context.packageName, null, null, false)
                BubbleInfo("key", 0, null, null, 0, context.packageName, null, null, false, true)
            bubbleView = inflater.inflate(R.layout.bubblebar_item_view, null, false) as BubbleView
            bubble =
                BubbleBarBubble(bubbleInfo, bubbleView, bitmap, bitmap, Color.WHITE, Path(), "")
+1 −1
Original line number Diff line number Diff line
@@ -870,7 +870,7 @@ class BubbleBarViewAnimatorTest {
            bubbleBarView.addView(overflowView)

            val bubbleInfo =
                BubbleInfo("key", 0, null, null, 0, context.packageName, null, null, false)
                BubbleInfo("key", 0, null, null, 0, context.packageName, null, null, false, true)
            bubbleView =
                inflater.inflate(R.layout.bubblebar_item_view, bubbleBarView, false) as BubbleView
            bubble =