diff --git a/src/com/android/settings/notification/NotificationSettings.java b/src/com/android/settings/notification/NotificationSettings.java index 00f54978db1..98f2517b61a 100644 --- a/src/com/android/settings/notification/NotificationSettings.java +++ b/src/com/android/settings/notification/NotificationSettings.java @@ -198,11 +198,16 @@ public class NotificationSettings extends SettingsPreferenceFragment implements private void updateRingOrNotificationPreference() { mRingOrNotificationPreference.showIcon(mSuppressor != null ? com.android.internal.R.drawable.ic_audio_ring_notif_mute - : mRingerMode == AudioManager.RINGER_MODE_VIBRATE + : mRingerMode == AudioManager.RINGER_MODE_VIBRATE || wasRingerModeVibrate() ? com.android.internal.R.drawable.ic_audio_ring_notif_vibrate : com.android.internal.R.drawable.ic_audio_ring_notif); } + private boolean wasRingerModeVibrate() { + return mVibrator != null && mRingerMode == AudioManager.RINGER_MODE_SILENT + && mAudioManager.getLastAudibleStreamVolume(AudioManager.STREAM_RING) == 0; + } + private void updateRingerMode() { final int ringerMode = mAudioManager.getRingerModeInternal(); if (mRingerMode == ringerMode) return; diff --git a/src/com/android/settings/notification/VolumeSeekBarPreference.java b/src/com/android/settings/notification/VolumeSeekBarPreference.java index 409944f06fa..2bbf9efb109 100644 --- a/src/com/android/settings/notification/VolumeSeekBarPreference.java +++ b/src/com/android/settings/notification/VolumeSeekBarPreference.java @@ -48,6 +48,7 @@ public class VolumeSeekBarPreference extends SeekBarPreference private TextView mSuppressionTextView; private String mSuppressionText; private boolean mMuted; + private boolean mZenMuted; private int mIconResId; private int mMuteIconResId; private boolean mStopped; @@ -122,9 +123,10 @@ public class VolumeSeekBarPreference extends SeekBarPreference } } @Override - public void onMuted(boolean muted) { - if (mMuted == muted) return; + public void onMuted(boolean muted, boolean zenMuted) { + if (mMuted == muted && mZenMuted == zenMuted) return; mMuted = muted; + mZenMuted = zenMuted; updateIconView(); } }; @@ -150,7 +152,7 @@ public class VolumeSeekBarPreference extends SeekBarPreference if (mIconView == null) return; if (mIconResId != 0) { mIconView.setImageResource(mIconResId); - } else if (mMuteIconResId != 0 && mMuted) { + } else if (mMuteIconResId != 0 && mMuted && !mZenMuted) { mIconView.setImageResource(mMuteIconResId); } else { mIconView.setImageDrawable(getIcon());