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

Commit e6b23b33 authored by jiabin's avatar jiabin Committed by android-build-merger
Browse files

Merge "Add lock when adjusting suggested stream volume." into pi-dev

am: aa614faf

Change-Id: I4d1a3568aaca76db25e69a2896958794d74981e8
parents d1cbe1af aa614faf
Loading
Loading
Loading
Loading
+17 −14
Original line number Diff line number Diff line
@@ -1431,6 +1431,8 @@ public class AudioService extends IAudioService.Stub
                direction/*val1*/, flags/*val2*/, new StringBuilder(callingPackage)
                        .append("/").append(caller).append(" uid:").append(uid).toString()));
        final int streamType;
        synchronized (mForceControlStreamLock) {
            // Request lock in case mVolumeControlStream is changed by other thread.
            if (mUserSelectedVolumeControlStream) { // implies mVolumeControlStream != -1
                streamType = mVolumeControlStream;
            } else {
@@ -1448,6 +1450,7 @@ public class AudioService extends IAudioService.Stub
                    streamType = mVolumeControlStream;
                }
            }
        }

        final boolean isMute = isMuteAdjust(direction);