From b06186b3008892c57fee8c8f50def86a9b3ff6c2 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Wed, 18 Sep 2013 19:45:54 +0200 Subject: [PATCH] Call superclass method when creating and preparing menu. fixes #278 --- src/de/danoeh/antennapod/activity/AddFeedActivity.java | 1 + src/de/danoeh/antennapod/activity/DirectoryChooserActivity.java | 2 ++ src/de/danoeh/antennapod/activity/DownloadActivity.java | 1 + src/de/danoeh/antennapod/activity/DownloadLogActivity.java | 1 + src/de/danoeh/antennapod/activity/FeedInfoActivity.java | 2 ++ src/de/danoeh/antennapod/activity/FeedItemlistActivity.java | 2 ++ src/de/danoeh/antennapod/activity/FlattrAuthActivity.java | 1 + src/de/danoeh/antennapod/activity/ItemviewActivity.java | 2 ++ src/de/danoeh/antennapod/activity/MainActivity.java | 2 ++ src/de/danoeh/antennapod/activity/MediaplayerActivity.java | 2 ++ .../danoeh/antennapod/activity/MiroGuideCategoryActivity.java | 1 + .../antennapod/activity/MiroGuideChannelViewActivity.java | 2 ++ src/de/danoeh/antennapod/activity/MiroGuideMainActivity.java | 1 + src/de/danoeh/antennapod/activity/MiroGuideSearchActivity.java | 1 + src/de/danoeh/antennapod/activity/OpmlFeedChooserActivity.java | 1 + .../danoeh/antennapod/activity/OpmlImportFromPathActivity.java | 1 + src/de/danoeh/antennapod/activity/PlaybackHistoryActivity.java | 1 + src/de/danoeh/antennapod/activity/PreferenceActivity.java | 1 + src/de/danoeh/antennapod/activity/SearchActivity.java | 1 + .../danoeh/antennapod/activity/gpoddernet/GpodnetActivity.java | 1 + 20 files changed, 27 insertions(+) diff --git a/src/de/danoeh/antennapod/activity/AddFeedActivity.java b/src/de/danoeh/antennapod/activity/AddFeedActivity.java index ad1adfa6b..cfa5b43eb 100644 --- a/src/de/danoeh/antennapod/activity/AddFeedActivity.java +++ b/src/de/danoeh/antennapod/activity/AddFeedActivity.java @@ -206,6 +206,7 @@ public class AddFeedActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); return true; } diff --git a/src/de/danoeh/antennapod/activity/DirectoryChooserActivity.java b/src/de/danoeh/antennapod/activity/DirectoryChooserActivity.java index f4c2779cd..dc888bcfd 100644 --- a/src/de/danoeh/antennapod/activity/DirectoryChooserActivity.java +++ b/src/de/danoeh/antennapod/activity/DirectoryChooserActivity.java @@ -280,6 +280,7 @@ public class DirectoryChooserActivity extends ActionBarActivity { @Override public boolean onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); menu.findItem(R.id.new_folder_item) .setVisible(isValidFile(selectedDir)); return true; @@ -287,6 +288,7 @@ public class DirectoryChooserActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.directory_chooser, menu); return true; diff --git a/src/de/danoeh/antennapod/activity/DownloadActivity.java b/src/de/danoeh/antennapod/activity/DownloadActivity.java index 57c86f760..a289812df 100644 --- a/src/de/danoeh/antennapod/activity/DownloadActivity.java +++ b/src/de/danoeh/antennapod/activity/DownloadActivity.java @@ -183,6 +183,7 @@ public class DownloadActivity extends ActionBarActivity implements @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, MENU_SHOW_LOG, Menu.NONE, R.string.show_download_log), MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW); diff --git a/src/de/danoeh/antennapod/activity/DownloadLogActivity.java b/src/de/danoeh/antennapod/activity/DownloadLogActivity.java index 5e48371b8..65b6a7a9e 100644 --- a/src/de/danoeh/antennapod/activity/DownloadLogActivity.java +++ b/src/de/danoeh/antennapod/activity/DownloadLogActivity.java @@ -59,6 +59,7 @@ public class DownloadLogActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); return true; } diff --git a/src/de/danoeh/antennapod/activity/FeedInfoActivity.java b/src/de/danoeh/antennapod/activity/FeedInfoActivity.java index 6508ee568..349793c66 100644 --- a/src/de/danoeh/antennapod/activity/FeedInfoActivity.java +++ b/src/de/danoeh/antennapod/activity/FeedInfoActivity.java @@ -95,6 +95,7 @@ public class FeedInfoActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); if (feed != null) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.feedinfo, menu); @@ -106,6 +107,7 @@ public class FeedInfoActivity extends ActionBarActivity { @Override public boolean onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); if (feed != null) { menu.findItem(R.id.support_item).setVisible( feed.getPaymentLink() != null); diff --git a/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java b/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java index ae61c052a..98695429c 100644 --- a/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java +++ b/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java @@ -114,6 +114,7 @@ public class FeedItemlistActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); if (feed != null) { TypedArray drawables = obtainStyledAttributes(new int[]{R.attr.action_search}); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label) @@ -139,6 +140,7 @@ public class FeedItemlistActivity extends ActionBarActivity { @Override public boolean onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); return FeedMenuHandler.onPrepareOptionsMenu(menu, feed); } diff --git a/src/de/danoeh/antennapod/activity/FlattrAuthActivity.java b/src/de/danoeh/antennapod/activity/FlattrAuthActivity.java index 2ab95e287..a8335c79a 100644 --- a/src/de/danoeh/antennapod/activity/FlattrAuthActivity.java +++ b/src/de/danoeh/antennapod/activity/FlattrAuthActivity.java @@ -91,6 +91,7 @@ public class FlattrAuthActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); return true; } diff --git a/src/de/danoeh/antennapod/activity/ItemviewActivity.java b/src/de/danoeh/antennapod/activity/ItemviewActivity.java index 17bd6536f..253830cb8 100644 --- a/src/de/danoeh/antennapod/activity/ItemviewActivity.java +++ b/src/de/danoeh/antennapod/activity/ItemviewActivity.java @@ -125,6 +125,7 @@ public class ItemviewActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); if (item != null) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.feeditem, menu); @@ -156,6 +157,7 @@ public class ItemviewActivity extends ActionBarActivity { @Override public boolean onPrepareOptionsMenu(final Menu menu) { + super.onPrepareOptionsMenu(menu); return FeedItemMenuHandler.onPrepareMenu( new FeedItemMenuHandler.MenuInterface() { diff --git a/src/de/danoeh/antennapod/activity/MainActivity.java b/src/de/danoeh/antennapod/activity/MainActivity.java index b61314a48..f373bc35b 100644 --- a/src/de/danoeh/antennapod/activity/MainActivity.java +++ b/src/de/danoeh/antennapod/activity/MainActivity.java @@ -166,6 +166,7 @@ public class MainActivity extends ActionBarActivity { @Override public boolean onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); MenuItem refreshAll = menu.findItem(R.id.all_feed_refresh); if (DownloadService.isRunning && DownloadRequester.getInstance().isDownloadingFeeds()) { @@ -178,6 +179,7 @@ public class MainActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.main, menu); diff --git a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java index 9487d1429..748a049a6 100644 --- a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -222,6 +222,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.mediaplayer, menu); return true; @@ -229,6 +230,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity @Override public boolean onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); Playable media = controller.getMedia(); menu.findItem(R.id.support_item).setVisible( diff --git a/src/de/danoeh/antennapod/activity/MiroGuideCategoryActivity.java b/src/de/danoeh/antennapod/activity/MiroGuideCategoryActivity.java index e3d77a68a..c60cef6ef 100644 --- a/src/de/danoeh/antennapod/activity/MiroGuideCategoryActivity.java +++ b/src/de/danoeh/antennapod/activity/MiroGuideCategoryActivity.java @@ -51,6 +51,7 @@ public class MiroGuideCategoryActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); return true; } diff --git a/src/de/danoeh/antennapod/activity/MiroGuideChannelViewActivity.java b/src/de/danoeh/antennapod/activity/MiroGuideChannelViewActivity.java index 9ce0ab1f7..0f9294278 100644 --- a/src/de/danoeh/antennapod/activity/MiroGuideChannelViewActivity.java +++ b/src/de/danoeh/antennapod/activity/MiroGuideChannelViewActivity.java @@ -132,6 +132,7 @@ public class MiroGuideChannelViewActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.channelview, menu); return true; @@ -139,6 +140,7 @@ public class MiroGuideChannelViewActivity extends ActionBarActivity { @Override public boolean onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); boolean channelLoaded = channel != null; boolean beingDownloaded = channelLoaded && DownloadRequester.getInstance().isDownloadingFile( diff --git a/src/de/danoeh/antennapod/activity/MiroGuideMainActivity.java b/src/de/danoeh/antennapod/activity/MiroGuideMainActivity.java index 40306e4da..26b3716c5 100644 --- a/src/de/danoeh/antennapod/activity/MiroGuideMainActivity.java +++ b/src/de/danoeh/antennapod/activity/MiroGuideMainActivity.java @@ -128,6 +128,7 @@ public class MiroGuideMainActivity extends ActionBarActivity implements AdapterV @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label) .setIcon( obtainStyledAttributes( diff --git a/src/de/danoeh/antennapod/activity/MiroGuideSearchActivity.java b/src/de/danoeh/antennapod/activity/MiroGuideSearchActivity.java index 4ea0b1699..c2d88061d 100644 --- a/src/de/danoeh/antennapod/activity/MiroGuideSearchActivity.java +++ b/src/de/danoeh/antennapod/activity/MiroGuideSearchActivity.java @@ -63,6 +63,7 @@ public class MiroGuideSearchActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label) .setIcon( obtainStyledAttributes( diff --git a/src/de/danoeh/antennapod/activity/OpmlFeedChooserActivity.java b/src/de/danoeh/antennapod/activity/OpmlFeedChooserActivity.java index 2ec42e9ef..8f2558c2e 100644 --- a/src/de/danoeh/antennapod/activity/OpmlFeedChooserActivity.java +++ b/src/de/danoeh/antennapod/activity/OpmlFeedChooserActivity.java @@ -101,6 +101,7 @@ public class OpmlFeedChooserActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.select_all_item, Menu.NONE, R.string.select_all_label), MenuItem.SHOW_AS_ACTION_IF_ROOM); diff --git a/src/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java b/src/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java index ece78006f..a3d679773 100644 --- a/src/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java +++ b/src/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java @@ -87,6 +87,7 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); return true; } diff --git a/src/de/danoeh/antennapod/activity/PlaybackHistoryActivity.java b/src/de/danoeh/antennapod/activity/PlaybackHistoryActivity.java index f329581e5..b0a000f94 100644 --- a/src/de/danoeh/antennapod/activity/PlaybackHistoryActivity.java +++ b/src/de/danoeh/antennapod/activity/PlaybackHistoryActivity.java @@ -20,6 +20,7 @@ public class PlaybackHistoryActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.clear_history_item, Menu.NONE, R.string.clear_history_label), MenuItem.SHOW_AS_ACTION_IF_ROOM); diff --git a/src/de/danoeh/antennapod/activity/PreferenceActivity.java b/src/de/danoeh/antennapod/activity/PreferenceActivity.java index bc165a6c8..86db8d629 100644 --- a/src/de/danoeh/antennapod/activity/PreferenceActivity.java +++ b/src/de/danoeh/antennapod/activity/PreferenceActivity.java @@ -300,6 +300,7 @@ public class PreferenceActivity extends android.preference.PreferenceActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); return true; } diff --git a/src/de/danoeh/antennapod/activity/SearchActivity.java b/src/de/danoeh/antennapod/activity/SearchActivity.java index 86f7301cf..c31cec434 100644 --- a/src/de/danoeh/antennapod/activity/SearchActivity.java +++ b/src/de/danoeh/antennapod/activity/SearchActivity.java @@ -92,6 +92,7 @@ public class SearchActivity extends ActionBarActivity implements AdapterView.OnI @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label) .setIcon( obtainStyledAttributes( diff --git a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetActivity.java b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetActivity.java index 08b37ae60..7ee0a9ac9 100644 --- a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetActivity.java +++ b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetActivity.java @@ -24,6 +24,7 @@ public class GpodnetActivity extends ActionBarActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.search_item, Menu.NONE, R.string.search_label) .setIcon( obtainStyledAttributes(