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:
@@ -27,6 +27,9 @@ import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -39,9 +42,6 @@ import com.android.settingslib.search.SearchIndexable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
@SearchIndexable
|
||||
public final class MagnificationPreferenceFragment extends DashboardFragment {
|
||||
@VisibleForTesting
|
||||
@@ -172,12 +172,5 @@ public final class MagnificationPreferenceFragment extends DashboardFragment {
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return isApplicable(context.getResources());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add(PREFERENCE_TITLE_KEY);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user