Added a screen to configure wireless scanning

- Created "Scanning" preference screen

- Added overflow menu on "Location" settings to access "Scanning" settings

- Moved "Wi-Fi scanning always available" from Wi-Fi settings to "Scanning"
  settings

- Added "Bluetooth scanning always available" preference (UI only)

Change-Id: I85d8cd60ab309db5db9caee43f4b5a117192d904
This commit is contained in:
Lifu Tang
2015-03-23 13:16:56 -07:00
parent 584b2b2bc1
commit cb193d55e1
6 changed files with 145 additions and 22 deletions

View File

@@ -58,7 +58,6 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
private static final String KEY_FREQUENCY_BAND = "frequency_band";
private static final String KEY_NOTIFY_OPEN_NETWORKS = "notify_open_networks";
private static final String KEY_SLEEP_POLICY = "sleep_policy";
private static final String KEY_SCAN_ALWAYS_AVAILABLE = "wifi_scan_always_available";
private static final String KEY_INSTALL_CREDENTIALS = "install_credentials";
private static final String KEY_WIFI_ASSISTANT = "wifi_assistant";
private static final String KEY_WIFI_DIRECT = "wifi_direct";
@@ -119,11 +118,6 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0) == 1);
notifyOpenNetworks.setEnabled(mWifiManager.isWifiEnabled());
SwitchPreference scanAlwaysAvailable =
(SwitchPreference) findPreference(KEY_SCAN_ALWAYS_AVAILABLE);
scanAlwaysAvailable.setChecked(Global.getInt(getContentResolver(),
Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1);
Intent intent = new Intent(Credentials.INSTALL_AS_USER_ACTION);
intent.setClassName("com.android.certinstaller",
"com.android.certinstaller.CertInstallerMain");
@@ -245,10 +239,6 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
Global.putInt(getContentResolver(),
Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
((SwitchPreference) preference).isChecked() ? 1 : 0);
} else if (KEY_SCAN_ALWAYS_AVAILABLE.equals(key)) {
Global.putInt(getContentResolver(),
Global.WIFI_SCAN_ALWAYS_AVAILABLE,
((SwitchPreference) preference).isChecked() ? 1 : 0);
} else {
return super.onPreferenceTreeClick(screen, preference);
}