OSDN Git Service

Rename method to discourage use of this in favor of member field
authorAlon Albert <aalbert@google.com>
Wed, 16 Feb 2011 18:29:56 +0000 (10:29 -0800)
committerAlon Albert <aalbert@google.com>
Wed, 16 Feb 2011 18:29:56 +0000 (10:29 -0800)
Change-Id: Ie2d1e17e8879ad0f11fe815001fefccdd6603936

core/java/android/content/SyncManager.java

index ebc1882..2cb8a86 100644 (file)
@@ -241,7 +241,7 @@ public class SyncManager implements OnAccountsUpdateListener {
 
             // don't use the intent to figure out if network is connected, just check
             // ConnectivityManager directly.
-            mDataConnectionIsConnected = isNetworkConnected();
+            mDataConnectionIsConnected = readDataConnectionState();
             if (mDataConnectionIsConnected) {
                 if (!wasConnected) {
                     if (Log.isLoggable(TAG, Log.VERBOSE)) {
@@ -254,7 +254,7 @@ public class SyncManager implements OnAccountsUpdateListener {
         }
     };
 
-    private boolean isNetworkConnected() {
+    private boolean readDataConnectionState() {
         NetworkInfo networkInfo = getConnectivityManager().getActiveNetworkInfo();
         return (networkInfo != null) && networkInfo.isConnected();
     }
@@ -1429,7 +1429,7 @@ public class SyncManager implements OnAccountsUpdateListener {
             // to have the most recent value used.
             try {
                 waitUntilReadyToRun();
-                mDataConnectionIsConnected = isNetworkConnected();
+                mDataConnectionIsConnected = readDataConnectionState();
                 mSyncManagerWakeLock.acquire();
                 // Always do this first so that we be sure that any periodic syncs that
                 // are ready to run have been converted into pending syncs. This allows the