Update conversation-related strings
Test: atest Bug: 157215227 Change-Id: Iba279bb285e53918a1e1b43c04d6ec7576cd48a0
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:maxLines="3"
|
||||
android:layout_below="@id/priority_icon"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
|
||||
android:visibility="gone" />
|
||||
@@ -143,7 +143,7 @@
|
||||
<TextView
|
||||
android:id="@+id/silence_summary"
|
||||
android:paddingTop="@dimen/notification_importance_button_padding"
|
||||
android:text="@string/notification_channel_summary_low"
|
||||
android:text="@string/notification_conversation_summary_low"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
|
@@ -8305,13 +8305,13 @@
|
||||
|
||||
<!-- Configure notifications: Value for lockscreen notifications: all notifications shown
|
||||
regardless of noisiness [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_show_all">Show alerting and silent notifications</string>
|
||||
<string name="lock_screen_notifs_show_all">Show conversations, default, and silent</string>
|
||||
|
||||
<!-- Configure notifications: Value for lockscreen notifications: show alerting notifications [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_show_alerting">Show alerting notifications only</string>
|
||||
<string name="lock_screen_notifs_show_alerting">Hide silent conversations and notifications</string>
|
||||
|
||||
<!-- Configure notifications: Value for lockscreen notifications: don't show notifications [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_show_none">Don\u2019t show notifications</string>
|
||||
<string name="lock_screen_notifs_show_none">Don\u2019t show any notifications</string>
|
||||
|
||||
<!-- Configure notifications: Title for redacting sensitive content on lockscreen [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_redact">Sensitive notifications</string>
|
||||
@@ -8395,7 +8395,7 @@
|
||||
<string name="conversation_section_switch_title">Conversation section</string>
|
||||
|
||||
<!-- [CHAR LIMIT=100] Summary for switch that says whether this app can appear in the conversation notification section-->
|
||||
<string name="conversation_section_switch_summary">Allow <xliff:g id="app">%1$s</xliff:g> to appear in the conversation section</string>
|
||||
<string name="conversation_section_switch_summary">Allow app to use conversation section</string>
|
||||
|
||||
<!-- [CHAR LIMIT=NONE] Conversation preference summary, the parent channel this conversation was spawned from (separator) the parent channel group (e.g. an account name)-->
|
||||
<string name="notification_conversation_summary" translatable="false">"<xliff:g id="parent_category_name">%1$s</xliff:g> • <xliff:g id="parent_category_group_name">%2$s</xliff:g>"</string>
|
||||
@@ -8434,7 +8434,7 @@
|
||||
<string name="important_conversations_summary">Show at top of conversation section</string>
|
||||
|
||||
<!-- [CHAR LIMIT=100] preference category title -->
|
||||
<string name="other_conversations">Modified conversations</string>
|
||||
<string name="other_conversations">Other conversations</string>
|
||||
|
||||
<!-- summary for other conversations list -->
|
||||
<string name="other_conversations_summary">Conversations you\u2019ve made changes to</string>
|
||||
@@ -8494,7 +8494,7 @@
|
||||
<string name="notification_silence_title">Silent</string>
|
||||
|
||||
<!-- [CHAR LIMIT=100] Notification Importance title -->
|
||||
<string name="notification_alert_title">Alerting</string>
|
||||
<string name="notification_alert_title">Default</string>
|
||||
|
||||
<!-- [CHAR LIMIT=40] Notification importance title. This setting controls how notifications in older apps may alert the user (eg, sound, visual, vibrate). -->
|
||||
<string name="allow_interruption">Allow interruptions</string>
|
||||
@@ -8506,9 +8506,9 @@
|
||||
<string name="notification_priority_title">Priority</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: important conversation level summary -->
|
||||
<string name="notification_channel_summary_priority">Shows at top of conversation section and appears as a bubble</string>
|
||||
<string name="notification_channel_summary_priority">Shows at top of conversation section, appears as floating bubble, displays profile picture on lock screen</string>
|
||||
|
||||
<string name="convo_not_supported_summary"><xliff:g id="app_name" example="Android Services">%1$s</xliff:g> does not support conversation-specific settings.</string>
|
||||
<string name="convo_not_supported_summary"><xliff:g id="app_name" example="Android Services">%1$s</xliff:g> doesn\u2019t support most conversation features. You can’t set a conversation as priority, and conversations won’t appear as floating bubbles.</string>
|
||||
|
||||
<!-- Channel summaries for the app notification page -->
|
||||
|
||||
@@ -8516,10 +8516,13 @@
|
||||
<string name="notification_channel_summary_min">In the pull-down shade, collapse notifications to one line</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: low importance level summary -->
|
||||
<string name="notification_channel_summary_low">Helps you focus without sound or vibration</string>
|
||||
<string name="notification_channel_summary_low">No sound or vibration</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: low importance level summary -->
|
||||
<string name="notification_conversation_summary_low">No sound or vibration and appears lower in conversation section</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: normal importance level summary -->
|
||||
<string name="notification_channel_summary_default">Gets your attention with sound or vibration</string>
|
||||
<string name="notification_channel_summary_default">May ring or vibrate based on phone settings</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: high importance level summary -->
|
||||
<string name="notification_channel_summary_high">When device is unlocked, show notifications as a banner across the top of the screen</string>
|
||||
@@ -8850,7 +8853,7 @@
|
||||
<string name="notification_channel_sound_title">Sound</string>
|
||||
|
||||
<!-- [CHAR LIMIT=180] Notification conversation: important -->
|
||||
<string name="notification_conversation_important">Important</string>
|
||||
<string name="notification_conversation_important">Priority</string>
|
||||
|
||||
<!-- [CHAR LIMIT=180] Notification conversation: add to home screen -->
|
||||
<string name="notification_conversation_add_to_home">Add to home</string>
|
||||
|
@@ -23,6 +23,7 @@ import android.service.notification.ConversationChannelWrapper;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.notification.NotificationBackend;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -49,6 +50,14 @@ public class AllConversationsPreferenceController extends ConversationListPrefer
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
Preference getSummaryPreference() {
|
||||
Preference pref = new Preference(mContext);
|
||||
pref.setOrder(1);
|
||||
pref.setSummary(R.string.other_conversations_summary);
|
||||
return pref;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
||||
return !conversation.getNotificationChannel().isImportantConversation();
|
||||
|
@@ -73,24 +73,33 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe
|
||||
containerGroup.setVisible(false);
|
||||
} else {
|
||||
containerGroup.setVisible(true);
|
||||
Preference summaryPref = getSummaryPreference();
|
||||
if (summaryPref != null) {
|
||||
containerGroup.addPreference(summaryPref);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
abstract Preference getSummaryPreference();
|
||||
|
||||
abstract boolean matchesFilter(ConversationChannelWrapper conversation);
|
||||
|
||||
protected void populateConversations(List<ConversationChannelWrapper> conversations,
|
||||
PreferenceGroup containerGroup) {
|
||||
int order = 100;
|
||||
for (ConversationChannelWrapper conversation : conversations) {
|
||||
if (conversation.getNotificationChannel().isDemoted()
|
||||
|| !matchesFilter(conversation)) {
|
||||
continue;
|
||||
}
|
||||
containerGroup.addPreference(createConversationPref(conversation));
|
||||
containerGroup.addPreference(createConversationPref(conversation, order++));
|
||||
}
|
||||
}
|
||||
|
||||
protected Preference createConversationPref(final ConversationChannelWrapper conversation) {
|
||||
protected Preference createConversationPref(final ConversationChannelWrapper conversation,
|
||||
int order) {
|
||||
Preference pref = new Preference(mContext);
|
||||
pref.setOrder(order);
|
||||
|
||||
pref.setTitle(getTitle(conversation));
|
||||
pref.setSummary(getSummary(conversation));
|
||||
|
@@ -59,8 +59,7 @@ public class InvalidConversationPreferenceController extends NotificationPrefere
|
||||
pref.setDisabledByAdmin(mAdmin);
|
||||
pref.setEnabled(!pref.isDisabledByAdmin());
|
||||
pref.setChecked(!mBackend.hasUserDemotedInvalidMsgApp(mAppRow.pkg, mAppRow.uid));
|
||||
preference.setSummary(mContext.getString(
|
||||
R.string.conversation_section_switch_summary, mAppRow.label));
|
||||
preference.setSummary(mContext.getString(R.string.conversation_section_switch_summary));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -50,6 +50,11 @@ public class NoConversationsPreferenceController extends ConversationListPrefere
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
Preference getSummaryPreference() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
||||
return false;
|
||||
|
@@ -23,6 +23,7 @@ import android.service.notification.ConversationChannelWrapper;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.notification.NotificationBackend;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -49,6 +50,14 @@ public class PriorityConversationsPreferenceController extends
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
Preference getSummaryPreference() {
|
||||
Preference pref = new Preference(mContext);
|
||||
pref.setOrder(1);
|
||||
pref.setSummary(R.string.important_conversations_summary_bubbles);
|
||||
return pref;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
||||
return conversation.getNotificationChannel().isImportantConversation();
|
||||
|
@@ -34,6 +34,7 @@ import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.service.notification.ConversationChannelWrapper;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
@@ -225,5 +226,10 @@ public class ConversationListPreferenceControllerTest {
|
||||
public String getPreferenceKey() {
|
||||
return "test";
|
||||
}
|
||||
|
||||
@Override
|
||||
Preference getSummaryPreference() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user