Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78d86dc3 authored by SongFerng Wang's avatar SongFerng Wang Committed by Automerger Merge Worker
Browse files

Merge "Add the API to get the AudioLocation" am: 91919457

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2027930

Change-Id: I610a180cfaee503e34396dd7990ba38ed8c2c637
parents 4a0307de 91919457
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1115,7 +1115,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
                final boolean isOnCall = Utils.isAudioModeOngoingCall(mContext);
                if ((mIsActiveDeviceHearingAid)
                        || (mIsActiveDeviceHeadset && isOnCall)
                        || (mIsActiveDeviceA2dp && !isOnCall)) {
                        || (mIsActiveDeviceA2dp && !isOnCall)
                        || mIsActiveDeviceLeAudio) {
                    if (isTwsBatteryAvailable(leftBattery, rightBattery) && !shortSummary) {
                        stringRes = R.string.bluetooth_active_battery_level_untethered;
                    } else if (batteryLevelPercentageString != null && !shortSummary) {
+7 −0
Original line number Diff line number Diff line
@@ -246,6 +246,13 @@ public class LeAudioProfile implements LocalBluetoothProfile {
        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)
    protected void finalize() {
        if (DEBUG) {