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

Commit fb999187 authored by Edward Jee's avatar Edward Jee
Browse files

Allows another GMS core app to handle ACTION_PAIRING_REQUEST .

Now we use sendOrderedBroadcast for ACTION_PAIRING_REQUEST , and to
receive this intent, BLUETOOTH_PRIVILEGED is required.

Bug: 11087521
Change-Id: I6aa2fbc6538df39b24f141e7d75adc3658a7e7ac
parent 4b21cc65
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ final class RemoteDevices {
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, pin);
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
                    BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN);
        mAdapterService.sendBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
        mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_PRIVILEGED_PERM);
    }

    void devicePropertyChangedCallback(byte[] address, int[] types, byte[][] values) {
@@ -354,7 +354,7 @@ final class RemoteDevices {
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, getDevice(address));
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
                BluetoothDevice.PAIRING_VARIANT_PIN);
        mAdapterService.sendBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
        mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_PRIVILEGED_PERM);
        return;
    }

@@ -396,7 +396,7 @@ final class RemoteDevices {
            intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, passkey);
        }
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, variant);
        mAdapterService.sendBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
        mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_PRIVILEGED_PERM);
    }

    void aclStateChangeCallback(int status, byte[] address, int newState) {