aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-05-28 07:40:53 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-05-28 07:40:53 +0000
commit5321cd39cf9c5d3e96d5e4156a5b3143fd261ef8 (patch)
treec2b2cb8fa0bf049e872c3a851b3a589c89735465
parentff9fcfe06d33cb12ef434daa9316ea989f90960c (diff)
parent9ff27b66e1536a9ab643fe854c602be45ff3e55b (diff)
downloadContactsProvider-5321cd39cf9c5d3e96d5e4156a5b3143fd261ef8.tar.gz
release-request-80d7cd88-53c4-4e65-952a-f34bc86a0841-for-git_oc-mr1-release-4050000 snap-temp-L22200000068540971
Change-Id: Ied2f5e132c5307876a9208dcd120c44601c0520f
-rw-r--r--src/com/android/providers/contacts/DbModifierWithNotification.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/providers/contacts/DbModifierWithNotification.java b/src/com/android/providers/contacts/DbModifierWithNotification.java
index f67a2a8f..cb5460ce 100644
--- a/src/com/android/providers/contacts/DbModifierWithNotification.java
+++ b/src/com/android/providers/contacts/DbModifierWithNotification.java
@@ -37,9 +37,11 @@ import android.provider.VoicemailContract;
import android.provider.VoicemailContract.Status;
import android.provider.VoicemailContract.Voicemails;
import android.util.Log;
+
import com.android.common.io.MoreCloseables;
import com.android.providers.contacts.CallLogDatabaseHelper.Tables;
import com.android.providers.contacts.util.DbQueryUtils;
+
import com.google.android.collect.Lists;
import com.google.common.collect.Iterables;
import java.util.ArrayList;
@@ -172,7 +174,14 @@ public class DbModifierWithNotification implements DatabaseModifier {
// from the server and thus is synced or "clean". Otherwise, it means that a local
// change is being made to the database, so the entries should be marked as "dirty"
// so that the corresponding sync adapter knows they need to be synced.
- final int isDirty = isSelfModifyingOrInternal(packagesModified) ? 0 : 1;
+ int isDirty;
+ Integer callerSetDirty = values.getAsInteger(Voicemails.DIRTY);
+ if (callerSetDirty != null) {
+ // Respect the calling package if it sets the dirty flag
+ isDirty = callerSetDirty == 0 ? 0 : 1;
+ } else {
+ isDirty = isSelfModifyingOrInternal(packagesModified) ? 0 : 1;
+ }
values.put(VoicemailContract.Voicemails.DIRTY, isDirty);
if (isDirty == 0 && values.containsKey(Calls.IS_READ) && getAsBoolean(values,