Merge "Read unread count in tabs with context in Talkback mode." into ub-contactsdialer-a-dev
diff --git a/src/com/android/contacts/common/model/RawContactModifier.java b/src/com/android/contacts/common/model/RawContactModifier.java
index 63c9a41..c1ee888 100644
--- a/src/com/android/contacts/common/model/RawContactModifier.java
+++ b/src/com/android/contacts/common/model/RawContactModifier.java
@@ -402,6 +402,11 @@
}
public static boolean hasChanges(RawContactDeltaList set, AccountTypeManager accountTypes) {
+ return hasChanges(set, accountTypes, /* excludedMimeTypes =*/ null);
+ }
+
+ public static boolean hasChanges(RawContactDeltaList set, AccountTypeManager accountTypes,
+ Set<String> excludedMimeTypes) {
if (set.isMarkedForSplitting() || set.isMarkedForJoining()) {
return true;
}
@@ -411,7 +416,7 @@
final String accountType = values.getAsString(RawContacts.ACCOUNT_TYPE);
final String dataSet = values.getAsString(RawContacts.DATA_SET);
final AccountType type = accountTypes.getAccountType(accountType, dataSet);
- if (hasChanges(state, type)) {
+ if (hasChanges(state, type, excludedMimeTypes)) {
return true;
}
}
@@ -463,9 +468,11 @@
}
}
- private static boolean hasChanges(RawContactDelta state, AccountType accountType) {
+ private static boolean hasChanges(RawContactDelta state, AccountType accountType,
+ Set<String> excludedMimeTypes) {
for (DataKind kind : accountType.getSortedDataKinds()) {
final String mimeType = kind.mimeType;
+ if (excludedMimeTypes != null && excludedMimeTypes.contains(mimeType)) continue;
final ArrayList<ValuesDelta> entries = state.getMimeEntries(mimeType);
if (entries == null) continue;