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

Commit 7b4a3ada authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Hide TTS search results if no TTS engine is available" am: 993f582f

parents 00a7d078 993f582f
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);
                }
            };

}