summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/map
diff options
context:
space:
mode:
authorHemant Gupta <hemantg@codeaurora.org>2014-12-22 12:59:23 +0530
committerHemant Gupta <hemantg@codeaurora.org>2014-12-22 13:05:07 +0530
commitccfb52f8d51f5e14b6e666f304647a6805ad9d50 (patch)
tree8def6ddbed470731254dcc7290416482a8a0db7a /src/com/android/bluetooth/map
parent7baac1558b4e3080aba22aa3a2a1a62a5241e2c9 (diff)
downloadandroid_packages_apps_Bluetooth-ccfb52f8d51f5e14b6e666f304647a6805ad9d50.tar.gz
android_packages_apps_Bluetooth-ccfb52f8d51f5e14b6e666f304647a6805ad9d50.tar.bz2
android_packages_apps_Bluetooth-ccfb52f8d51f5e14b6e666f304647a6805ad9d50.zip
MAP: Broadcast intent with FLAG_RECEIVER_FOREGROUND parameter
This patch adds FLAG_RECEIVER_FOREGROUND parameter before broadcasting intent so that intent is not delayed and can be received by settings app on time, thereby preventing connection failure for MAP Change-Id: I2a748316eda900aa9a30b84fa4ec233bb8612a33 CRs-Fixed: 771048
Diffstat (limited to 'src/com/android/bluetooth/map')
-rw-r--r--src/com/android/bluetooth/map/BluetoothMapService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapService.java b/src/com/android/bluetooth/map/BluetoothMapService.java
index 7582766b1..73963b48d 100644
--- a/src/com/android/bluetooth/map/BluetoothMapService.java
+++ b/src/com/android/bluetooth/map/BluetoothMapService.java
@@ -246,6 +246,7 @@ public class BluetoothMapService extends ProfileService {
intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mRemoteDevice);
intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE,
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
sendBroadcast(intent, BLUETOOTH_PERM);
isWaitingAuthorization = false;
removeTimeoutMsg = false;
@@ -967,6 +968,7 @@ public class BluetoothMapService extends ProfileService {
intent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE,
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mRemoteDevice);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
sendBroadcast(intent, BLUETOOTH_ADMIN_PERM);
if (DEBUG) Log.d(TAG, "waiting for authorization for connection from: "
@@ -1014,6 +1016,7 @@ public class BluetoothMapService extends ProfileService {
timeoutIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mRemoteDevice);
timeoutIntent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE,
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
sendBroadcast(timeoutIntent, BLUETOOTH_PERM);
isWaitingAuthorization = false;
removeTimeoutMsg = false;
@@ -1091,6 +1094,7 @@ public class BluetoothMapService extends ProfileService {
timeoutIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mRemoteDevice);
timeoutIntent.putExtra(BluetoothDevice.EXTRA_ACCESS_REQUEST_TYPE,
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
sendBroadcast(timeoutIntent, BLUETOOTH_PERM);
isWaitingAuthorization = false;
removeTimeoutMsg = false;