diff options
author | Rohit Singh <singhr@codeaurora.org> | 2014-02-20 18:39:34 +0530 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2014-06-05 12:29:05 -0700 |
commit | f40f0910963aefdb7d914f13a4ec3a8484f1062e (patch) | |
tree | fa10667b9b69871c77497d8591a19ada42701b78 /src | |
parent | a39dd69c39ffc258e5444680ca7295364d946582 (diff) | |
download | android_packages_apps_Bluetooth-f40f0910963aefdb7d914f13a4ec3a8484f1062e.tar.gz android_packages_apps_Bluetooth-f40f0910963aefdb7d914f13a4ec3a8484f1062e.tar.bz2 android_packages_apps_Bluetooth-f40f0910963aefdb7d914f13a4ec3a8484f1062e.zip |
Bluetooth: Making Intent for pairing in foreground.
During BT ON when headset is previously connected and second
device is trying to pair, Intent ACTION_PAIRING_REQUEST is
not received by application in time.
Changes made to make ACTION_PAIRING_REQUEST in foreground.
CRs-Fixed: 612574
Change-Id: I6b98fbb73a1b1f2d1794f02713578d24988e456f
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/bluetooth/btservice/RemoteDevices.java | 6 |
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); } |