commit | 4672203ea119f38786f55ac866f38da307671a49 | [log] [tgz] |
---|---|---|
author | Xia Wang <xiaw@google.com> | Thu May 06 14:12:54 2010 -0700 |
committer | Xia Wang <xiaw@google.com> | Thu May 06 14:58:40 2010 -0700 |
tree | 6a8bcc5687a6c97cf22fc09a3cd42611051aa4b4 | |
parent | 639a7fc2c2d0bda12fef0c822bb2e3c002d5c5b4 [diff] |
Avoid UNKNOWN state for Wifi in bug2542613, not a common user case. Change-Id: Ief0a953e2909cb5c808f0d683ab95d14f6c53e72
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java index ae3daad..cdaefc8 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
@@ -150,6 +150,15 @@ // Test case 1: Test enabling Wifi without associating with any AP @LargeTest public void test3GToWifiNotification() { + // To avoid UNKNOWN state when device boots up + cmActivity.enableWifi(); + try { + Thread.sleep(2 * STATE_TRANSITION_SHORT_TIMEOUT); + } catch (Exception e) { + Log.v(LOG_TAG, "exception: " + e.toString()); + } + + cmActivity.disableWifi(); // As Wifi stays in DISCONNECTED, the connectivity manager will not broadcast // any network connectivity event for Wifi NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);