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

Commit d6a1af9a authored by Matthew Xie's avatar Matthew Xie
Browse files

Add Intent.FLAG_RECEIVER_FOREGROUND for pairing intent broadcast

The pairing intents targeting apps for user interaction. The flag
should be used.
bug 13909361

Change-Id: I13f10df46549773bf416f72ca630ea8ee49fe548
parent 0a7a87ae
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -228,6 +228,7 @@ final class RemoteDevices {
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, pin);
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
                    BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
    }

@@ -354,6 +355,7 @@ final class RemoteDevices {
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, getDevice(address));
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
                BluetoothDevice.PAIRING_VARIANT_PIN);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
        return;
    }
@@ -396,6 +398,7 @@ final class RemoteDevices {
            intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, passkey);
        }
        intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, variant);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
    }