summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Laurent <elaurent@google.com> 2023-02-02 19:01:54 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-02-02 19:01:54 +0000
commitac7514038fe2721d24da82527a303e17990a9e52 (patch)
tree935436a05fd03dc7a176bc4d56e7e37f1d081953
parent84ea730da005baf01130c83007fac611a291c402 (diff)
parent1aee6449772808f02767fe8dfb04b6a2cf5c3ba1 (diff)
Merge "AudioService: fix volumegroup mute sync" into tm-qpr-dev
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java10
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 716ebd97e88c..b8e3a3ac1d1a 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -5202,7 +5202,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++) {
@@ -5927,6 +5928,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);
@@ -5944,8 +5947,6 @@ public class AudioService extends IAudioService.Stub
}
}
- readVolumeGroupsSettings(userSwitch);
-
if (DEBUG_VOL) {
Log.d(TAG, "Restoring device volume behavior");
}
@@ -8387,7 +8388,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);
}
}
}