Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c0257c7 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "AudioService: fix volumegroup mute sync" into tm-qpr-dev am: ac751403 am: d4410e0d

parents 3ef6ebcf d4410e0d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -5330,7 +5330,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++) {
@@ -6061,6 +6062,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);
@@ -6072,8 +6075,6 @@ public class AudioService extends IAudioService.Stub
        mSoundDoseHelper.restoreMusicActiveMs();
        mSoundDoseHelper.enforceSafeMediaVolumeIfActive(TAG);
        readVolumeGroupsSettings(userSwitch);
        if (DEBUG_VOL) {
            Log.d(TAG, "Restoring device volume behavior");
        }
@@ -8481,7 +8482,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);
                    }
                }
            }