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

Commit 0619e121 authored by Zach Johnson's avatar Zach Johnson
Browse files

Simplify checking for locally initiated bonds

Bug: 145171640
Test: compile & run
Change-Id: I40d8bcc725aafd34a1d512eef3c4ec73c14fd9c5
parent c964871b
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -1475,7 +1475,8 @@ public class AdapterService extends Service {

            enforceBluetoothPermission(service);

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

        @Override
@@ -2101,14 +2102,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();
    }