Automated import from //branches/donutburger/...@140507,140507
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 55a153b..67c095d 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 8905b85..e8cb10f 100644
--- a/src/com/android/settings/SoundAndDisplaySettings.java
+++ b/src/com/android/settings/SoundAndDisplaySettings.java
@@ -162,6 +162,13 @@
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();