Skip to content

Commit f740664

Browse files
author
Eric Laurent
committed
fix unmute from volume panel on tablets
Changing STREAM_MUSIC from volume panel on tablets should exit silent mode as does changing STREAM_RING on phones. Issue 5970208. Change-Id: Ia8ed62033da07a5d4dfcfa84b0b47b27414bdd9a
1 parent faac929 commit f740664

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

media/java/android/media/AudioService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,9 @@ public void setStreamVolume(int streamType, int index, int flags) {
711711
final int oldIndex = streamState.getIndex(device,
712712
(streamState.muteCount() != 0) /* lastAudible */);
713713

714-
// setting ring or notifications volume to 0 on voice capable devices enters silent mode
715-
if (mVoiceCapable && (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) ||
716-
(mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING))) {
714+
// setting volume on master stream type also controls silent mode
715+
if (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) ||
716+
(mStreamVolumeAlias[streamType] == getMasterStreamType())) {
717717
int newRingerMode;
718718
if (index == 0) {
719719
newRingerMode = System.getInt(mContentResolver, System.VIBRATE_IN_SILENT, 1) == 1

0 commit comments

Comments
 (0)