diff options
| author | 2018-12-03 09:49:31 -0800 | |
|---|---|---|
| committer | 2018-12-03 09:49:31 -0800 | |
| commit | 86f0ba7f10198c9cc6f9afc2e0d0e3648439f1ac (patch) | |
| tree | e9d503ea64ad8ea01104607e0773e39a604025f7 | |
| parent | c64eef6211123295597fc7de7c0bf6c49327293e (diff) | |
| parent | 24b217f3f05288d86d9d5d25c2bb97441e0f11a0 (diff) | |
Merge "Display Hearing Aids name on UI tile" am: 4627ad6020
am: 24b217f3f0
Change-Id: Ia5112d8a782fd26102b1213dd277a431f1904a48
| -rw-r--r-- | packages/SystemUI/res/values/strings.xml | 2 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 18f378e5919b..d9da10f2b43d 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -693,6 +693,8 @@ <string name="quick_settings_bluetooth_secondary_label_headset">Headset</string> <!-- QuickSettings: Bluetooth secondary label for an input/IO device being connected [CHAR LIMIT=20]--> <string name="quick_settings_bluetooth_secondary_label_input">Input</string> + <!-- QuickSettings: Bluetooth secondary label for a Hearing Aids device being connected [CHAR LIMIT=20]--> + <string name="quick_settings_bluetooth_secondary_label_hearing_aids">Hearing Aids</string> <!-- QuickSettings: Bluetooth secondary label shown when bluetooth is being enabled [CHAR LIMIT=NONE] --> <string name="quick_settings_bluetooth_secondary_label_transient">Turning on…</string> <!-- QuickSettings: Brightness [CHAR LIMIT=NONE] --> diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java index cd0031173f8b..22c42d4a6a57 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java @@ -207,7 +207,10 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { } else { final BluetoothClass bluetoothClass = lastDevice.getBtClass(); if (bluetoothClass != null) { - if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_A2DP)) { + if (lastDevice.isHearingAidDevice()) { + return mContext.getString( + R.string.quick_settings_bluetooth_secondary_label_hearing_aids); + } else if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_A2DP)) { return mContext.getString( R.string.quick_settings_bluetooth_secondary_label_audio); } else if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_HEADSET)) { |