Move some wifi tracking code to SettingsLib

Move tracking of which networks are available/saved and their state
over to SettingsLib to share it with Quick Settings.

Bug: 19180466
Change-Id: Iaeef06b26da8cb38e1ba09a7d105d04d499dc181
This commit is contained in:
Jason Monk
2015-01-28 10:35:53 -05:00
parent 544714d0ea
commit fc1b00cfe4
17 changed files with 302 additions and 1270 deletions

View File

@@ -230,16 +230,6 @@ public class WirelessSettings extends SettingsPreferenceFragment
Log.d(TAG, s);
}
public static boolean isRadioAllowed(Context context, String type) {
if (!AirplaneModeEnabler.isAirplaneModeOn(context)) {
return true;
}
// Here we use the same logic in onCreate().
String toggleable = Settings.Global.getString(context.getContentResolver(),
Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
return toggleable != null && toggleable.contains(type);
}
private boolean isSmsSupported() {
// Some tablet has sim card but could not do telephony operations. Skip those.
return mTm.isSmsCapable();