Make mute/unmute work
Bug: 18844550 Change-Id: I431a223d55430aa8e1bb28f0275e11876ed0e0bb
This commit is contained in:
@@ -836,7 +836,9 @@ public class MediaSessionService extends SystemService implements Monitor {
|
||||
mAudioService.setMasterMute(!isMasterMute, flags, packageName, mICallback);
|
||||
} else {
|
||||
mAudioService.adjustMasterVolume(direction, flags, packageName);
|
||||
if (isMasterMute) {
|
||||
// Do not call setStreamMute when direction = 0 which is just to show
|
||||
// UI.
|
||||
if (isMasterMute && direction != 0) {
|
||||
mAudioService.setMasterMute(false, flags, packageName, mICallback);
|
||||
}
|
||||
}
|
||||
@@ -847,7 +849,9 @@ public class MediaSessionService extends SystemService implements Monitor {
|
||||
} else {
|
||||
mAudioService.adjustSuggestedStreamVolume(direction, suggestedStream,
|
||||
flags, packageName);
|
||||
if (isStreamMute) {
|
||||
// Do not call setStreamMute when direction = 0 which is just to show
|
||||
// UI.
|
||||
if (isStreamMute && direction != 0) {
|
||||
mAudioService.setStreamMute(suggestedStream, false, mICallback);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user