diff options
author | Amith Yamasani <yamasani@google.com> | 2012-04-23 18:03:52 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-04-23 18:03:52 -0700 |
commit | b3a593eb766ed499274202db0b817f710c09b8b0 (patch) | |
tree | 1ca3a0c79b7d7d8062d8055de7e693687c0106bf /src/com/android/settings/SettingsPreferenceFragment.java | |
parent | e2b33708763e4e04e73fd7e22e15a4eb83516c1a (diff) | |
download | packages_apps_settings-b3a593eb766ed499274202db0b817f710c09b8b0.zip packages_apps_settings-b3a593eb766ed499274202db0b817f710c09b8b0.tar.gz packages_apps_settings-b3a593eb766ed499274202db0b817f710c09b8b0.tar.bz2 |
Delay calling setHasOptionsMenu() to avoid a crash in Wifi Settings
If it is called in onCreate(), it's too early for Wifi Settings,
which does its initialization in onActivityCreated().
Change-Id: I3d9b49f63d342e724fd4795fbca48d08faa3c3cc
Diffstat (limited to 'src/com/android/settings/SettingsPreferenceFragment.java')
-rw-r--r-- | src/com/android/settings/SettingsPreferenceFragment.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java index 8500f8d..368976a 100644 --- a/src/com/android/settings/SettingsPreferenceFragment.java +++ b/src/com/android/settings/SettingsPreferenceFragment.java @@ -55,15 +55,15 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di int helpResource = getHelpResource(); if (helpResource != 0) { mHelpUrl = getResources().getString(helpResource); - if (!TextUtils.isEmpty(mHelpUrl)) { - setHasOptionsMenu(true); - } } } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); + if (!TextUtils.isEmpty(mHelpUrl)) { + setHasOptionsMenu(true); + } } /** |