OSDN Git Service

Fix a regression in sync manager
authorSvet Ganov <svetoslavganov@google.com>
Thu, 25 Aug 2016 22:40:52 +0000 (15:40 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Thu, 25 Aug 2016 22:48:17 +0000 (22:48 +0000)
A previous change introduced the regression that we don't let
initialization syncs run - this reverts the original logic.

bug:31056110

Change-Id: I4382af1284a3296c63ab773aa4a52df01deeb853

services/core/java/com/android/server/content/SyncManager.java

index e0aac7b..f739fa8 100644 (file)
@@ -2853,9 +2853,9 @@ public class SyncManager {
                 }
                 return SYNC_OP_STATE_INVALID_NO_ACCOUNT_ACCESS;
             }
-            if (state != AuthorityInfo.SYNCABLE) {
+            if (state == AuthorityInfo.NOT_SYNCABLE) {
                 if (isLoggable) {
-                    Slog.v(TAG, "    Dropping sync operation: isSyncable != SYNCABLE");
+                    Slog.v(TAG, "    Dropping sync operation: isSyncable == NOT_SYNCABLE");
                 }
                 return SYNC_OP_STATE_INVALID;
             }