Add zen starred contacts preference

Bug: 78447976
Test: ZenModeStarredContactsPreferenceControllerTest
Change-Id: Ic9d1b08c3e80832b29ad8e223a34f35e2f763cf9
This commit is contained in:
Beverly
2018-05-09 15:28:21 -04:00
parent 3403c3729e
commit f002dcf43b
7 changed files with 328 additions and 3 deletions

View File

@@ -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;
@@ -42,8 +44,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, "zen_mode_starred_contacts_callers"));
controllers.add(new ZenModeRepeatCallersPreferenceController(context, lifecycle,
context.getResources().getInteger(com.android.internal.R.integer
.config_zen_repeat_callers_threshold)));