From 832210910f3ffc269b30bee75aeb406cfdd048c0 Mon Sep 17 00:00:00 2001 From: jiabin Date: Tue, 10 Jan 2023 00:15:47 +0000 Subject: [PATCH] Add comment for AudioManager.getDevices. Currently, audio framework only supports connecting one device per device type. It will be good to state this limitation in the API to query available devices. Bug: 255248910 Test: make Change-Id: I2f0c08c411d02a31cf2e8282ecf4226dcdf2444a --- media/java/android/media/AudioManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index a84c42af93c2b..564f21aa14429 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -6898,6 +6898,10 @@ public class AudioManager { * Returns an array of {@link AudioDeviceInfo} objects corresponding to the audio devices * currently connected to the system and meeting the criteria specified in the * flags parameter. + * Notes that Android audio framework only support one device per device type. In that case, + * if there are multiple audio device with the same device type connected to the Android device, + * only the last reported device will be known by Android audio framework and returned by this + * API. * @param flags A set of bitflags specifying the criteria to test. * @see #GET_DEVICES_OUTPUTS * @see #GET_DEVICES_INPUTS