summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTsu Chiang Chuang <tsu@google.com>2012-03-01 17:12:55 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-03-01 17:12:55 -0800
commit756fe38d0883966d143d81f38bb40a4b028ad463 (patch)
tree865057aca0fddafe1c8e133a70250118bc38ee52
parent7eed139cdf6d6bbec82adabb373fa3d87a3a0cea (diff)
parent6053b195bcd49676b46b2257f6e1da04d0b4d9a5 (diff)
downloadframeworks_base-756fe38d0883966d143d81f38bb40a4b028ad463.zip
frameworks_base-756fe38d0883966d143d81f38bb40a4b028ad463.tar.gz
frameworks_base-756fe38d0883966d143d81f38bb40a4b028ad463.tar.bz2
am 6053b195: am bb69bde5: am 3e701270: Merge "extend timeout to allow for more time for the device to connect." into ics-mr1
* commit '6053b195bcd49676b46b2257f6e1da04d0b4d9a5': extend timeout to allow for more time for the device to connect.
-rw-r--r--core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java b/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java
index e799d15..c3cc7c5 100644
--- a/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java
+++ b/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java
@@ -59,7 +59,7 @@ public class ConnectionUtil {
private static final int WAIT_FOR_SCAN_RESULT = 10 * 1000; // 10 seconds
private static final int WIFI_SCAN_TIMEOUT = 50 * 1000;
public static final int SHORT_TIMEOUT = 5 * 1000;
- public static final int LONG_TIMEOUT = 120 * 1000; // 2 minutes
+ public static final int LONG_TIMEOUT = 5 * 60 * 1000; // 5 minutes
private ConnectivityReceiver mConnectivityReceiver = null;
private WifiReceiver mWifiReceiver = null;
private DownloadReceiver mDownloadReceiver = null;
@@ -459,7 +459,13 @@ public class ConnectionUtil {
if (mNetworkInfo == null) {
Log.v(LOG_TAG, "Do not have networkInfo! Force fetch of network info.");
mNetworkInfo = mCM.getActiveNetworkInfo();
- Assert.assertNotNull(mNetworkInfo);
+ }
+ // Still null after force fetch? Maybe the network did not have time to be brought
+ // up yet.
+ if (mNetworkInfo == null) {
+ Log.v(LOG_TAG, "Failed to force fetch networkInfo. " +
+ "The network is still not ready. Wait for the next broadcast");
+ continue;
}
if ((mNetworkInfo.getType() != networkType) ||
(mNetworkInfo.getState() != expectedState)) {