Remove the Wi-Fi Assistant card.

Per the latest mocks, advanced wireless settings will be the only
location in platform settings where Wi-Fi Assistants are configured.
The card is no longer being used.

Bug: 13780935
Change-Id: Idddf971404532256165045665bd0a6b19966d2bd
This commit is contained in:
Jeff Davidson
2014-11-06 13:30:34 -08:00
parent ac61828bed
commit 99f191f585
21 changed files with 18 additions and 248 deletions

View File

@@ -129,7 +129,7 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
pref.setIntent(intent);
final Context context = getActivity();
NetworkScorerAppData scorer = WifiSettings.getWifiAssistantApp(context);
NetworkScorerAppData scorer = getWifiAssistantApp(context);
SwitchPreference wifiAssistant = (SwitchPreference)findPreference(KEY_WIFI_ASSISTANT);
if (scorer != null) {
final boolean checked = NetworkScorerAppManager.getActiveScorer(context) != null;
@@ -265,7 +265,7 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
return true;
}
NetworkScorerAppData wifiAssistant = WifiSettings.getWifiAssistantApp(context);
NetworkScorerAppData wifiAssistant = getWifiAssistantApp(context);
Intent intent = new Intent();
if (wifiAssistant.mConfigurationActivityClassName != null) {
// App has a custom configuration activity; launch that.
@@ -316,6 +316,22 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
wifiIpAddressPref.setSelectable(false);
}
/**
* Returns the Network Scorer for the Wifi Assistant App.
*/
public static NetworkScorerAppData getWifiAssistantApp(Context context) {
Collection<NetworkScorerAppData> scorers =
NetworkScorerAppManager.getAllValidScorers(context);
if (scorers.isEmpty()) {
return null;
}
// TODO: b/13780935 - Implement proper scorer selection. Rather than pick the first
// scorer on the system, we should allow the user to select one.
return scorers.iterator().next();
}
/* Wrapper class for the WPS dialog to properly handle life cycle events like rotation. */
public static class WpsFragment extends DialogFragment {
private static int mWpsSetup;