summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/btservice/RemoteDevices.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/bluetooth/btservice/RemoteDevices.java')
-rw-r--r--src/com/android/bluetooth/btservice/RemoteDevices.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/btservice/RemoteDevices.java b/src/com/android/bluetooth/btservice/RemoteDevices.java
index 2898145df..fbd8ecd90 100644
--- a/src/com/android/bluetooth/btservice/RemoteDevices.java
+++ b/src/com/android/bluetooth/btservice/RemoteDevices.java
@@ -308,6 +308,8 @@ final class RemoteDevices {
intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, pin);
intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN);
+ // Make intent as foreground
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
// Release wakelock to allow the LCD to go off after the PIN popup notification.
mWakeLock.release();
@@ -448,6 +450,8 @@ final class RemoteDevices {
intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
BluetoothDevice.PAIRING_VARIANT_PIN);
intent.putExtra(BluetoothDevice.EXTRA_SECURE_PAIRING, secure);
+ //Make intent as foreground
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
// Release wakelock to allow the LCD to go off after the PIN popup notification.
mWakeLock.release();
@@ -491,6 +495,8 @@ final class RemoteDevices {
Intent intent = new Intent(BluetoothDevice.ACTION_PAIRING_REQUEST);
intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
+ //Make intent as foreground
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
if (displayPasskey) {
intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, passkey);
}