Merge "Add hearing aid as a BT audio type" into udc-qpr-dev

This commit is contained in:
Vlad Popa
2023-08-23 15:10:46 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 3 deletions

View File

@@ -12008,12 +12008,14 @@
<!-- The title of the bluetooth audio device type selection [CHAR LIMIT=none] --> <!-- The title of the bluetooth audio device type selection [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_types_title">Audio Device Type</string> <string name="bluetooth_details_audio_device_types_title">Audio Device Type</string>
<!-- The audio device type corresponding to unknown selected [CHAR LIMIT=none] --> <!-- The audio device type corresponding to unknown device type [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_type_unknown">Unknown</string> <string name="bluetooth_details_audio_device_type_unknown">Unknown</string>
<!-- The audio device type corresponding to none selected [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_type_speaker">Speaker</string>
<!-- The audio device type corresponding to speakers [CHAR LIMIT=none] --> <!-- The audio device type corresponding to speakers [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_type_speaker">Speaker</string>
<!-- The audio device type corresponding to headphones [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_type_headphones">Headphones</string> <string name="bluetooth_details_audio_device_type_headphones">Headphones</string>
<!-- The audio device type corresponding to hearing aid [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_type_hearing_aid">Hearing Aid</string>
<!-- The audio device type corresponding to car kit [CHAR LIMIT=none] --> <!-- The audio device type corresponding to car kit [CHAR LIMIT=none] -->
<string name="bluetooth_details_audio_device_type_carkit">Car Kit</string> <string name="bluetooth_details_audio_device_type_carkit">Car Kit</string>
<!-- The audio device type corresponding to other device type [CHAR LIMIT=none] --> <!-- The audio device type corresponding to other device type [CHAR LIMIT=none] -->

View File

@@ -19,6 +19,7 @@ package com.android.settings.bluetooth;
import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_LE; import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_LE;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_CARKIT; import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_CARKIT;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_HEADPHONES; import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_HEADPHONES;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_HEARING_AID;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_OTHER; import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_OTHER;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER; import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_UNKNOWN; import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_UNKNOWN;
@@ -149,6 +150,7 @@ public class BluetoothDetailsAudioDeviceTypeController extends BluetoothDetailsC
mContext.getString(R.string.bluetooth_details_audio_device_type_speaker), mContext.getString(R.string.bluetooth_details_audio_device_type_speaker),
mContext.getString(R.string.bluetooth_details_audio_device_type_headphones), mContext.getString(R.string.bluetooth_details_audio_device_type_headphones),
mContext.getString(R.string.bluetooth_details_audio_device_type_carkit), mContext.getString(R.string.bluetooth_details_audio_device_type_carkit),
mContext.getString(R.string.bluetooth_details_audio_device_type_hearing_aid),
mContext.getString(R.string.bluetooth_details_audio_device_type_other), mContext.getString(R.string.bluetooth_details_audio_device_type_other),
}); });
mAudioDeviceTypePreference.setEntryValues(new CharSequence[]{ mAudioDeviceTypePreference.setEntryValues(new CharSequence[]{
@@ -156,6 +158,7 @@ public class BluetoothDetailsAudioDeviceTypeController extends BluetoothDetailsC
Integer.toString(AUDIO_DEVICE_CATEGORY_SPEAKER), Integer.toString(AUDIO_DEVICE_CATEGORY_SPEAKER),
Integer.toString(AUDIO_DEVICE_CATEGORY_HEADPHONES), Integer.toString(AUDIO_DEVICE_CATEGORY_HEADPHONES),
Integer.toString(AUDIO_DEVICE_CATEGORY_CARKIT), Integer.toString(AUDIO_DEVICE_CATEGORY_CARKIT),
Integer.toString(AUDIO_DEVICE_CATEGORY_HEARING_AID),
Integer.toString(AUDIO_DEVICE_CATEGORY_OTHER), Integer.toString(AUDIO_DEVICE_CATEGORY_OTHER),
}); });