Update string for 3.5mm and usb audio device

Use "Wired headphone" to represent 3.5mm and usb audio device
on output switcher panel.

Bug: 155146122
Test: make -j42 RunSettingsLibRoboTests
Change-Id: Ibc47ad1bbb3124e9a927a21c54e5c6ecb0057e61
This commit is contained in:
hughchen
2020-05-18 10:52:37 +08:00
parent 47059f7654
commit 1788910e3c
3 changed files with 7 additions and 4 deletions

View File

@@ -1376,4 +1376,7 @@
<!-- A content description for work profile app [CHAR LIMIT=35] -->
<string name="accessibility_work_profile_app_description">Work <xliff:g id="app_name" example="Camera">%s</xliff:g></string>
<!-- Name of the 3.5mm and usb audio device. [CHAR LIMIT=40] -->
<string name="media_transfer_wired_usb_device_name">Wired headphone</string>
</resources>

View File

@@ -61,11 +61,11 @@ public class PhoneMediaDevice extends MediaDevice {
switch (mRouteInfo.getType()) {
case TYPE_WIRED_HEADSET:
case TYPE_WIRED_HEADPHONES:
name = mContext.getString(R.string.media_transfer_wired_device_name);
break;
case TYPE_USB_DEVICE:
case TYPE_USB_HEADSET:
case TYPE_USB_ACCESSORY:
name = mContext.getString(R.string.media_transfer_wired_usb_device_name);
break;
case TYPE_DOCK:
case TYPE_HDMI:
name = mRouteInfo.getName();

View File

@@ -100,12 +100,12 @@ public class PhoneMediaDeviceTest {
when(mInfo.getName()).thenReturn(deviceName);
assertThat(mPhoneMediaDevice.getName())
.isEqualTo(mContext.getString(R.string.media_transfer_wired_device_name));
.isEqualTo(mContext.getString(R.string.media_transfer_wired_usb_device_name));
when(mInfo.getType()).thenReturn(TYPE_USB_DEVICE);
assertThat(mPhoneMediaDevice.getName())
.isEqualTo(deviceName);
.isEqualTo(mContext.getString(R.string.media_transfer_wired_usb_device_name));
when(mInfo.getType()).thenReturn(TYPE_BUILTIN_SPEAKER);