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

Commit 929d2e04 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Merge "bluetooth: Set special delay for LeAudio auto connect" am: a457cb6f

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

Change-Id: Ie7b274afcae17c39de6e2cbd19f881dc7803d28d
parents 58ae8524 a457cb6f
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
    // Some Hearing Aids (especially the 2nd device) needs more time to do service discovery
    // Some Hearing Aids (especially the 2nd device) needs more time to do service discovery
    private static final long MAX_HEARING_AIDS_DELAY_FOR_AUTO_CONNECT = 15000;
    private static final long MAX_HEARING_AIDS_DELAY_FOR_AUTO_CONNECT = 15000;
    private static final long MAX_HOGP_DELAY_FOR_AUTO_CONNECT = 30000;
    private static final long MAX_HOGP_DELAY_FOR_AUTO_CONNECT = 30000;
    private static final long MAX_LEAUDIO_DELAY_FOR_AUTO_CONNECT = 30000;
    private static final long MAX_MEDIA_PROFILE_CONNECT_DELAY = 60000;
    private static final long MAX_MEDIA_PROFILE_CONNECT_DELAY = 60000;


    private final Context mContext;
    private final Context mContext;
@@ -757,6 +758,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
            timeout = MAX_HOGP_DELAY_FOR_AUTO_CONNECT;
            timeout = MAX_HOGP_DELAY_FOR_AUTO_CONNECT;
        } else if (ArrayUtils.contains(uuids, BluetoothUuid.HEARING_AID)) {
        } else if (ArrayUtils.contains(uuids, BluetoothUuid.HEARING_AID)) {
            timeout = MAX_HEARING_AIDS_DELAY_FOR_AUTO_CONNECT;
            timeout = MAX_HEARING_AIDS_DELAY_FOR_AUTO_CONNECT;
        } else if (ArrayUtils.contains(uuids, BluetoothUuid.LE_AUDIO)) {
            timeout = MAX_LEAUDIO_DELAY_FOR_AUTO_CONNECT;
        }
        }


        if (BluetoothUtils.D) {
        if (BluetoothUtils.D) {