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

Commit a1852f6e authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "AudioAttributes javadoc update for conversion to stream types"

parents 08c01042 3d22bf04
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -709,7 +709,13 @@ public final class AudioAttributes implements Parcelable {
        }
    }

    /** @hide */
    /**
     * @hide
     * Only use to get which stream type should be used for volume control, NOT for audio playback
     * (all audio playback APIs are supposed to take AudioAttributes as input parameters)
     * @param aa non-null AudioAttributes.
     * @return a valid stream type for volume control that matches the attributes.
     */
    public static int toLegacyStreamType(AudioAttributes aa) {
        // flags to stream type mapping
        if ((aa.getFlags() & FLAG_AUDIBILITY_ENFORCED) == FLAG_AUDIBILITY_ENFORCED) {