From d107f6266155a22d189c29d6bd22ee0c1ee608cf Mon Sep 17 00:00:00 2001 From: Sergey Serokurov Date: Thu, 23 Jun 2022 20:39:36 -0700 Subject: [PATCH] Check if apps allowed to show bubbles Bug: 228132134 Test: atest SystemUITests Change-Id: I0f29dcb9965345ef0df82779b1e12eca13f220c4 --- .../notification/row/NotificationConversationInfo.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java index 134f24e7e6464..27aa4b38e0bac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java @@ -266,9 +266,14 @@ public class NotificationConversationInfo extends LinearLayout implements snooze.setOnClickListener(mOnSnoozeClick); */ - if (mAppBubble == BUBBLE_PREFERENCE_ALL) { - ((TextView) findViewById(R.id.default_summary)).setText(getResources().getString( + TextView defaultSummaryTextView = findViewById(R.id.default_summary); + if (mAppBubble == BUBBLE_PREFERENCE_ALL + && BubblesManager.areBubblesEnabled(mContext, mSbn.getUser())) { + defaultSummaryTextView.setText(getResources().getString( R.string.notification_channel_summary_default_with_bubbles, mAppName)); + } else { + defaultSummaryTextView.setText(getResources().getString( + R.string.notification_channel_summary_default)); } findViewById(R.id.priority).setOnClickListener(mOnFavoriteClick);