Allow enabling Wifi when in airplane mode.

If the new system settings value for AIRPLANE_MODE_TOGGLEABLE_RADIOS
contains RADIO_WIFI, then the user will be allowed to enable Wifi
while in airplane mode.
Turning on airplane mode will still disable Wifi, but the user will
be free to reenable it in the Settings app.

We also allow access to the VPN settings under the same circumstances.

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-07-29 23:25:10 -07:00
parent f0484951fb
commit 83bcc98af1
4 changed files with 47 additions and 34 deletions

View File

@@ -74,7 +74,7 @@ public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListene
mCheckBoxPref.setOnPreferenceChangeListener(null);
}
static boolean isAirplaneModeOn(Context context) {
public static boolean isAirplaneModeOn(Context context) {
return Settings.System.getInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0) != 0;
}