am 3e6c1696: am 11505b47: Merge "Avoid UNKNOWN state for Wifi in bug2542613, not a common user case." into froyo
Merge commit '3e6c1696135f267cc59d050747839c56ce868ef9' into kraken * commit '3e6c1696135f267cc59d050747839c56ce868ef9': Avoid UNKNOWN state for Wifi in bug2542613, not a common user case.
This commit is contained in:
@@ -150,6 +150,15 @@ public class ConnectivityManagerMobileTest
|
|||||||
// Test case 1: Test enabling Wifi without associating with any AP
|
// Test case 1: Test enabling Wifi without associating with any AP
|
||||||
@LargeTest
|
@LargeTest
|
||||||
public void test3GToWifiNotification() {
|
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
|
// As Wifi stays in DISCONNECTED, the connectivity manager will not broadcast
|
||||||
// any network connectivity event for Wifi
|
// any network connectivity event for Wifi
|
||||||
NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
|
NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
|
||||||
|
|||||||
Reference in New Issue
Block a user