/**
* Assigns the appropriate intent to the label manager preference.
*/
private void assignLabelManagerIntent() {
final PreferenceGroup category = (PreferenceGroup) findPreferenceByResId(
R.string.pref_category_touch_exploration_key);
final Preference prefManageLabels = findPreferenceByResId(
R.string.pref_manage_labels_key);
if ((category == null) || (prefManageLabels == null)) {
return;
}
if (Build.VERSION.SDK_INT < LabelManagerSummaryActivity.MIN_API_LEVEL) {
category.removePreference(prefManageLabels);
return;
}
Activity activity = getActivity();
if (activity != null) {
final Intent labelManagerIntent = new Intent(
activity, LabelManagerSummaryActivity.class);
labelManagerIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
labelManagerIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
prefManageLabels.setIntent(labelManagerIntent);
}
}
TalkBackPreferencesActivity.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:talkback
作者:
评论列表
文章目录