diff options
author | Ajay Panicker <apanicke@google.com> | 2016-07-27 17:18:35 -0700 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-07-28 15:07:36 -0700 |
commit | 50c95d626f57fb7273a16a0a841e935122d07060 (patch) | |
tree | 5d09248d1bb9a167543f1648d931be39488b2ed0 | |
parent | 9ec0a7763cf2797c0287d18c1720033f6038b40c (diff) | |
download | android_packages_apps_Bluetooth-50c95d626f57fb7273a16a0a841e935122d07060.tar.gz android_packages_apps_Bluetooth-50c95d626f57fb7273a16a0a841e935122d07060.tar.bz2 android_packages_apps_Bluetooth-50c95d626f57fb7273a16a0a841e935122d07060.zip |
Change URI accessed to properly update read status
Bug: 28970262
Change-Id: I07d9ab24d10396baa4ddbfbdfad5b1eec1b8e9d5
-rw-r--r-- | src/com/android/bluetooth/map/BluetoothMapContentObserver.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java index 1b8977b5b..0f9e23e7e 100644 --- a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java +++ b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java @@ -2350,21 +2350,19 @@ public class BluetoothMapContentObserver { /* Approved MAP spec errata 3445 states that read status initiated * by the MCE shall change the MSE read status. */ if (type == TYPE.SMS_GSM || type == TYPE.SMS_CDMA) { - Uri uri = Sms.Inbox.CONTENT_URI; + Uri uri = ContentUris.withAppendedId(Sms.CONTENT_URI, handle); ContentValues contentValues = new ContentValues(); contentValues.put(Sms.READ, statusValue); contentValues.put(Sms.SEEN, statusValue); - String where = Sms._ID+"="+handle; String values = contentValues.toString(); - if (D) Log.d(TAG, " -> SMS Uri: " + uri.toString() + - " Where " + where + " values " + values); + if (D) Log.d(TAG, " -> SMS Uri: " + uri.toString() + " values " + values); synchronized(getMsgListSms()) { Msg msg = getMsgListSms().get(handle); if(msg != null) { // This will always be the case msg.flagRead = statusValue; } } - count = mResolver.update(uri, contentValues, where, null); + count = mResolver.update(uri, contentValues, null, null); if (D) Log.d(TAG, " -> "+count +" rows updated!"); } else if (type == TYPE.MMS) { |