diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-02-20 21:15:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 21:15:55 +0100 |
commit | 3b2e7420cd8d97f662ba46fec5944edde7c8b3eb (patch) | |
tree | 7895ed9b8de624195f489fb493ebf5ee305bbf97 /app/src | |
parent | 0d29e44de5ac97f2285aca241e4f4290c26ea0f9 (diff) | |
download | AntennaPod-3b2e7420cd8d97f662ba46fec5944edde7c8b3eb.zip |
Remove some deprecated methods (#6932)
Diffstat (limited to 'app/src')
10 files changed, 3 insertions, 34 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java index 20cdd2718..16bfaa00a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java @@ -164,12 +164,6 @@ public class AddFeedFragment extends Fragment { viewBinding.combinedFeedSearchEditText.post(() -> viewBinding.combinedFeedSearchEditText.setText("")); } - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setRetainInstance(true); - } - private void chooseOpmlImportPathResult(final Uri uri) { if (uri == null) { return; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java index 8b25c0e6a..bf101445a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java @@ -315,12 +315,6 @@ public class AudioPlayerFragment extends Fragment implements } @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setRetainInstance(true); - } - - @Override public void onStart() { super.onStart(); controller = newPlaybackController(); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DiscoveryFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DiscoveryFragment.java index 16ccb2af4..7a4927090 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DiscoveryFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DiscoveryFragment.java @@ -210,9 +210,6 @@ public class DiscoveryFragment extends Fragment implements Toolbar.OnMenuItemCli @Override public boolean onMenuItemClick(MenuItem item) { - if (super.onOptionsItemSelected(item)) { - return true; - } final int itemId = item.getItemId(); if (itemId == R.id.discover_hide_item) { item.setChecked(!item.isChecked()); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java index 03913ff12..291de2a50 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java @@ -3,7 +3,6 @@ package de.danoeh.antennapod.fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; -import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; @@ -99,15 +98,8 @@ public class DownloadLogFragment extends BottomSheetDialogFragment } @Override - public void onPrepareOptionsMenu(@NonNull Menu menu) { - menu.findItem(R.id.clear_logs_item).setVisible(!downloadLog.isEmpty()); - } - - @Override public boolean onMenuItemClick(MenuItem item) { - if (super.onOptionsItemSelected(item)) { - return true; - } else if (item.getItemId() == R.id.clear_logs_item) { + if (item.getItemId() == R.id.clear_logs_item) { DBWriter.clearDownloadLog(); return true; } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java index 0cbc23a56..08714e971 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/EpisodesListFragment.java @@ -119,10 +119,7 @@ public abstract class EpisodesListFragment extends Fragment } @Override - public boolean onOptionsItemSelected(@NonNull MenuItem item) { - if (super.onOptionsItemSelected(item)) { - return true; - } + public boolean onMenuItemClick(MenuItem item) { final int itemId = item.getItemId(); if (itemId == R.id.refresh_item) { FeedUpdateManager.runOnceOrAsk(requireContext()); 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 003ee23db..5e9146fe9 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -101,7 +101,6 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setRetainInstance(true); prefs = getActivity().getSharedPreferences(PREFS, Context.MODE_PRIVATE); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java index 0f959d9d1..8c976ae7c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java @@ -122,7 +122,6 @@ public class SearchFragment extends Fragment implements EpisodeItemListAdapter.O @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setRetainInstance(true); automaticSearchDebouncer = new Handler(Looper.getMainLooper()); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java index e86cd58b9..811d46f2c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java @@ -102,8 +102,6 @@ public class SubscriptionFragment extends Fragment @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setRetainInstance(true); - prefs = requireActivity().getSharedPreferences(PREFS, Context.MODE_PRIVATE); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/about/ContributorsPagerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/about/ContributorsPagerFragment.java index caa8031ae..139413157 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/about/ContributorsPagerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/about/ContributorsPagerFragment.java @@ -26,7 +26,6 @@ public class ContributorsPagerFragment extends Fragment { public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); - setHasOptionsMenu(true); View rootView = inflater.inflate(R.layout.pager_fragment, container, false); ViewPager2 viewPager = rootView.findViewById(R.id.viewpager); diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/HomeFragment.java b/app/src/main/java/de/danoeh/antennapod/ui/home/HomeFragment.java index 6f43a8ff4..3c8d8fc52 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/home/HomeFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/home/HomeFragment.java @@ -162,7 +162,7 @@ public class HomeFragment extends Fragment implements Toolbar.OnMenuItemClickLis ((MainActivity) getActivity()).loadChildFragment(SearchFragment.newInstance()); return true; } - return super.onOptionsItemSelected(item); + return false; } @Override |