am 3e701270
: Merge "extend timeout to allow for more time for the device to connect." into ics-mr1
* commit '3e70127021f5d5940edfdefd7e33fd65d4ec0449': extend timeout to allow for more time for the device to connect.
This commit is contained in:
@ -59,7 +59,7 @@ public class ConnectionUtil {
|
|||||||
private static final int WAIT_FOR_SCAN_RESULT = 10 * 1000; // 10 seconds
|
private static final int WAIT_FOR_SCAN_RESULT = 10 * 1000; // 10 seconds
|
||||||
private static final int WIFI_SCAN_TIMEOUT = 50 * 1000;
|
private static final int WIFI_SCAN_TIMEOUT = 50 * 1000;
|
||||||
public static final int SHORT_TIMEOUT = 5 * 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 ConnectivityReceiver mConnectivityReceiver = null;
|
||||||
private WifiReceiver mWifiReceiver = null;
|
private WifiReceiver mWifiReceiver = null;
|
||||||
private DownloadReceiver mDownloadReceiver = null;
|
private DownloadReceiver mDownloadReceiver = null;
|
||||||
@ -458,7 +458,13 @@ public class ConnectionUtil {
|
|||||||
if (mNetworkInfo == null) {
|
if (mNetworkInfo == null) {
|
||||||
Log.v(LOG_TAG, "Do not have networkInfo! Force fetch of network info.");
|
Log.v(LOG_TAG, "Do not have networkInfo! Force fetch of network info.");
|
||||||
mNetworkInfo = mCM.getActiveNetworkInfo();
|
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) ||
|
if ((mNetworkInfo.getType() != networkType) ||
|
||||||
(mNetworkInfo.getState() != expectedState)) {
|
(mNetworkInfo.getState() != expectedState)) {
|
||||||
|
Reference in New Issue
Block a user