Merge "Hide TTS search results if no TTS engine is available" am: 993f582fca
am: 7b4a3ada12
am: ebfd790f38
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2493859 Change-Id: Ib5248f616a93ecc8b734291e80fd2160288f2c1f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -811,6 +811,14 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
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);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user