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:
@@ -34,6 +34,10 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
@@ -56,10 +60,6 @@ import java.util.MissingResourceException;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
@SearchIndexable
|
||||
public class TextToSpeechSettings extends SettingsPreferenceFragment
|
||||
implements Preference.OnPreferenceChangeListener,
|
||||
@@ -790,13 +790,6 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
|
||||
sir.xmlResId = R.xml.tts_settings;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add("tts_engine_preference");
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user