diff options
-rw-r--r-- | media/java/android/media/AudioAttributes.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java index 489f552..ca242e4 100644 --- a/media/java/android/media/AudioAttributes.java +++ b/media/java/android/media/AudioAttributes.java @@ -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) { |