Loading res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -8241,6 +8241,10 @@ <string name="bubble_app_setting_selected_conversation_title">Conversations</string> <!-- Bubble app settings: Title above a list of conversations that have been excluded from bubbling [CHAR LIMIT=100] --> <string name="bubble_app_setting_excluded_conversation_title">All conversations can bubble except</string> <!-- Bubble app settings: Content description - action to make a conversation no longer bubble --> <string name="bubble_app_setting_unbubble_conversation">Turn off bubbles for this conversation</string> <!-- Bubble app settings: Content description - action to make a conversation bubble --> <string name="bubble_app_setting_bubble_conversation">Turn on bubbles for this conversation</string> <!-- Configure notifications: title for swipe direction [CHAR LIMIT=60] --> <string name="swipe_direction_title">Swipe actions</string> src/com/android/settings/notification/AppBubbleListPreferenceController.java +9 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer public Preference createConversationPref(final ConversationChannelWrapper conversation) { final ConversationPreference pref = new ConversationPreference(mContext); populateConversationPreference(conversation, pref); pref.setOnClickBubblesConversation(mAppRow.bubblePreference == BUBBLE_PREFERENCE_ALL); pref.setOnClickListener((v) -> { conversation.getNotificationChannel().setAllowBubbles(DEFAULT_ALLOW_BUBBLE); mBackend.updateChannel(mAppRow.pkg, mAppRow.uid, conversation.getNotificationChannel()); Loading @@ -127,6 +128,7 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer public static class ConversationPreference extends Preference implements View.OnClickListener { View.OnClickListener mOnClickListener; boolean mOnClickBubbles; ConversationPreference(Context context) { super(context); Loading @@ -137,9 +139,16 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer public void onBindViewHolder(final PreferenceViewHolder holder) { super.onBindViewHolder(holder); ImageView view = holder.itemView.findViewById(R.id.button); view.setContentDescription(mOnClickBubbles ? getContext().getString(R.string.bubble_app_setting_bubble_conversation) : getContext().getString(R.string.bubble_app_setting_unbubble_conversation)); view.setOnClickListener(mOnClickListener); } public void setOnClickBubblesConversation(boolean enablesBubbles) { mOnClickBubbles = enablesBubbles; } public void setOnClickListener(View.OnClickListener listener) { mOnClickListener = listener; } Loading Loading
res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -8241,6 +8241,10 @@ <string name="bubble_app_setting_selected_conversation_title">Conversations</string> <!-- Bubble app settings: Title above a list of conversations that have been excluded from bubbling [CHAR LIMIT=100] --> <string name="bubble_app_setting_excluded_conversation_title">All conversations can bubble except</string> <!-- Bubble app settings: Content description - action to make a conversation no longer bubble --> <string name="bubble_app_setting_unbubble_conversation">Turn off bubbles for this conversation</string> <!-- Bubble app settings: Content description - action to make a conversation bubble --> <string name="bubble_app_setting_bubble_conversation">Turn on bubbles for this conversation</string> <!-- Configure notifications: title for swipe direction [CHAR LIMIT=60] --> <string name="swipe_direction_title">Swipe actions</string>
src/com/android/settings/notification/AppBubbleListPreferenceController.java +9 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer public Preference createConversationPref(final ConversationChannelWrapper conversation) { final ConversationPreference pref = new ConversationPreference(mContext); populateConversationPreference(conversation, pref); pref.setOnClickBubblesConversation(mAppRow.bubblePreference == BUBBLE_PREFERENCE_ALL); pref.setOnClickListener((v) -> { conversation.getNotificationChannel().setAllowBubbles(DEFAULT_ALLOW_BUBBLE); mBackend.updateChannel(mAppRow.pkg, mAppRow.uid, conversation.getNotificationChannel()); Loading @@ -127,6 +128,7 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer public static class ConversationPreference extends Preference implements View.OnClickListener { View.OnClickListener mOnClickListener; boolean mOnClickBubbles; ConversationPreference(Context context) { super(context); Loading @@ -137,9 +139,16 @@ public class AppBubbleListPreferenceController extends AppConversationListPrefer public void onBindViewHolder(final PreferenceViewHolder holder) { super.onBindViewHolder(holder); ImageView view = holder.itemView.findViewById(R.id.button); view.setContentDescription(mOnClickBubbles ? getContext().getString(R.string.bubble_app_setting_bubble_conversation) : getContext().getString(R.string.bubble_app_setting_unbubble_conversation)); view.setOnClickListener(mOnClickListener); } public void setOnClickBubblesConversation(boolean enablesBubbles) { mOnClickBubbles = enablesBubbles; } public void setOnClickListener(View.OnClickListener listener) { mOnClickListener = listener; } Loading