Loading core/java/android/content/SyncManager.java +18 −2 Original line number Diff line number Diff line Loading @@ -1691,12 +1691,28 @@ public class SyncManager implements OnAccountsUpdateListener { continue; } // skip the sync if it isn't manual and auto sync or // background data usage is disabled final RegisteredServicesCache.ServiceInfo<SyncAdapterType> syncAdapterInfo; syncAdapterInfo = mSyncAdapters.getServiceInfo( SyncAdapterType.newKey(op.authority, op.account.type)); // only proceed if network is connected for requesting UID final boolean uidNetworkConnected; if (syncAdapterInfo != null) { final NetworkInfo networkInfo = getConnectivityManager() .getActiveNetworkInfoForUid(syncAdapterInfo.uid); uidNetworkConnected = networkInfo != null && networkInfo.isConnected(); } else { uidNetworkConnected = false; } // skip the sync if it isn't manual, and auto sync or // background data usage is disabled or network is // disconnected for the target UID. if (!op.extras.getBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, false) && (syncableState > 0) && (!masterSyncAutomatically || !backgroundDataUsageAllowed || !uidNetworkConnected || !mSyncStorageEngine.getSyncAutomatically( op.account, op.authority))) { operationIterator.remove(); Loading Loading
core/java/android/content/SyncManager.java +18 −2 Original line number Diff line number Diff line Loading @@ -1691,12 +1691,28 @@ public class SyncManager implements OnAccountsUpdateListener { continue; } // skip the sync if it isn't manual and auto sync or // background data usage is disabled final RegisteredServicesCache.ServiceInfo<SyncAdapterType> syncAdapterInfo; syncAdapterInfo = mSyncAdapters.getServiceInfo( SyncAdapterType.newKey(op.authority, op.account.type)); // only proceed if network is connected for requesting UID final boolean uidNetworkConnected; if (syncAdapterInfo != null) { final NetworkInfo networkInfo = getConnectivityManager() .getActiveNetworkInfoForUid(syncAdapterInfo.uid); uidNetworkConnected = networkInfo != null && networkInfo.isConnected(); } else { uidNetworkConnected = false; } // skip the sync if it isn't manual, and auto sync or // background data usage is disabled or network is // disconnected for the target UID. if (!op.extras.getBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, false) && (syncableState > 0) && (!masterSyncAutomatically || !backgroundDataUsageAllowed || !uidNetworkConnected || !mSyncStorageEngine.getSyncAutomatically( op.account, op.authority))) { operationIterator.remove(); Loading