Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments, and use searchable="false" in xml to suppress index. Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69 Fixes: 112608186 Test: robotest and manual search
This commit is contained in:
@@ -22,6 +22,9 @@ import android.location.SettingInjectorService;
|
||||
import android.os.Bundle;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
@@ -41,9 +44,6 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
|
||||
/**
|
||||
* System location settings (Settings > Location). The screen has three parts:
|
||||
* <ul>
|
||||
@@ -180,12 +180,5 @@ public class LocationSettings extends DashboardFragment {
|
||||
return buildPreferenceControllers(context, null /* fragment */,
|
||||
null /* lifecycle */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> niks = super.getNonIndexableKeys(context);
|
||||
niks.add("recent_location_requests_see_all_button"); // 'See all' button
|
||||
return niks;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user