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

Commit 7d3cf592 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "Volume: Allow dialog to query "muteable" streams."

parents 34c28165 a9dfbe8b
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -3330,6 +3330,19 @@ public class AudioManager {
        }
    }

    /**
     * Only useful for volume controllers.
     * @hide
     */
    public boolean isStreamAffectedByMute(int streamType) {
        try {
            return getService().isStreamAffectedByMute(streamType);
        } catch (RemoteException e) {
            Log.w(TAG, "Error calling isStreamAffectedByMute", e);
            return false;
        }
    }

    /**
     * Only useful for volume controllers.
     * @hide
+2 −0
Original line number Diff line number Diff line
@@ -202,6 +202,8 @@ interface IAudioService {

    boolean isStreamAffectedByRingerMode(int streamType);

    boolean isStreamAffectedByMute(int streamType);

    void disableSafeMediaVolume();

    int setHdmiSystemAudioSupported(boolean on);
+1 −0
Original line number Diff line number Diff line
@@ -3217,6 +3217,7 @@ public class AudioService extends IAudioService.Stub {
        return false;
    }

    @Override
    public boolean isStreamAffectedByMute(int streamType) {
        return (mMuteAffectedStreams & (1 << streamType)) != 0;
    }