diff options
author | Nancy Chen <nancychen@google.com> | 2015-06-08 22:53:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-08 22:53:57 +0000 |
commit | 2139c6a3d6d9e00ff03c3278ee3b84211d96b247 (patch) | |
tree | 51f50c7d495307468953074529d41001ff534cb0 /src/com | |
parent | 1440fb9d8e4edefb57336532734f7cbab13a955f (diff) | |
parent | 5638e7fa091fa925b539a54bbf63abf94ea4c257 (diff) | |
download | packages_providers_ContactsProvider-2139c6a3d6d9e00ff03c3278ee3b84211d96b247.zip packages_providers_ContactsProvider-2139c6a3d6d9e00ff03c3278ee3b84211d96b247.tar.gz packages_providers_ContactsProvider-2139c6a3d6d9e00ff03c3278ee3b84211d96b247.tar.bz2 |
Merge "Set Calls.NEW to 0 if the voicemail is read." into mnc-dev
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/providers/contacts/VoicemailContentTable.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/providers/contacts/VoicemailContentTable.java b/src/com/android/providers/contacts/VoicemailContentTable.java index 7f943e3..87a2349 100644 --- a/src/com/android/providers/contacts/VoicemailContentTable.java +++ b/src/com/android/providers/contacts/VoicemailContentTable.java @@ -140,9 +140,11 @@ public class VoicemailContentTable implements VoicemailTable.Delegate { // call type is always voicemail. copiedValues.put(Calls.TYPE, Calls.VOICEMAIL_TYPE); - // By default marked as new, unless explicitly overridden. + // A voicemail is marked as new unless it is marked as read or explicitly overridden. + boolean isRead = values.containsKey(Calls.IS_READ) ? + values.get(Calls.IS_READ).equals(1) : false; if (!values.containsKey(Calls.NEW)) { - copiedValues.put(Calls.NEW, 1); + copiedValues.put(Calls.NEW, !isRead); } SQLiteDatabase db = mDbHelper.getWritableDatabase(); |