diff options
| author | 2023-02-02 21:23:57 +0000 | |
|---|---|---|
| committer | 2023-02-02 21:23:57 +0000 | |
| commit | d4410e0d6e9c43aa11f135acb457c5f224d6f11a (patch) | |
| tree | 87b3481358a7b40d1fdcbaeb0b36e9834e0c12f4 | |
| parent | 99cc93a1845413110a573a3fa6417d836af17b59 (diff) | |
| parent | ac7514038fe2721d24da82527a303e17990a9e52 (diff) | |
Merge "AudioService: fix volumegroup mute sync" into tm-qpr-dev am: ac7514038f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21223480
Change-Id: Iad6bc0eed894e43826102b6d0311aa7f4dfce87f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 56925a35d5fc..f86c241f97c7 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -5205,7 +5205,8 @@ public class AudioService extends IAudioService.Stub if (!shouldMute) { // unmute // ring and notifications volume should never be 0 when not silenced - if (mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING) { + if (mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING + || mStreamVolumeAlias[streamType] == AudioSystem.STREAM_NOTIFICATION) { synchronized (VolumeStreamState.class) { final VolumeStreamState vss = mStreamStates[streamType]; for (int i = 0; i < vss.mIndexMap.size(); i++) { @@ -5930,6 +5931,8 @@ public class AudioService extends IAudioService.Stub } } + readVolumeGroupsSettings(userSwitch); + // apply new ringer mode before checking volume for alias streams so that streams // muted by ringer mode have the correct volume setRingerModeInt(getRingerModeInternal(), false); @@ -5947,8 +5950,6 @@ public class AudioService extends IAudioService.Stub } } - readVolumeGroupsSettings(userSwitch); - if (DEBUG_VOL) { Log.d(TAG, "Restoring device volume behavior"); } @@ -8394,7 +8395,8 @@ public class AudioService extends IAudioService.Stub // Only propage mute of stream when applicable if (isMutable()) { // For call stream, align mute only when muted, not when index is set to 0 - mVolumeGroupState.mute(forceMuteState ? mIsMuted : groupIndex == 0); + mVolumeGroupState.mute( + forceMuteState ? mIsMuted : groupIndex == 0 || mIsMuted); } } } |