From 14d11fb699ec762472aeb903f73d9e135e7ec49a Mon Sep 17 00:00:00 2001 From: wenyu zhang Date: Mon, 9 Sep 2024 13:35:43 +0000 Subject: Update doc to reuse getDevicesForAttributes for get input devices Change-Id: I119d9a33b0a84a67bcf774e78d5e6d41ab2d8a89 Bug: b/364923030, b/357122624 Flag: com.android.media.audioserver.enable_audio_input_device_routing --- media/java/android/media/AudioManager.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index ca468fc1ff44..41a061aa85c2 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -6317,7 +6317,14 @@ public class AudioManager { /** * @hide * Get the audio devices that would be used for the routing of the given audio attributes. - * @param attributes the {@link AudioAttributes} for which the routing is being queried + * @param attributes the {@link AudioAttributes} for which the routing is being queried. + * For queries about output devices (playback use cases), a valid usage must be specified in + * the audio attributes via AudioAttributes.Builder.setUsage(). The capture preset MUST NOT + * be changed from default. + * For queries about input devices (capture use case), a valid capture preset MUST be + * specified in the audio attributes via AudioAttributes.Builder.setCapturePreset(). If a + * capture preset is present, then this has precedence over any usage or content type also + * present in the audio attrirutes. * @return an empty list if there was an issue with the request, a list of audio devices * otherwise (typically one device, except for duplicated paths). */ -- cgit v1.2.3-59-g8ed1b