Skip to content

Commit f41d424

Browse files
committed
Fix call to createBond()
1 parent 8d60683 commit f41d424

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/microbit/android/partialflashing/PartialFlashingBaseService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,10 @@ public void onServicesDiscovered(BluetoothGatt gatt, int status) {
651651
logi( "BOND_NONE");
652652
//TODO: access characteristic to initiate bonding
653653
logi("Call createBond()");
654-
boolean started = mBluetoothGatt.getDevice().createBond();
654+
mWaitingForBonding = true;
655+
boolean started = gatt.getDevice().createBond();
655656
if (!started) {
657+
mWaitingForBonding = false;
656658
logi("createBond() failed");
657659
mConnectionState = STATE_ERROR;
658660
}

0 commit comments

Comments
 (0)