TalkBackPreferencesActivity.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:talkback 作者:
/**
 * Assigns the intent to open text-to-speech settings.
 */
private void assignTtsSettingsIntent() {
    PreferenceGroup category = (PreferenceGroup) findPreferenceByResId(
        R.string.pref_category_when_to_speak_key);
    Preference ttsSettingsPreference =
            findPreferenceByResId(R.string.pref_tts_settings_key);

    if (category == null || ttsSettingsPreference == null) {
        return;
    }

    Intent ttsSettingsIntent = new Intent(TalkBackService.INTENT_TTS_SETTINGS);
    ttsSettingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    if (!canHandleIntent(ttsSettingsIntent)) {
        // Need to remove preference item if no TTS Settings intent filter in settings app.
        category.removePreference(ttsSettingsPreference);
    }

    ttsSettingsPreference.setIntent(ttsSettingsIntent);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号