summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2015-06-08 23:01:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-08 23:01:50 +0000
commit09865312b0e54395837302c3e2299cf14afbe155 (patch)
tree3eef988136b58afdd7f88567e48d1eb3250fd820
parent9b248f4cece271372a9c29f1ffd500ba254118fb (diff)
parent2139c6a3d6d9e00ff03c3278ee3b84211d96b247 (diff)
downloadpackages_providers_ContactsProvider-09865312b0e54395837302c3e2299cf14afbe155.zip
packages_providers_ContactsProvider-09865312b0e54395837302c3e2299cf14afbe155.tar.gz
packages_providers_ContactsProvider-09865312b0e54395837302c3e2299cf14afbe155.tar.bz2
am 2139c6a3: Merge "Set Calls.NEW to 0 if the voicemail is read." into mnc-dev
* commit '2139c6a3d6d9e00ff03c3278ee3b84211d96b247': Set Calls.NEW to 0 if the voicemail is read.
-rw-r--r--src/com/android/providers/contacts/VoicemailContentTable.java6
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();