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

Commit 79592872 authored by zhoutengteng's avatar zhoutengteng Committed by android-build-merger
Browse files

Merge "Fix deadlock of mObject and mDevices in RemoteDevices"

am: ea3e91bc

Change-Id: I776cef7d14d3140ee70c243c84a172bff4dd3154
parents d0881a35 ea3e91bc
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: