Zen mode settings.

Step 1: Surface zen mode value under sound settings.

This is in keeping with the principle that quick settings are
accelerators (not replacements) for settings in the Settings app.

Adding configuration to "Limited interruptions" will be done as
a followup, and will serve as the target for the configuration
icon in SystemUI.

Change-Id: Ia2c7351454b17df3e27926ff593eebff284ebef8
This commit is contained in:
John Spurlock
2014-02-27 15:37:13 -05:00
parent 76dcc66f4a
commit adda1b0022
5 changed files with 126 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
private static final String KEY_DOCK_AUDIO_SETTINGS = "dock_audio";
private static final String KEY_DOCK_SOUNDS = "dock_sounds";
private static final String KEY_DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled";
private static final String KEY_ZEN_MODE = "zen_mode";
private static final String[] NEED_VOICE_CAPABILITY = {
KEY_RINGTONE, KEY_DTMF_TONE, KEY_CATEGORY_CALLS,
@@ -101,6 +102,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
private CheckBoxPreference mDockSounds;
private Intent mDockIntent;
private CheckBoxPreference mDockAudioMediaEnabled;
private ZenModeListPreference mZenModeListPreference;
private Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
@@ -227,6 +229,9 @@ public class SoundSettings extends SettingsPreferenceFragment implements
};
initDockSettings();
mZenModeListPreference = (ZenModeListPreference) findPreference(KEY_ZEN_MODE);
mZenModeListPreference.init();
}
@Override