Update conversation-related strings am: 9e78ec75d1
Change-Id: I11b6a55cffee069a1aef0df8d2ca9be0ca141161
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="3"
|
||||||
android:layout_below="@id/priority_icon"
|
android:layout_below="@id/priority_icon"
|
||||||
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
|
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/silence_summary"
|
android:id="@+id/silence_summary"
|
||||||
android:paddingTop="@dimen/notification_importance_button_padding"
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
@@ -8301,17 +8301,17 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Configure notifications: Title for determining which notifications appear on the lock screen [CHAR LIMIT=60] -->
|
<!-- Configure notifications: Title for determining which notifications appear on the lock screen [CHAR LIMIT=60] -->
|
||||||
<string name="lock_screen_notifs_title">Notifications on lockscreen</string>
|
<string name="lock_screen_notifs_title">Notifications on lock screen</string>
|
||||||
|
|
||||||
<!-- Configure notifications: Value for lockscreen notifications: all notifications shown
|
<!-- Configure notifications: Value for lockscreen notifications: all notifications shown
|
||||||
regardless of noisiness [CHAR LIMIT=60] -->
|
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] -->
|
<!-- 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] -->
|
<!-- 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] -->
|
<!-- Configure notifications: Title for redacting sensitive content on lockscreen [CHAR LIMIT=60] -->
|
||||||
<string name="lock_screen_notifs_redact">Sensitive notifications</string>
|
<string name="lock_screen_notifs_redact">Sensitive notifications</string>
|
||||||
@@ -8395,7 +8395,7 @@
|
|||||||
<string name="conversation_section_switch_title">Conversation section</string>
|
<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-->
|
<!-- [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)-->
|
<!-- [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>
|
<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>
|
<string name="important_conversations_summary">Show at top of conversation section</string>
|
||||||
|
|
||||||
<!-- [CHAR LIMIT=100] preference category title -->
|
<!-- [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 -->
|
<!-- summary for other conversations list -->
|
||||||
<string name="other_conversations_summary">Conversations you\u2019ve made changes to</string>
|
<string name="other_conversations_summary">Conversations you\u2019ve made changes to</string>
|
||||||
@@ -8494,7 +8494,7 @@
|
|||||||
<string name="notification_silence_title">Silent</string>
|
<string name="notification_silence_title">Silent</string>
|
||||||
|
|
||||||
<!-- [CHAR LIMIT=100] Notification Importance title -->
|
<!-- [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). -->
|
<!-- [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>
|
<string name="allow_interruption">Allow interruptions</string>
|
||||||
@@ -8506,9 +8506,9 @@
|
|||||||
<string name="notification_priority_title">Priority</string>
|
<string name="notification_priority_title">Priority</string>
|
||||||
|
|
||||||
<!-- [CHAR LIMIT=150] Notification Importance title: important conversation level summary -->
|
<!-- [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 -->
|
<!-- 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>
|
<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 -->
|
<!-- [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 -->
|
<!-- [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 -->
|
<!-- [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>
|
<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>
|
<string name="notification_channel_sound_title">Sound</string>
|
||||||
|
|
||||||
<!-- [CHAR LIMIT=180] Notification conversation: important -->
|
<!-- [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 -->
|
<!-- [CHAR LIMIT=180] Notification conversation: add to home screen -->
|
||||||
<string name="notification_conversation_add_to_home">Add to home</string>
|
<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.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
import com.android.settings.notification.NotificationBackend;
|
import com.android.settings.notification.NotificationBackend;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -49,6 +50,14 @@ public class AllConversationsPreferenceController extends ConversationListPrefer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Preference getSummaryPreference() {
|
||||||
|
Preference pref = new Preference(mContext);
|
||||||
|
pref.setOrder(1);
|
||||||
|
pref.setSummary(R.string.other_conversations_summary);
|
||||||
|
return pref;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
||||||
return !conversation.getNotificationChannel().isImportantConversation();
|
return !conversation.getNotificationChannel().isImportantConversation();
|
||||||
|
@@ -73,24 +73,33 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe
|
|||||||
containerGroup.setVisible(false);
|
containerGroup.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
containerGroup.setVisible(true);
|
containerGroup.setVisible(true);
|
||||||
|
Preference summaryPref = getSummaryPreference();
|
||||||
|
if (summaryPref != null) {
|
||||||
|
containerGroup.addPreference(summaryPref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract Preference getSummaryPreference();
|
||||||
|
|
||||||
abstract boolean matchesFilter(ConversationChannelWrapper conversation);
|
abstract boolean matchesFilter(ConversationChannelWrapper conversation);
|
||||||
|
|
||||||
protected void populateConversations(List<ConversationChannelWrapper> conversations,
|
protected void populateConversations(List<ConversationChannelWrapper> conversations,
|
||||||
PreferenceGroup containerGroup) {
|
PreferenceGroup containerGroup) {
|
||||||
|
int order = 100;
|
||||||
for (ConversationChannelWrapper conversation : conversations) {
|
for (ConversationChannelWrapper conversation : conversations) {
|
||||||
if (conversation.getNotificationChannel().isDemoted()
|
if (conversation.getNotificationChannel().isDemoted()
|
||||||
|| !matchesFilter(conversation)) {
|
|| !matchesFilter(conversation)) {
|
||||||
continue;
|
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);
|
Preference pref = new Preference(mContext);
|
||||||
|
pref.setOrder(order);
|
||||||
|
|
||||||
pref.setTitle(getTitle(conversation));
|
pref.setTitle(getTitle(conversation));
|
||||||
pref.setSummary(getSummary(conversation));
|
pref.setSummary(getSummary(conversation));
|
||||||
|
@@ -59,8 +59,7 @@ public class InvalidConversationPreferenceController extends NotificationPrefere
|
|||||||
pref.setDisabledByAdmin(mAdmin);
|
pref.setDisabledByAdmin(mAdmin);
|
||||||
pref.setEnabled(!pref.isDisabledByAdmin());
|
pref.setEnabled(!pref.isDisabledByAdmin());
|
||||||
pref.setChecked(!mBackend.hasUserDemotedInvalidMsgApp(mAppRow.pkg, mAppRow.uid));
|
pref.setChecked(!mBackend.hasUserDemotedInvalidMsgApp(mAppRow.pkg, mAppRow.uid));
|
||||||
preference.setSummary(mContext.getString(
|
preference.setSummary(mContext.getString(R.string.conversation_section_switch_summary));
|
||||||
R.string.conversation_section_switch_summary, mAppRow.label));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -50,6 +50,11 @@ public class NoConversationsPreferenceController extends ConversationListPrefere
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Preference getSummaryPreference() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
||||||
return false;
|
return false;
|
||||||
|
@@ -23,6 +23,7 @@ import android.service.notification.ConversationChannelWrapper;
|
|||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
import com.android.settings.notification.NotificationBackend;
|
import com.android.settings.notification.NotificationBackend;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -49,6 +50,14 @@ public class PriorityConversationsPreferenceController extends
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Preference getSummaryPreference() {
|
||||||
|
Preference pref = new Preference(mContext);
|
||||||
|
pref.setOrder(1);
|
||||||
|
pref.setSummary(R.string.important_conversations_summary_bubbles);
|
||||||
|
return pref;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
boolean matchesFilter(ConversationChannelWrapper conversation) {
|
||||||
return conversation.getNotificationChannel().isImportantConversation();
|
return conversation.getNotificationChannel().isImportantConversation();
|
||||||
|
@@ -34,6 +34,7 @@ import android.os.Bundle;
|
|||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.service.notification.ConversationChannelWrapper;
|
import android.service.notification.ConversationChannelWrapper;
|
||||||
|
|
||||||
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
import androidx.preference.PreferenceScreen;
|
import androidx.preference.PreferenceScreen;
|
||||||
@@ -225,5 +226,10 @@ public class ConversationListPreferenceControllerTest {
|
|||||||
public String getPreferenceKey() {
|
public String getPreferenceKey() {
|
||||||
return "test";
|
return "test";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Preference getSummaryPreference() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user