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

Commit 191821d2 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

am: e6b23b33

Change-Id: I0896e20b7683990d5bf900b8eb2d90e513845369
parents 9075eac8 e6b23b33
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);