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

Commit 478b2194 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am e318c9a5: Merge "Check null of address in onDeviceCreated" into jb-dev

* commit 'e318c9a5':
  Check null of address in onDeviceCreated
parents c6b93978 e318c9a5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -268,6 +268,11 @@ class BluetoothEventLoop {
     */
    private void onDeviceCreated(String deviceObjectPath) {
        String address = mBluetoothService.getAddressFromObjectPath(deviceObjectPath);
        if (address == null) {
            Log.e(TAG, "onDeviceCreated: device address null!" + " deviceObjectPath: " +
                  deviceObjectPath);
            return;
        }
        if (!mBluetoothService.isRemoteDeviceInCache(address)) {
            // Incoming connection, we haven't seen this device, add to cache.
            String[] properties = mBluetoothService.getRemoteDeviceProperties(address);
@@ -275,7 +280,6 @@ class BluetoothEventLoop {
                addDevice(address, properties);
            }
        }
        return;
    }

    /**