Fix bug 5336495 - Silent mode icon on power dialog is wrong

Change-Id: I384882434827a3ab57d65bb0a79e9da10315326f
TODO: Add appropriate vibrate-in-silent-mode icon when available.
This commit is contained in:
Adam Powell
2011-09-20 13:38:55 -07:00
parent aff24a52d2
commit 093dee952f

View File

@@ -118,18 +118,18 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
*/
private AlertDialog createDialog() {
mSilentModeToggle = new ToggleAction(
R.drawable.ic_lock_silent_mode,
R.drawable.ic_lock_silent_mode_off,
R.drawable.ic_audio_vol_mute,
R.drawable.ic_audio_vol,
R.string.global_action_toggle_silent_mode,
R.string.global_action_silent_mode_on_status,
R.string.global_action_silent_mode_off_status) {
void willCreate() {
// XXX: FIXME: switch to ic_lock_vibrate_mode when available
// XXX: FIXME: Add vibrate indicator when available
mEnabledIconResId = (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.VIBRATE_IN_SILENT, 1) == 1)
? R.drawable.ic_lock_silent_mode_vibrate
: R.drawable.ic_lock_silent_mode;
? R.drawable.ic_audio_vol_mute
: R.drawable.ic_audio_vol_mute;
}
void onToggle(boolean on) {