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

Commit ea3e91bc authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix deadlock of mObject and mDevices in RemoteDevices"

parents b1cdf593 8a4d25c2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -79,7 +79,8 @@ final class RemoteDevices {
                case MESSAGE_UUID_INTENT:
                    BluetoothDevice device = (BluetoothDevice) msg.obj;
                    if (device != null) {
                        sendUuidIntent(device);
                        DeviceProperties prop = getDeviceProperties(device);
                        sendUuidIntent(device, prop);
                    }
                    break;
            }
@@ -365,8 +366,7 @@ final class RemoteDevices {
        }
    }

    private void sendUuidIntent(BluetoothDevice device) {
        DeviceProperties prop = getDeviceProperties(device);
    private void sendUuidIntent(BluetoothDevice device, DeviceProperties prop) {
        Intent intent = new Intent(BluetoothDevice.ACTION_UUID);
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.putExtra(BluetoothDevice.EXTRA_UUID, prop == null ? null : prop.mUuids);
@@ -545,7 +545,7 @@ final class RemoteDevices {
                            }
                            device.mUuids = newUuids;
                            if (sAdapterService.getState() == BluetoothAdapter.STATE_ON) {
                                sendUuidIntent(bdDevice);
                                sendUuidIntent(bdDevice, device);
                            }
                            break;
                        case AbstractionLayer.BT_PROPERTY_TYPE_OF_DEVICE: