Merge "Dont start wifi if in airplane mode" into froyo
This commit is contained in:
committed by
Android (Google) Code Review
commit
9c50996b17
@ -263,10 +263,13 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
/**
|
/**
|
||||||
* Check if Wi-Fi needs to be enabled and start
|
* Check if Wi-Fi needs to be enabled and start
|
||||||
* if needed
|
* if needed
|
||||||
|
*
|
||||||
|
* This function is used only at boot time
|
||||||
*/
|
*/
|
||||||
public void startWifi() {
|
public void startWifi() {
|
||||||
/* Start if Wi-Fi is enabled or the saved state indicates Wi-Fi was on */
|
/* Start if Wi-Fi is enabled or the saved state indicates Wi-Fi was on */
|
||||||
boolean wifiEnabled = getPersistedWifiEnabled() || testAndClearWifiSavedState();
|
boolean wifiEnabled = !isAirplaneModeOn()
|
||||||
|
&& (getPersistedWifiEnabled() || testAndClearWifiSavedState());
|
||||||
Slog.i(TAG, "WifiService starting up with Wi-Fi " +
|
Slog.i(TAG, "WifiService starting up with Wi-Fi " +
|
||||||
(wifiEnabled ? "enabled" : "disabled"));
|
(wifiEnabled ? "enabled" : "disabled"));
|
||||||
setWifiEnabled(wifiEnabled);
|
setWifiEnabled(wifiEnabled);
|
||||||
|
Reference in New Issue
Block a user