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

Commit aa614faf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 452ae34a 8fd5d5e8
Loading
Loading
Loading
Loading
+17 −14
Original line number Diff line number Diff line
@@ -1422,6 +1422,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 {
@@ -1439,6 +1441,7 @@ public class AudioService extends IAudioService.Stub
                    streamType = mVolumeControlStream;
                }
            }
        }

        final boolean isMute = isMuteAdjust(direction);