diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2015-10-05 20:24:18 +0100 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2015-10-05 20:24:18 +0100 |
commit | 6317083c7bab8c8712eab500c78128b2b9f165bc (patch) | |
tree | cb95e8c3b6896d7b0bbd3dbece05f1c8e5c78124 | |
parent | e8c9fbd37f8347e78ae8bb2c0bd1b2756dc14ba6 (diff) | |
parent | 014b90ede66239269138ce3ee0464deffbfbf3c8 (diff) | |
download | android_packages_apps_Bluetooth-6317083c7bab8c8712eab500c78128b2b9f165bc.tar.gz android_packages_apps_Bluetooth-6317083c7bab8c8712eab500c78128b2b9f165bc.tar.bz2 android_packages_apps_Bluetooth-6317083c7bab8c8712eab500c78128b2b9f165bc.zip |
Merge tag 'android-5.1.1_r23' into cm-12.1
Android 5.1.1 release 23
Conflicts:
src/com/android/bluetooth/map/BluetoothMapContentObserver.java
Change-Id: Idb110d4cec541c9adadfee672fe5f869e6ee9926
-rw-r--r-- | src/com/android/bluetooth/map/BluetoothMapContentObserver.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java index c31564297..87918c6d2 100644 --- a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java +++ b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java @@ -34,6 +34,7 @@ import java.util.List; import org.xmlpull.v1.XmlSerializer; +import android.Manifest; import android.app.Activity; import android.app.PendingIntent; import android.content.BroadcastReceiver; @@ -43,11 +44,14 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.pm.PackageManager; import android.database.ContentObserver; import android.database.Cursor; import android.net.Uri; import android.text.format.Time; +import android.os.Binder; import android.os.Handler; +import android.os.Process; import android.provider.BaseColumns; import android.provider.Telephony; import android.provider.Telephony.Mms; @@ -1197,6 +1201,13 @@ public class BluetoothMapContentObserver { private void actionMessageSent(Context context, Intent intent, PushMsgInfo msgInfo) { + /* Check permission for message deletion. */ + if (context.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SMS) + != PackageManager.PERMISSION_GRANTED) { + Log.w(TAG, "actionMessageSent: Not allowed to delete SMS/MMS messages"); + return; + } + int result = getResultCode(); boolean delete = false; |