Hide emergency setting from "Search settings"

Use the same config value created in ag/16497464 and ag/16497621
to determine if emergency setting should be searchable in Settings.

Bug: 220437126
Test: Manual test on affected phone and tablet
Change-Id: I964dd9f75f6a5c3b239aabfa4dfce84cb75c8565
This commit is contained in:
Patrick Huang
2022-03-18 06:51:31 +00:00
parent cbc67a41a0
commit 8f1e3fec84

View File

@@ -66,5 +66,10 @@ public class EmergencyDashboardFragment extends DashboardFragment {
}
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider(R.xml.emergency_settings);
new BaseSearchIndexProvider(R.xml.emergency_settings) {
@Override
protected boolean isPageSearchEnabled(Context context) {
return context.getResources().getBoolean(R.bool.config_show_emergency_settings);
}
};
}