1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 10:05:49 +01:00

Enhanced logging in BondingUtil

This commit is contained in:
TaaviE 2020-10-07 17:59:21 +03:00
parent 5b7c604d16
commit 824784fd43

View File

@ -277,7 +277,9 @@ public class BondingUtil {
.build();
CompanionDeviceManager manager = (CompanionDeviceManager) bondingInterface.getContext().getSystemService(Context.COMPANION_DEVICE_SERVICE);
LOG.debug(String.format("Searching for %s associations", deviceCandidate.getMacAddress()));
for (String association : manager.getAssociations()) {
LOG.debug(String.format("Already associated with: %s", association));
if (association.equals(deviceCandidate.getMacAddress())) {
LOG.info("The device has already been bonded through CompanionDeviceManager, using regular");
// If it's already "associated", we should immediately pair
@ -287,6 +289,7 @@ public class BondingUtil {
}
}
LOG.debug("Starting association request");
manager.associate(pairingRequest,
getCompanionDeviceManagerCallback(bondingInterface),
null);