summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-06-07 10:28:16 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-06-07 11:54:38 -0700
commitef133b18578fd82dfd7abfb961acb783dfae2854 (patch)
treeab20c4aee4e12bfd81bdc236f63d4b02855e8d6b
parent8a156bea7ed926c9f70e1c58f8d3fbfd7cceb966 (diff)
parenta283d524475da1b9ce9013eb2c8709bc7bd9dcfc (diff)
downloadandroid_packages_apps_Bluetooth-ef133b18578fd82dfd7abfb961acb783dfae2854.tar.gz
android_packages_apps_Bluetooth-ef133b18578fd82dfd7abfb961acb783dfae2854.tar.bz2
android_packages_apps_Bluetooth-ef133b18578fd82dfd7abfb961acb783dfae2854.zip
Merge tag 'android-6.0.1_r46' into HEAD
Android 6.0.1 release 46 Change-Id: I75237fcf04ee9c926c74651268d71c1cb211ec32
-rwxr-xr-xsrc/com/android/bluetooth/map/BluetoothMapService.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapService.java b/src/com/android/bluetooth/map/BluetoothMapService.java
index 003687658..4109cb597 100755
--- a/src/com/android/bluetooth/map/BluetoothMapService.java
+++ b/src/com/android/bluetooth/map/BluetoothMapService.java
@@ -29,6 +29,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentFilter.MalformedMimeTypeException;
+import android.Manifest;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
@@ -625,7 +626,10 @@ public class BluetoothMapService extends ProfileService {
if (!mRegisteredMapReceiver) {
try {
registerReceiver(mMapReceiver, filter);
- registerReceiver(mMapReceiver, filterMessageSent);
+ // We need WRITE_SMS permission to handle messages in
+ // actionMessageSentDisconnected()
+ registerReceiver(mMapReceiver, filterMessageSent,
+ Manifest.permission.WRITE_SMS, null);
mRegisteredMapReceiver = true;
} catch (Exception e) {
Log.e(TAG,"Unable to register map receiver",e);
@@ -1113,8 +1117,12 @@ public class BluetoothMapService extends ProfileService {
{
/* We do not have a connection to a device, hence we need to move
the SMS to the correct folder. */
- BluetoothMapContentObserver
+ try {
+ BluetoothMapContentObserver
.actionMessageSentDisconnected(context, intent, result);
+ } catch(IllegalArgumentException e) {
+ return;
+ }
}
} else if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED) &&
mIsWaitingAuthorization) {