Change the route name for USB headset
Bug: 37749497
Test: manual by connecting a USB headset
Change-Id: I0c6e0233da5d4006d62adc1f2b4534a0180485d0
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index bd5b711..7416113 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3785,15 +3785,18 @@
a headphone or other wired audio output jack. [CHAR LIMIT=50] -->
<string name="default_audio_route_name" product="default">Phone</string>
+ <!-- Name of the default audio route when an audio dock is connected. [CHAR LIMIT=50] -->
+ <string name="default_audio_route_name_dock_speakers">Dock speakers</string>
+
+ <!-- Name of the default audio route when HDMI is connected. [CHAR LIMIT=50] -->
+ <string name="default_audio_route_name_hdmi">HDMI</string>
+
<!-- Name of the default audio route when wired headphones are
connected. [CHAR LIMIT=50] -->
<string name="default_audio_route_name_headphones">Headphones</string>
- <!-- Name of the default audio route when an audio dock is connected. [CHAR LIMIT=50] -->
- <string name="default_audio_route_name_dock_speakers">Dock speakers</string>
-
- <!-- Name of the default media route when HDMI is connected. [CHAR LIMIT=50] -->
- <string name="default_media_route_name_hdmi">HDMI</string>
+ <!-- Name of the default audio route when USB is connected. [CHAR LIMIT=50] -->
+ <string name="default_audio_route_name_usb">USB</string>
<!-- Name of the default audio route category. [CHAR LIMIT=50] -->
<string name="default_audio_route_category_name">System</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 927d9dc..a9850fd 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1025,9 +1025,10 @@
<java-symbol type="string" name="granularity_label_link" />
<java-symbol type="string" name="granularity_label_line" />
<java-symbol type="string" name="default_audio_route_name" />
- <java-symbol type="string" name="default_audio_route_name_headphones" />
<java-symbol type="string" name="default_audio_route_name_dock_speakers" />
- <java-symbol type="string" name="default_media_route_name_hdmi" />
+ <java-symbol type="string" name="default_audio_route_name_hdmi" />
+ <java-symbol type="string" name="default_audio_route_name_headphones" />
+ <java-symbol type="string" name="default_audio_route_name_usb" />
<java-symbol type="string" name="default_audio_route_category_name" />
<java-symbol type="string" name="stk_cc_ss_to_dial" />
<java-symbol type="string" name="stk_cc_ss_to_ss" />
diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java
index 2894e89..fe427a7 100644
--- a/media/java/android/media/MediaRouter.java
+++ b/media/java/android/media/MediaRouter.java
@@ -193,7 +193,9 @@
} else if ((newRoutes.mainType&AudioRoutesInfo.MAIN_DOCK_SPEAKERS) != 0) {
name = com.android.internal.R.string.default_audio_route_name_dock_speakers;
} else if ((newRoutes.mainType&AudioRoutesInfo.MAIN_HDMI) != 0) {
- name = com.android.internal.R.string.default_media_route_name_hdmi;
+ name = com.android.internal.R.string.default_audio_route_name_hdmi;
+ } else if ((newRoutes.mainType&AudioRoutesInfo.MAIN_USB) != 0) {
+ name = com.android.internal.R.string.default_audio_route_name_usb;
} else {
name = com.android.internal.R.string.default_audio_route_name;
}