Merge "Display vibrate icon in volume panel" into jb-mr2-dev

This commit is contained in:
Eric Laurent
2013-03-28 22:08:05 +00:00
committed by Android (Google) Code Review

View File

@@ -468,7 +468,8 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
// Force reloading the image resource
sc.icon.setImageDrawable(null);
sc.icon.setImageResource(muted ? sc.iconMuteRes : sc.iconRes);
if (sc.streamType == AudioManager.STREAM_RING &&
if (((sc.streamType == AudioManager.STREAM_RING) ||
(sc.streamType == AudioManager.STREAM_NOTIFICATION)) &&
mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) {
sc.icon.setImageResource(R.drawable.ic_audio_ring_notif_vibrate);
}