Skip to content

Commit

Permalink
Merge pull request #567 from ElectronicSpaceCat/patch-1
Browse files Browse the repository at this point in the history
Update BleManagerHandler.java
  • Loading branch information
philips77 authored Jun 5, 2024
2 parents 889277f + 5e3efd7 commit a51fcea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public void onReceive(final Context context, final Intent intent) {
postCallback(c -> c.onBondingFailed(device));
postBondingStateChange(o -> o.onBondingFailed(device));
log(Log.WARN, () -> "Bonding failed");
if (request != null && request.type == Request.Type.CREATE_BOND) {
if (request != null && (request.type == Request.Type.CREATE_BOND || request.type == Request.Type.ENSURE_BOND)) {
request.notifyFail(device, FailCallback.REASON_REQUEST_FAILED);
request = null;
}
Expand Down Expand Up @@ -389,7 +389,7 @@ public void onReceive(final Context context, final Intent intent) {
log(Log.INFO, () -> "Device bonded");
postCallback(c -> c.onBonded(device));
postBondingStateChange(o -> o.onBonded(device));
if (request != null && request.type == Request.Type.CREATE_BOND) {
if (request != null && (request.type == Request.Type.CREATE_BOND || request.type == Request.Type.ENSURE_BOND)) {
request.notifySuccess(device);
request = null;
break;
Expand Down

0 comments on commit a51fcea

Please sign in to comment.