Remove search duplicates for Wifi and Bluetooth

Remove the master switch duplicates between the switch
and their targets. Only show the actual Wifi and Bluetooth
settings as search results.

Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I226cc8db40a308bd9bcfacdd4fc6ae709fb809c5
This commit is contained in:
Matthew Fritze
2017-04-13 13:08:33 -07:00
parent 32d3d383cb
commit 2caaa7420d
8 changed files with 55 additions and 21 deletions

View File

@@ -142,5 +142,13 @@ public class NetworkDashboardFragment extends DashboardFragment implements
sir.xmlResId = R.xml.network_and_internet;
return Arrays.asList(sir);
}
@Override
public List<String> getNonIndexableKeys(Context context) {
List<String> keys = new ArrayList<>();
// Remove master switch as a result
keys.add(WifiMasterSwitchPreferenceController.KEY_TOGGLE_WIFI);
return keys;
}
};
}