From 2c917847f520c59af84837d4514855ea01f0316c Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Wed, 21 Apr 2010 15:24:24 -0400 Subject: [PATCH] Redesign vibration settings. Under the hood there remain three axes: 1. Are we in silent mode now? | RINGER_MODE_{VIBRATE,SILENT} 2. Do we vibrate in silent mode? | VIBRATE_IN_SILENT == 1 3. Do calls vibrate: | getVibrateSetting(VIBRATE_TYPE_RINGER) - always | == VIBRATE_SETTING_ON - never | == VIBRATE_SETTING_OFF - only in silent | == VIBRATE_SETTING_ONLY_SILENT We now expose this to the user much more simply by collapsing (2) and (3) above, and discarding states that don't make sense: - VIBRATE_SETTING_OFF + VIBRATE_IN_SILENT - VIBRATE_SETTING_ONLY_SILENT + !VIBRATE_IN_SILENT Now we offer the user four choices: Phone vibrate: * "Never" --> VIBRATE_IN_SILENT=0, VIBRATE_SETTING_OFF * "Always" --> VIBRATE_IN_SILENT=1, VIBRATE_SETTING_ON * "Only in silent mode" --> VIBRATE_IN_SILENT=1, VIBRATE_SETTING_ONLY_SILENT * "Only when not in silent mode" --> VIBRATE_IN_SILENT=0, VIBRATE_SETTING_ON This should make it easier to choose exactly the behavior the user wants as well as avoid nonsensical combinations of settings. Bug: 2598014 Change-Id: I9244d25ec97a3e2b572b71b521049debd22fa4e0 --- res/values/arrays.xml | 12 +- res/values/strings.xml | 4 +- res/xml/sound_settings.xml | 21 ++-- src/com/android/settings/SoundSettings.java | 132 ++++++++++++++------ 4 files changed, 107 insertions(+), 62 deletions(-) diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 0ae8eb4328e..f16f8c98824 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -388,14 +388,16 @@ Always - Only when silent Never + Only in Silent mode + Only when not in Silent mode - + - 1 - 2 - 0 + always + never + silent + notsilent diff --git a/res/values/strings.xml b/res/values/strings.xml index 66435d7b239..a0d3b4138fe 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1019,9 +1019,9 @@ Allow vibration feedback in silent mode - Phone vibrate + Vibrate - Vibrate phone for incoming calls + Vibration feedback for calls and notifications Notification ringtone diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml index 23e6540750b..1091b900d60 100644 --- a/res/xml/sound_settings.xml +++ b/res/xml/sound_settings.xml @@ -31,12 +31,13 @@ android:order="1" android:disableDependentsState="true" /> - + - -