Merge "Add the API to get the AudioLocation"
This commit is contained in:
@@ -1115,7 +1115,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
final boolean isOnCall = Utils.isAudioModeOngoingCall(mContext);
|
final boolean isOnCall = Utils.isAudioModeOngoingCall(mContext);
|
||||||
if ((mIsActiveDeviceHearingAid)
|
if ((mIsActiveDeviceHearingAid)
|
||||||
|| (mIsActiveDeviceHeadset && isOnCall)
|
|| (mIsActiveDeviceHeadset && isOnCall)
|
||||||
|| (mIsActiveDeviceA2dp && !isOnCall)) {
|
|| (mIsActiveDeviceA2dp && !isOnCall)
|
||||||
|
|| mIsActiveDeviceLeAudio) {
|
||||||
if (isTwsBatteryAvailable(leftBattery, rightBattery) && !shortSummary) {
|
if (isTwsBatteryAvailable(leftBattery, rightBattery) && !shortSummary) {
|
||||||
stringRes = R.string.bluetooth_active_battery_level_untethered;
|
stringRes = R.string.bluetooth_active_battery_level_untethered;
|
||||||
} else if (batteryLevelPercentageString != null && !shortSummary) {
|
} else if (batteryLevelPercentageString != null && !shortSummary) {
|
||||||
|
|||||||
@@ -246,6 +246,13 @@ public class LeAudioProfile implements LocalBluetoothProfile {
|
|||||||
return R.drawable.ic_bt_le_audio;
|
return R.drawable.ic_bt_le_audio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAudioLocation(BluetoothDevice device) {
|
||||||
|
if (mService == null || device == null) {
|
||||||
|
return BluetoothLeAudio.AUDIO_LOCATION_INVALID;
|
||||||
|
}
|
||||||
|
return mService.getAudioLocation(device);
|
||||||
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.S)
|
@RequiresApi(Build.VERSION_CODES.S)
|
||||||
protected void finalize() {
|
protected void finalize() {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
|
|||||||
Reference in New Issue
Block a user