AudioAttributes javadoc update for conversion to stream types

Change-Id: I2b687d8a002897fff90a8c99d180aa0a3511a571
This commit is contained in:
Jean-Michel Trivi
2015-02-03 10:15:08 -08:00
parent ea54c0f97c
commit 3d22bf04e3

View File

@@ -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) {