diff options
author | Jason Parekh <> | 2009-03-24 17:48:28 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 17:48:28 -0700 |
commit | 2c9b326fdbfe64dc778b5eabf80017249a509351 (patch) | |
tree | dcaf5e7205ae77f06eff124d5ebdcbc53529dad5 | |
parent | e6dd1fa1851302710ac7845d25d8ad8a5b6ee438 (diff) | |
download | packages_apps_Settings-2c9b326fdbfe64dc778b5eabf80017249a509351.tar.gz packages_apps_Settings-2c9b326fdbfe64dc778b5eabf80017249a509351.tar.bz2 packages_apps_Settings-2c9b326fdbfe64dc778b5eabf80017249a509351.zip |
Automated import from //branches/donutburger/...@140507,140507
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | src/com/android/settings/SoundAndDisplaySettings.java | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 55a153b3e..67c095d6d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -751,8 +751,10 @@ <string name="sound_and_display_settings_summary">Set ringtones, notifications, screen brightness</string> <!-- Sound settings screen, setting option name checkbox --> <string name="silent_mode_title">Silent mode</string> - <!-- Sound settings screen, setting option summary text --> + <!-- Sound settings screen, setting option summary text when going into silent mode. Media and alarms sounds WILL NOT be silenced in silent mode. --> <string name="silent_mode_summary">All sounds except media & alarms are silenced</string> + <!-- Sound settings screen, setting option summary text when going into silent mode. Media WILL NOT be silenced in silent mode, but alarms WILL be silenced. --> + <string name="silent_mode_incl_alarm_summary">All sounds except media are silenced</string> <!-- Sound settings screen, setting option name to pick ringtone (a list dialog comes up)--> <string name="ringtone_title">Phone ringtone</string> <!-- Sound settings screen, setting option summary text --> diff --git a/src/com/android/settings/SoundAndDisplaySettings.java b/src/com/android/settings/SoundAndDisplaySettings.java index 8905b859f..e8cb10f98 100644 --- a/src/com/android/settings/SoundAndDisplaySettings.java +++ b/src/com/android/settings/SoundAndDisplaySettings.java @@ -162,6 +162,13 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements mVibrate.setChecked(vibrateSetting); } + int silentModeStreams = Settings.System.getInt(getContentResolver(), + Settings.System.MODE_RINGER_STREAMS_AFFECTED, 0); + boolean isAlarmInclSilentMode = (silentModeStreams & (1 << AudioManager.STREAM_ALARM)) != 0; + mSilent.setSummary(isAlarmInclSilentMode ? + R.string.silent_mode_incl_alarm_summary : + R.string.silent_mode_summary); + boolean animations = true; try { mAnimationScales = mWindowManager.getAnimationScales(); |