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

Commit b67b05af authored by Zach Johnson's avatar Zach Johnson Committed by Gerrit Code Review
Browse files

Merge "Simplify checking for locally initiated bonds"

parents e7de3dde 0619e121
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -1476,7 +1476,8 @@ public class AdapterService extends Service {

            enforceBluetoothPermission(service);

            return service.isBondingInitiatedLocally(device);
            DeviceProperties deviceProp = service.mRemoteDevices.getDeviceProperties(device);
            return deviceProp != null && deviceProp.isBondingInitiatedLocally();
        }

        @Override
@@ -2116,14 +2117,6 @@ public class AdapterService extends Service {
        return deviceProp.getBondState();
    }

    boolean isBondingInitiatedLocally(BluetoothDevice device) {
        DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
        if (deviceProp == null) {
            return false;
        }
        return deviceProp.isBondingInitiatedLocally();
    }

    long getSupportedProfiles() {
        return Config.getSupportedProfilesBitMask();
    }