Add a default behavior setting for VICs

Test: atest
Bug: 149696991
Change-Id: Ica06f80a02d65294a7b503fd3556add644c61bd7
This commit is contained in:
Julia Reynolds
2020-02-17 21:58:08 -05:00
parent 1ee9dce20c
commit 8949d87be7
25 changed files with 343 additions and 72 deletions

View File

@@ -32,13 +32,13 @@ public class HighImportancePreferenceController extends NotificationPreferenceCo
implements PreferenceControllerMixin, Preference.OnPreferenceChangeListener {
private static final String KEY_IMPORTANCE = "high_importance";
private NotificationSettings.ImportanceListener mImportanceListener;
private NotificationSettings.DependentFieldListener mDependentFieldListener;
public HighImportancePreferenceController(Context context,
NotificationSettings.ImportanceListener importanceListener,
NotificationSettings.DependentFieldListener dependentFieldListener,
NotificationBackend backend) {
super(context, backend);
mImportanceListener = importanceListener;
mDependentFieldListener = dependentFieldListener;
}
@Override
@@ -78,7 +78,7 @@ public class HighImportancePreferenceController extends NotificationPreferenceCo
mChannel.setImportance(checked ? IMPORTANCE_HIGH : IMPORTANCE_DEFAULT);
mChannel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
saveChannel();
mImportanceListener.onImportanceChanged();
mDependentFieldListener.onFieldValueChanged();
}
return true;
}