[Wi-Fi] Index Wi-Fi preferences.
This is a WifiTracker2 version of partial part of ag/9980423 - Disable the "Saved network" if the access points is empty. - Disable the "Wifi data usage" if there is no wifi radio. Bug: 146823365 Test: manual Search 'Saved networks' when there is a saved Wi-Fi network and when there is no saved Wi-Fi network. Search 'data usage' on the device which supports Wi-Fi and on the device which does not supports Wi-Fi. Change-Id: If46e65585f1b272401666f78fd5e3a4cf49bef6e
This commit is contained in:
@@ -1304,9 +1304,7 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
|
||||
final WifiManager wifiManager = context.getSystemService(WifiManager.class);
|
||||
final List<AccessPoint> accessPoints = WifiSavedConfigUtils.getAllConfigs(
|
||||
context, wifiManager);
|
||||
if (accessPoints == null || accessPoints.size() <= 0) {
|
||||
if (WifiSavedConfigUtils.getAllConfigsCount(context, wifiManager) == 0) {
|
||||
keys.add(PREF_KEY_SAVED_NETWORKS);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user