Merge "Fix bug 5336495 - Silent mode icon on power dialog is wrong" into ics-factoryrom

This commit is contained in:
Adam Powell
2011-09-20 14:34:28 -07:00
committed by Android (Google) Code Review

View File

@@ -118,18 +118,18 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
*/ */
private AlertDialog createDialog() { private AlertDialog createDialog() {
mSilentModeToggle = new ToggleAction( mSilentModeToggle = new ToggleAction(
R.drawable.ic_lock_silent_mode, R.drawable.ic_audio_vol_mute,
R.drawable.ic_lock_silent_mode_off, R.drawable.ic_audio_vol,
R.string.global_action_toggle_silent_mode, R.string.global_action_toggle_silent_mode,
R.string.global_action_silent_mode_on_status, R.string.global_action_silent_mode_on_status,
R.string.global_action_silent_mode_off_status) { R.string.global_action_silent_mode_off_status) {
void willCreate() { 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(), mEnabledIconResId = (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.VIBRATE_IN_SILENT, 1) == 1) Settings.System.VIBRATE_IN_SILENT, 1) == 1)
? R.drawable.ic_lock_silent_mode_vibrate ? R.drawable.ic_audio_vol_mute
: R.drawable.ic_lock_silent_mode; : R.drawable.ic_audio_vol_mute;
} }
void onToggle(boolean on) { void onToggle(boolean on) {