diff --git a/libs/WindowManager/Shell/res/layout/bubble_manage_menu.xml b/libs/WindowManager/Shell/res/layout/bubble_manage_menu.xml
index 8d1da0f7ad1b3..298ad3025b00d 100644
--- a/libs/WindowManager/Shell/res/layout/bubble_manage_menu.xml
+++ b/libs/WindowManager/Shell/res/layout/bubble_manage_menu.xml
@@ -63,11 +63,11 @@
android:tint="@color/bubbles_icon_tint"/>
+ android:textAppearance="@*android:style/TextAppearance.DeviceDefault"
+ android:text="@string/bubbles_dont_bubble_conversation" />
diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml
index 87a7c3edf8260..b192fdf245e2c 100644
--- a/libs/WindowManager/Shell/res/values/strings.xml
+++ b/libs/WindowManager/Shell/res/values/strings.xml
@@ -146,8 +146,6 @@
%1$s settings
Dismiss bubble
-
- Don\u2019t bubble
Don\u2019t bubble conversation
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index 66241628fc779..1b20f67e42abf 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -842,7 +842,7 @@ public class BubbleStackView extends FrameLayout
private DismissView mDismissView;
private ViewGroup mManageMenu;
- private TextView mManageDontBubbleText;
+ private ViewGroup mManageDontBubbleView;
private ViewGroup mManageSettingsView;
private ImageView mManageSettingsIcon;
private TextView mManageSettingsText;
@@ -1217,8 +1217,8 @@ public class BubbleStackView extends FrameLayout
mUnbubbleConversationCallback.accept(mBubbleData.getSelectedBubble().getKey());
});
- mManageDontBubbleText = mManageMenu
- .findViewById(R.id.bubble_manage_menu_dont_bubble_text);
+ mManageDontBubbleView = mManageMenu
+ .findViewById(R.id.bubble_manage_menu_dont_bubble_container);
mManageSettingsView = mManageMenu.findViewById(R.id.bubble_manage_menu_settings_container);
mManageSettingsView.setOnClickListener(
@@ -2890,14 +2890,16 @@ public class BubbleStackView extends FrameLayout
final Bubble bubble = mBubbleData.getBubbleInStackWithKey(mExpandedBubble.getKey());
if (bubble != null && !bubble.isAppBubble()) {
// Setup options for non app bubbles
- mManageDontBubbleText.setText(R.string.bubbles_dont_bubble_conversation);
+ mManageDontBubbleView.setVisibility(VISIBLE);
mManageSettingsIcon.setImageBitmap(bubble.getRawAppBadge());
mManageSettingsText.setText(getResources().getString(
R.string.bubbles_app_settings, bubble.getAppName()));
mManageSettingsView.setVisibility(VISIBLE);
} else {
// Setup options for app bubbles
- mManageDontBubbleText.setText(R.string.bubbles_dont_bubble);
+ // App bubbles have no conversations
+ // so we don't show the option to not bubble conversation
+ mManageDontBubbleView.setVisibility(GONE);
// App bubbles are not notification based
// so we don't show the option to go to notification settings
mManageSettingsView.setVisibility(GONE);
@@ -2965,6 +2967,15 @@ public class BubbleStackView extends FrameLayout
}
}
+ /**
+ * Checks whether manage menu don't bubble conversation action is available and visible
+ * Used for testing
+ */
+ @VisibleForTesting
+ public boolean isManageMenuDontBubbleVisible() {
+ return mManageDontBubbleView != null && mManageDontBubbleView.getVisibility() == VISIBLE;
+ }
+
/**
* Checks whether manage menu notification settings action is available and visible
* Used for testing
diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
index e82456524012a..a42acd3464ba2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
@@ -1257,6 +1257,7 @@ public class BubblesTest extends SysuiTestCase {
stackView.showManageMenu(true);
assertSysuiStates(true /* stackExpanded */, true /* mangeMenuExpanded */);
assertTrue(stackView.isManageMenuSettingsVisible());
+ assertTrue(stackView.isManageMenuDontBubbleVisible());
}
@Test
@@ -1274,6 +1275,7 @@ public class BubblesTest extends SysuiTestCase {
stackView.showManageMenu(true);
assertSysuiStates(true /* stackExpanded */, true /* mangeMenuExpanded */);
assertFalse(stackView.isManageMenuSettingsVisible());
+ assertFalse(stackView.isManageMenuDontBubbleVisible());
}
@Test