Update state as disconnected when Wi-Fi disabled
Connect button display wrong string "Connecting..." and be disabled when Wi-Fi turned off at quick setting. Update state as disconnected when Wi-Fi disabled to fix this issue. Bug: 129514552 Test: manual test Change-Id: I76a247ce0ed951357172e67221281b004df386d8
This commit is contained in:
@@ -271,6 +271,10 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
|
||||
Log.d(TAG, "onWifiStateChanged(" + state + ")");
|
||||
if (mConnectingState == STATE_ENABLE_WIFI && state == WifiManager.WIFI_STATE_ENABLED) {
|
||||
updateConnectingState(STATE_CONNECTING);
|
||||
} else if (mConnectingState != STATE_NONE && state == WifiManager.WIFI_STATE_DISABLED) {
|
||||
// update as disconnected once Wi-Fi disabled since may not received
|
||||
// onConnectedChanged for this case.
|
||||
updateConnectingState(STATE_DISCONNECTED);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user