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

Commit 198dcfed authored by RoboErik's avatar RoboErik Committed by Android (Google) Code Review
Browse files

Merge "clear calling identity when changing volume"

parents 1d80a877 f77b99f0
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.media.AudioManager;
import android.media.MediaMetadata;
import android.media.Rating;
import android.media.VolumeProvider;
import android.os.Binder;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.Handler;
@@ -1122,12 +1123,22 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {

        @Override
        public void adjustVolumeBy(int delta, int flags) {
            final long token = Binder.clearCallingIdentity();
            try {
                MediaSessionRecord.this.adjustVolumeBy(delta, flags);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }

        @Override
        public void setVolumeTo(int value, int flags) {
            final long token = Binder.clearCallingIdentity();
            try {
                MediaSessionRecord.this.setVolumeTo(value, flags);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }

        @Override