summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2017-12-06 11:35:44 -0800
committer Hongwei Wang <hwwang@google.com> 2017-12-12 19:35:28 +0000
commitdd241da28289d1a69f4c6483f937a293a71dd899 (patch)
treec48283bad78afdae928631ce95c06cd11e439035
parent0e0598474fefe779a0016b922fab30c5f959bc92 (diff)
Adds getPort (hidden) to AudioDeviceInfo class
Motivation of this change: In CarAudioService, we enumerate the AudioDeviceInfo on device via AudioManager.getDevices(). The AudioDeviceInfo would be used to construct the dynamic routing via AudioMix.Builder, which accepts AudioDeviceInfo. Meanwhile, we wire also the volume change to hal via AudioManager.setAudioPortConfig(), which accepts AudioPort. Bug: 65751827 Test: lunch bat_land-userdebug && m -j Change-Id: I438cfd61e502340def5376fe373a296ab69ff86e
-rw-r--r--media/java/android/media/AudioDeviceInfo.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/java/android/media/AudioDeviceInfo.java b/media/java/android/media/AudioDeviceInfo.java
index 1b89c96602d3..19d467a69c29 100644
--- a/media/java/android/media/AudioDeviceInfo.java
+++ b/media/java/android/media/AudioDeviceInfo.java
@@ -127,6 +127,14 @@ public final class AudioDeviceInfo {
}
/**
+ * @hide
+ * @return The underlying {@link AudioDevicePort} instance.
+ */
+ public AudioDevicePort getPort() {
+ return mPort;
+ }
+
+ /**
* @return The internal device ID.
*/
public int getId() {