Loading android/app/src/com/android/bluetooth/bas/BatteryStateMachine.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -223,14 +223,13 @@ public class BatteryStateMachine extends StateMachine { return false; return false; } } if (mBluetoothGatt != null) { if (mBluetoothGatt == null) { mBluetoothGatt.connect(); } else { mGattCallback = new GattCallback(); mGattCallback = new GattCallback(); mBluetoothGatt = mDevice.connectGatt(service, /*autoConnect=*/true, mBluetoothGatt = mDevice.connectGatt(service, /*autoConnect=*/false, mGattCallback, TRANSPORT_AUTO, /*opportunistic=*/true, mGattCallback, TRANSPORT_AUTO, /*opportunistic=*/true, PHY_LE_1M_MASK | PHY_LE_2M_MASK, getHandler()); PHY_LE_1M_MASK | PHY_LE_2M_MASK, getHandler()); } } // opportunistic client will reconnect itself, no need to call mBluetoothGatt.connect() return mBluetoothGatt != null; return mBluetoothGatt != null; } } Loading Loading
android/app/src/com/android/bluetooth/bas/BatteryStateMachine.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -223,14 +223,13 @@ public class BatteryStateMachine extends StateMachine { return false; return false; } } if (mBluetoothGatt != null) { if (mBluetoothGatt == null) { mBluetoothGatt.connect(); } else { mGattCallback = new GattCallback(); mGattCallback = new GattCallback(); mBluetoothGatt = mDevice.connectGatt(service, /*autoConnect=*/true, mBluetoothGatt = mDevice.connectGatt(service, /*autoConnect=*/false, mGattCallback, TRANSPORT_AUTO, /*opportunistic=*/true, mGattCallback, TRANSPORT_AUTO, /*opportunistic=*/true, PHY_LE_1M_MASK | PHY_LE_2M_MASK, getHandler()); PHY_LE_1M_MASK | PHY_LE_2M_MASK, getHandler()); } } // opportunistic client will reconnect itself, no need to call mBluetoothGatt.connect() return mBluetoothGatt != null; return mBluetoothGatt != null; } } Loading