diff options
author | Amith Yamasani <yamasani@google.com> | 2012-12-06 14:40:51 -0800 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-12-06 14:40:51 -0800 |
commit | aeb57edaef1abdcdcd21eb443047386940ffb755 (patch) | |
tree | 53f9711a6dce45e79ec056c5a05020d839bab40e /src/com/android/settings/SettingsPreferenceFragment.java | |
parent | bc5d9271a9d36ecf07ac35e1635f36679074de6f (diff) | |
download | packages_apps_settings-aeb57edaef1abdcdcd21eb443047386940ffb755.zip packages_apps_settings-aeb57edaef1abdcdcd21eb443047386940ffb755.tar.gz packages_apps_settings-aeb57edaef1abdcdcd21eb443047386940ffb755.tar.bz2 |
Pass the locale code in the help url for help pages.
Otherwise the help will always be shown in English.
Bug: 7564049
Change-Id: I94da36aa1ae5aabd118178866b7e570bb77add34
Diffstat (limited to 'src/com/android/settings/SettingsPreferenceFragment.java')
-rw-r--r-- | src/com/android/settings/SettingsPreferenceFragment.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java index c0440c8..b418826 100644 --- a/src/com/android/settings/SettingsPreferenceFragment.java +++ b/src/com/android/settings/SettingsPreferenceFragment.java @@ -84,13 +84,9 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { - if (mHelpUrl != null) { - Intent helpIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(mHelpUrl)); - helpIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK - | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); + if (mHelpUrl != null && getActivity() != null) { MenuItem helpItem = menu.add(0, MENU_HELP, 0, R.string.help_label); - helpItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); - helpItem.setIntent(helpIntent); + HelpUtils.prepareHelpMenuItem(getActivity(), helpItem, mHelpUrl); } } |