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

Commit 1c35d117 authored by Justin Koh's avatar Justin Koh Committed by Android Git Automerger
Browse files

am db9b114b: Merge "Adds flag argument to setMasterMute." into ics-aah

* commit 'db9b114b':
  Adds flag argument to setMasterMute.
parents d9966c4c db9b114b
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -903,9 +903,18 @@ public class AudioManager {
     * @hide
     */
    public void setMasterMute(boolean state) {
        setMasterMute(state, FLAG_SHOW_UI);
    }

    /**
     * set master mute state with optional flags.
     *
     * @hide
     */
    public void setMasterMute(boolean state, int flags) {
        IAudioService service = getService();
        try {
            service.setMasterMute(state, mICallBack);
            service.setMasterMute(state, flags, mICallBack);
        } catch (RemoteException e) {
            Log.e(TAG, "Dead object in setMasterMute", e);
        }
+2 −2
Original line number Diff line number Diff line
@@ -827,13 +827,13 @@ public class AudioService extends IAudioService.Stub {
    }

    /** @see AudioManager#setMasterMute(boolean, IBinder) */
    public void setMasterMute(boolean state, IBinder cb) {
    public void setMasterMute(boolean state, int flags, IBinder cb) {
        if (state != AudioSystem.getMasterMute()) {
            AudioSystem.setMasterMute(state);
            // Post a persist master volume msg
            sendMsg(mAudioHandler, MSG_PERSIST_MASTER_VOLUME_MUTE, SENDMSG_REPLACE, state ? 1
                    : 0, 0, null, PERSIST_DELAY);
            sendMasterMuteUpdate(state, AudioManager.FLAG_SHOW_UI);
            sendMasterMuteUpdate(state, flags);
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ interface IAudioService {

    boolean isStreamMute(int streamType);

    void setMasterMute(boolean state, IBinder cb);
    void setMasterMute(boolean state, int flags, IBinder cb);

    boolean isMasterMute();