Comment out the isAvailable optimization.

As the comment says this causes problems if the connection
is handling errors. This removes the optimization for now.

Bug: 3386481
Change-Id: I6cb00abe8b1949e9b79b4906a6bdab5872b5054d
This commit is contained in:
Wink Saville
2011-01-26 15:43:49 -08:00
parent 4e723420e0
commit 72a95b97e9

View File

@@ -1152,7 +1152,17 @@ public class ConnectivityService extends IConnectivityManager.Stub {
if (checkType == prevNetType) continue; if (checkType == prevNetType) continue;
if (mNetAttributes[checkType] == null) continue; if (mNetAttributes[checkType] == null) continue;
if (!mNetAttributes[checkType].isDefault()) continue; if (!mNetAttributes[checkType].isDefault()) continue;
if (!mNetTrackers[checkType].isAvailable()) continue;
// Enabling the isAvailable() optimization caused mobile to not get
// selected if it was in the middle of error handling. Specifically
// a moble connection that took 30 seconds to complete the DEACTIVATE_DATA_CALL
// would not be available and we wouldn't get connected to anything.
// So removing the isAvailable() optimization below for now. TODO: This
// optimization should work and we need to investigate why it doesn't work.
// This could be related to how DEACTIVATE_DATA_CALL is reporting its
// complete before it is really complete.
// if (!mNetTrackers[checkType].isAvailable()) continue;
// if (currentPriority >= mNetAttributes[checkType].mPriority) continue; // if (currentPriority >= mNetAttributes[checkType].mPriority) continue;
NetworkStateTracker checkTracker = mNetTrackers[checkType]; NetworkStateTracker checkTracker = mNetTrackers[checkType];