Merge "Fix bug 5336495 - Silent mode icon on power dialog is wrong" into ics-factoryrom
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user