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

Commit c8b0259a authored by Yuyang Huang's avatar Yuyang Huang Committed by Android (Google) Code Review
Browse files

Merge "change BAS connectGatt from TRANSPORT_AUTO to TRANSPORT_LE" into tm-qpr-dev

parents 1ff88013 43330375
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.bluetooth.bas;

import static android.bluetooth.BluetoothDevice.PHY_LE_1M_MASK;
import static android.bluetooth.BluetoothDevice.PHY_LE_2M_MASK;
import static android.bluetooth.BluetoothDevice.TRANSPORT_AUTO;
import static android.bluetooth.BluetoothDevice.TRANSPORT_LE;

import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
@@ -233,7 +233,7 @@ public class BatteryStateMachine extends StateMachine {
            mBluetoothGatt.close();
        }
        mBluetoothGatt = mDevice.connectGatt(service, /*autoConnect=*/false,
                mGattCallback, TRANSPORT_AUTO, /*opportunistic=*/true,
                mGattCallback, TRANSPORT_LE, /*opportunistic=*/true,
                PHY_LE_1M_MASK | PHY_LE_2M_MASK, getHandler());
        return mBluetoothGatt != null;
    }