Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60a9ed86 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE Add zen starred contacts preference" into pi-dev

parents 7e31e22f a4d59808
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -7928,6 +7928,15 @@
    <!-- [CHAR LIMIT=20] Zen mode settings: Calls screen footer -->
    <string name="zen_mode_calls_footer">When Do Not Disturb is on, incoming calls are blocked. You can adjust settings to allow your friends, family, or other contacts to reach you.</string>
    <!-- [CHAR LIMIT=50] Zen mode settings: Starred contacts preference title -->
    <string name="zen_mode_starred_contacts_title">Starred contacts</string>
    <!-- Zen mode settings: Starred contacts summary [CHAR LIMIT=NONE] -->
    <plurals name="zen_mode_starred_contacts_summary_additional_contacts">
        <item quantity="one">and 1 other</item>
        <item quantity="other">and <xliff:g id="num_people" example="3">%d</xliff:g> others</item>
    </plurals>
    <!-- [CHAR LIMIT=20] Zen mode settings: Messages option -->
    <string name="zen_mode_messages">Messages</string>
+3 −1
Original line number Diff line number Diff line
@@ -29,7 +29,9 @@
          android:entries="@array/zen_mode_contacts_entries"
          android:entryValues="@array/zen_mode_contacts_values"/>

      <!-- TODO: setting that links to contacts or placeholder for external app -->
      <Preference
          android:key="zen_mode_starred_contacts"
          android:title="@string/zen_mode_starred_contacts_title"/>

      <!-- Repeat callers -->
      <SwitchPreference
+4 −0
Original line number Diff line number Diff line
@@ -29,6 +29,10 @@
          android:entries="@array/zen_mode_contacts_entries"
          android:entryValues="@array/zen_mode_contacts_values"/>

      <Preference
          android:key="zen_mode_starred_contacts"
          android:title="@string/zen_mode_starred_contacts_title"/>

      <!-- Reminders -->
      <SwitchPreference
          android:key="zen_mode_reminders"
+4 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settings.notification;

import static android.app.NotificationManager.Policy.PRIORITY_CATEGORY_CALLS;

import android.content.Context;
import android.provider.SearchIndexableResource;

@@ -40,8 +42,8 @@ public class ZenModeCallsSettings extends ZenModeSettingsBase implements Indexab
            Lifecycle lifecycle) {
        List<AbstractPreferenceController> controllers = new ArrayList<>();
        controllers.add(new ZenModeCallsPreferenceController(context, lifecycle));
        // TODO: is a controller needed for a pref that just launches an external activity?
        // or can the contacts app insert this setting themselves?
        controllers.add(new ZenModeStarredContactsPreferenceController(context, lifecycle,
                PRIORITY_CATEGORY_CALLS));
        controllers.add(new ZenModeRepeatCallersPreferenceController(context, lifecycle,
                context.getResources().getInteger(com.android.internal.R.integer
                .config_zen_repeat_callers_threshold)));
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settings.notification;

import static android.app.NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES;

import android.content.Context;
import android.provider.SearchIndexableResource;

@@ -42,6 +44,8 @@ public class ZenModeMsgEventReminderSettings extends ZenModeSettingsBase impleme
        controllers.add(new ZenModeEventsPreferenceController(context, lifecycle));
        controllers.add(new ZenModeRemindersPreferenceController(context, lifecycle));
        controllers.add(new ZenModeMessagesPreferenceController(context, lifecycle));
        controllers.add(new ZenModeStarredContactsPreferenceController(context, lifecycle,
                PRIORITY_CATEGORY_MESSAGES));
        controllers.add(new ZenModeBehaviorFooterPreferenceController(context, lifecycle,
                R.string.zen_msg_event_reminder_footer));
        return controllers;
Loading