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

Commit 669445f7 authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Don't show the app badge on app bubbles" into main

parents f24aea0f 3808adc5
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 =