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

Commit 0cead3d6 authored by Vlad Popa's avatar Vlad Popa
Browse files

Add documenation for getVssForStream methods

Test: trivial
Flag: EXEMPT refactor
Bug: 345024266
Change-Id: I613a1ccbd54731095df1b26af7b0138c08d5c950
parent d1039dd4
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -507,11 +507,31 @@ public class AudioService extends IAudioService.Stub
        return streamState != null ? streamState.getIndex(device) : -1;
    }
    /**
     * Returns the {@link VolumeStreamState} corresponding to the passed stream type. This can be
     * {@code null} since not all possible stream types have a valid {@link VolumeStreamState} (e.g.
     * {@link AudioSystem#STREAM_BLUETOOTH_SCO}) is deprecated and will return a {@code null} stream
     * state).
     *
     * @param stream the stream type for querying the stream state
     *
     * @return the {@link VolumeStreamState} corresponding to the passed stream type or {@code null}
     */
    @Nullable
    /*package*/ VolumeStreamState getVssForStream(int stream) {
        return mStreamStates.get(stream);
    }
    /**
     * Returns the {@link VolumeStreamState} corresponding to the passed stream type. In case
     * there is no associated stream state for the given stream type we return the default stream
     * state for {@link AudioSystem#STREAM_MUSIC} (or throw an {@link IllegalArgumentException} in
     * the ramp up phase of the replaceStreamBtSco flag to ensure that this case will never happen).
     *
     * @param stream the stream type for querying the stream state
     *
     * @return the {@link VolumeStreamState} corresponding to the passed stream type
     */
    @NonNull
    /*package*/ VolumeStreamState getVssForStreamOrDefault(int stream) {
        VolumeStreamState streamState = mStreamStates.get(stream);