Fix a bug where options menu was not showing.

There were two issues that stopped the options menu from
showing properly. First, the SettingsPreferenceFragment did
not call its super class, causing the Lifecycle methods to
never be called. Second, the options menu was not being
invalidated which also stopped the Lifecycle methods from
being called.

Change-Id: I29f2fc105c7ecae7adaccb2e4643e48646398d8d
Fixes: 37255835
Test: Robotest
This commit is contained in:
Daniel Nishi
2017-04-14 14:12:35 -07:00
parent 190b560c9a
commit e6740f740e
3 changed files with 28 additions and 6 deletions

View File

@@ -440,6 +440,7 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
if (mHelpUri != null && getActivity() != null) {
HelpUtils.prepareHelpMenuItem(getActivity(), menu, mHelpUri, getClass().getName());
}