Merge "Expose PeopleActivity to Instant Apps" into oc-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 11cd4ad..58209ae 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -16,8 +16,8 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.android.contacts"
-          android:versionCode="20000"
-          android:versionName="2.0.0">
+          android:versionCode="10710"
+          android:versionName="1.7.10">
 
     <uses-sdk
         android:minSdkVersion="21"
diff --git a/src/com/android/contacts/model/account/AccountTypeProvider.java b/src/com/android/contacts/model/account/AccountTypeProvider.java
index 38d8ca6..4f83ec6 100644
--- a/src/com/android/contacts/model/account/AccountTypeProvider.java
+++ b/src/com/android/contacts/model/account/AccountTypeProvider.java
@@ -140,14 +140,14 @@
     public boolean shouldUpdate(AuthenticatorDescription[] auths, SyncAdapterType[] syncTypes) {
         Map<String, AuthenticatorDescription> contactsAuths = onlyContactSyncable(auths, syncTypes);
         if (!contactsAuths.keySet().equals(mAuthTypes.keySet())) {
-            return false;
+            return true;
         }
         for (AuthenticatorDescription auth : contactsAuths.values()) {
             if (!deepEquals(mAuthTypes.get(auth.type), auth)) {
-                return false;
+                return true;
             }
         }
-        return true;
+        return false;
     }
 
     public boolean supportsContactsSyncing(String accountType) {
@@ -157,6 +157,9 @@
     private List<AccountType> loadTypes(String type) {
         final AuthenticatorDescription auth = mAuthTypes.get(type);
         if (auth == null) {
+            if (Log.isLoggable(TAG, Log.DEBUG)) {
+                Log.d(TAG, "Null auth type for " + type);
+            }
             return Collections.emptyList();
         }
 
@@ -170,6 +173,10 @@
             accountType = new SamsungAccountType(mContext, auth.packageName, type);
         } else if (!ExternalAccountType.hasContactsXml(mContext, auth.packageName)
                 && isLocalAccountType(mLocalAccountTypeFactory, type)) {
+            if (Log.isLoggable(TAG, Log.DEBUG)) {
+                Log.d(TAG, "Registering local account type=" + type
+                        + ", packageName=" + auth.packageName);
+            }
             accountType = mLocalAccountTypeFactory.getAccountType(type);
         } else {
             if (Log.isLoggable(TAG, Log.DEBUG)) {
@@ -184,6 +191,10 @@
                         + accountType.getClass().getCanonicalName());
             } else {
                 // Skip external account types that couldn't be initialized
+                if (Log.isLoggable(TAG, Log.DEBUG)) {
+                    Log.d(TAG, "Skipping external account type=" + type
+                            + ", packageName=" + auth.packageName);
+                }
                 return Collections.emptyList();
             }
         }