Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4672203e authored by Xia Wang's avatar Xia Wang
Browse files

Avoid UNKNOWN state for Wifi in bug2542613, not a common user case.

Change-Id: Ief0a953e2909cb5c808f0d683ab95d14f6c53e72
parent 639a7fc2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -150,6 +150,15 @@ public class ConnectivityManagerMobileTest
    // 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);