am 48ef378d: Merge "DO NOT MERGE Avoid wifi disable in a UNKNOWN state" into eclair
Merge commit '48ef378d01b3ace349cbb6ba564276b854d872c9' into eclair-plus-aosp * commit '48ef378d01b3ace349cbb6ba564276b854d872c9': DO NOT MERGE Avoid wifi disable in a UNKNOWN state
This commit is contained in:
@@ -329,6 +329,17 @@ public class WifiService extends IWifiManager.Stub {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple calls to unregisterReceiver() cause exception and a system crash.
|
||||
* This can happen if a supplicant is lost (or firmware crash occurs) and user indicates
|
||||
* disable wifi at the same time.
|
||||
* Avoid doing a disable when the current Wifi state is UNKNOWN
|
||||
* TODO: Handle driver load fail and supplicant lost as seperate states
|
||||
*/
|
||||
if (mWifiState == WIFI_STATE_UNKNOWN && !enable) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setWifiEnabledState(enable ? WIFI_STATE_ENABLING : WIFI_STATE_DISABLING, uid);
|
||||
|
||||
if (enable) {
|
||||
|
||||
Reference in New Issue
Block a user