Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 993f582f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Hide TTS search results if no TTS engine is available"

parents 95413639 417b4a85
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -811,6 +811,14 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
    }

    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
            new BaseSearchIndexProvider(R.xml.tts_settings);
            new BaseSearchIndexProvider(R.xml.tts_settings) {
                @Override
                protected boolean isPageSearchEnabled(Context context) {
                    TtsEngines ttsEngines = new TtsEngines(context);
                    return !ttsEngines.getEngines().isEmpty() &&
                            context.getResources().getBoolean(
                                    R.bool.config_show_tts_settings_summary);
                }
            };

}