Support Vibrate for calls in Settings Slices

Use TogglePreferenceController instead of AbstractPreferenceController
for VibrateWhenRingPreferenceControllr

Bug:74915140
Test: make RunSettingsRoboTests
Change-Id: I501a1470da7dc1ff582c2a90b5235b25036caefc
This commit is contained in:
joeshih
2018-05-14 17:45:07 +08:00
parent 1ae09fe2bf
commit 5d772136e1
4 changed files with 129 additions and 60 deletions

View File

@@ -50,7 +50,6 @@ public class SoundSettings extends DashboardFragment {
private static final String SELECTED_PREFERENCE_KEY = "selected_preference";
private static final int REQUEST_CODE = 200;
private static final String KEY_ZEN_MODE = "zen_mode";
private static final int SAMPLE_CUTOFF = 2000; // manually cap sample playback at 2 seconds
@VisibleForTesting
@@ -197,7 +196,6 @@ public class SoundSettings extends DashboardFragment {
SoundSettings fragment, Lifecycle lifecycle) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new ZenModePreferenceController(context, lifecycle, KEY_ZEN_MODE));
controllers.add(new VibrateWhenRingPreferenceController(context));
// Volumes are added via xml