From 86e5e9ea1373980576f76ad1abf676a4c9911fac Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Sun, 11 Jan 2015 18:53:11 -0500 Subject: [PATCH] Simlified invalidation of options menu. #595 --- .../danoeh/antennapod/fragment/QueueFragment.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index 0c794fc44..302739b6a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -294,17 +294,9 @@ public class QueueFragment extends Fragment { } listAdapter.notifyDataSetChanged(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { - // we need to refresh the options menu because it sometimes - // needs data that may have just been loaded. - // Things will still work on APIs lower than honeycomb - // but they may have to change away from this view - // and then back to get the options menu. - Activity theActivity = activity.get(); - if (theActivity != null) { - theActivity.invalidateOptionsMenu(); - } - } + // we need to refresh the options menu because it sometimes + // needs data that may have just been loaded. + getActivity().supportInvalidateOptionsMenu(); } private DownloadObserver.Callback downloadObserverCallback = new DownloadObserver.Callback() {