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

Commit 5106a199 authored by Rahul Sabnis's avatar Rahul Sabnis
Browse files

Ensure device properties are non-null before checking if the device is

bonding in RemoteDevices#fetchUuids

Tag: #feature
Bug: 192027306
Test: Manual
Merged-In: Idd6a2feb5c7cd91d6c22515baa4012e6bcf3fd03
Change-Id: Idd6a2feb5c7cd91d6c22515baa4012e6bcf3fd03
parent c76e8f76
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -698,8 +698,9 @@ final class RemoteDevices {
        }

        // If no UUIDs are cached and the device is bonding, wait for SDP after the device is bonded
        boolean isBonding = getDeviceProperties(device).isBonding();
        if (isBonding && getDeviceProperties(device).getUuids() == null) {
        DeviceProperties deviceProperties = getDeviceProperties(device);
        if (deviceProperties != null && deviceProperties.isBonding()
                && getDeviceProperties(device).getUuids() == null) {
            return;
        }

@@ -710,7 +711,7 @@ final class RemoteDevices {
        mHandler.sendMessageDelayed(message, UUID_INTENT_DELAY);

        // Uses cached UUIDs if we are bonding. If not, we fetch the UUIDs with SDP.
        if (!isBonding) {
        if (deviceProperties == null || !deviceProperties.isBonding()) {
            sAdapterService.getRemoteServicesNative(Utils.getBytesFromAddress(device.getAddress()));
        }
    }