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

Commit c45ea929 authored by Jinsuk Kim's avatar Jinsuk Kim Committed by android-build-merger
Browse files

am d8858fa9: am a2bc055e: Merge "audioservice: Clear calling identity upon...

am d8858fa9: am a2bc055e: Merge "audioservice: Clear calling identity upon calling HdmiControlService" into lmp-mr1-dev
automerge: 584c3dfb

* commit '584c3dfb':
  audioservice: Clear calling identity upon calling HdmiControlService
parents eef1cec0 584c3dfb
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -1159,8 +1159,13 @@ public class AudioService extends IAudioService.Stub {
        synchronized (mHdmiManager) {
            if (!mHdmiSystemAudioSupported) return;
            synchronized (mHdmiTvClient) {
                final long token = Binder.clearCallingIdentity();
                try {
                    mHdmiTvClient.setSystemAudioVolume(
                            (oldVolume + 5) / 10, (newVolume + 5) / 10, maxVolume);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
            }
        }
    }
@@ -1538,18 +1543,17 @@ public class AudioService extends IAudioService.Stub {
    private void setSystemAudioMute(boolean state) {
        if (mHdmiManager == null || mHdmiTvClient == null) return;
        synchronized (mHdmiManager) {
            if (!mHdmiSystemAudioSupported) return;
            synchronized (mHdmiTvClient) {
                final long token = Binder.clearCallingIdentity();
                try {
                synchronized (mHdmiTvClient) {
                    if (mHdmiSystemAudioSupported) {
                    mHdmiTvClient.setSystemAudioMute(state);
                    }
                }
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
            }
        }
    }

    /** get stream mute state. */
    public boolean isStreamMute(int streamType) {