diff options
author | ByteHamster <info@bytehamster.com> | 2020-03-25 22:45:14 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-03-25 22:50:41 +0100 |
commit | 902215c18d7afa29a0207ca7600770f583a6c0df (patch) | |
tree | f4952efc61a18f1cc1dda18560ea7de71c8b474a /app/src | |
parent | 3399be1290592eff1b6ad5dd1a9b7807f7e7fcaa (diff) | |
download | AntennaPod-902215c18d7afa29a0207ca7600770f583a6c0df.zip |
Removed unused code
Diffstat (limited to 'app/src')
22 files changed, 21 insertions, 129 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java b/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java index 4f6bf0c1f..6d842aff5 100644 --- a/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java @@ -139,19 +139,19 @@ public class FeedHandlerTest { @Test public void testRSS2Basic() throws IOException, UnsupportedFeedtypeException, SAXException, ParserConfigurationException { - Feed f1 = createTestFeed(10, false, true, true); + Feed f1 = createTestFeed(10, true); Feed f2 = runFeedTest(f1, new RSS2Generator(), "UTF-8", RSS2Generator.FEATURE_WRITE_GUID); feedValid(f1, f2, Feed.TYPE_RSS2); } @Test public void testAtomBasic() throws IOException, UnsupportedFeedtypeException, SAXException, ParserConfigurationException { - Feed f1 = createTestFeed(10, false, true, true); + Feed f1 = createTestFeed(10, true); Feed f2 = runFeedTest(f1, new AtomGenerator(), "UTF-8", 0); feedValid(f1, f2, Feed.TYPE_ATOM1); } - private Feed createTestFeed(int numItems, boolean withImage, boolean withFeedMedia, boolean withChapters) { + private Feed createTestFeed(int numItems, boolean withFeedMedia) { Feed feed = new Feed(0, null, "title", "http://example.com", "This is the description", "http://example.com/payment", "Daniel", "en", null, "http://example.com/feed", "http://example.com/picture", file.getAbsolutePath(), "http://example.com/feed", true); diff --git a/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java b/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java index b7f062223..c5fec66b7 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java @@ -45,13 +45,10 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** - * @see HttpDownloaderTest for the test of actual download (and saving the file) + * @see HttpDownloaderTest for the test of actual download (and saving the file). */ @RunWith(AndroidJUnit4.class) public class DownloadServiceTest { - - private CountDownLatch latch = null; - private Feed testFeed = null; private FeedMedia testMedia11 = null; private DownloaderFactory origFactory = null; @@ -61,7 +58,7 @@ public class DownloadServiceTest { EspressoTestUtils.clearDatabase(); EspressoTestUtils.clearPreferences(); origFactory = DownloadService.getDownloaderFactory(); - testFeed = setUpTestFeeds(); + Feed testFeed = setUpTestFeeds(); testMedia11 = testFeed.getItemAtIndex(0).getMedia(); } diff --git a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java index d4af79645..a00a9965f 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java @@ -124,7 +124,6 @@ public class PlaybackServiceMediaPlayerTest { } private Playable writeTestPlayable(String downloadUrl, String fileUrl) { - final Context c = getInstrumentation().getTargetContext(); Feed f = new Feed(0, null, "f", "l", "d", null, null, null, null, "i", null, null, "l", false); FeedPreferences prefs = new FeedPreferences(f.getId(), false, FeedPreferences.AutoDeleteAction.NO, VolumeAdaptionSetting.OFF, null, null); f.setPreferences(prefs); diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java b/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java index 666cd845e..f4a66ee61 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java @@ -1,20 +1,16 @@ package de.test.antennapod.storage; -import android.content.Context; - import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; import androidx.test.InstrumentationRegistry; -import androidx.test.filters.LargeTest; import androidx.test.filters.SmallTest; import de.danoeh.antennapod.core.feed.Feed; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; import de.danoeh.antennapod.core.storage.DBReader; -import de.danoeh.antennapod.core.storage.FeedItemStatistics; import de.danoeh.antennapod.core.storage.PodDBAdapter; import de.danoeh.antennapod.core.util.LongList; import org.junit.After; @@ -103,7 +99,6 @@ public class DBReaderTest { @Test public void testLoadFeedDataOfFeedItemlist() { - final Context context = InstrumentationRegistry.getTargetContext(); final int numFeeds = 10; final int numItems = 1; List<Feed> feeds = saveFeedlist(numFeeds, numItems, false); @@ -314,23 +309,10 @@ public class DBReaderTest { } @Test - public void testGetFeedStatisticsCheckOrder() { - final int NUM_FEEDS = 10; - final int NUM_ITEMS = 10; - List<Feed> feeds = DBTestUtils.saveFeedlist(NUM_FEEDS, NUM_ITEMS, false); - List<FeedItemStatistics> statistics = DBReader.getFeedStatisticsList(); - assertNotNull(statistics); - assertEquals(feeds.size(), statistics.size()); - for (int i = 0; i < NUM_FEEDS; i++) { - assertEquals("Wrong entry at index " + i, feeds.get(i).getId(), statistics.get(i).getFeedID()); - } - } - - @Test public void testGetNavDrawerDataQueueEmptyNoUnreadItems() { final int NUM_FEEDS = 10; final int NUM_ITEMS = 10; - List<Feed> feeds = DBTestUtils.saveFeedlist(NUM_FEEDS, NUM_ITEMS, true); + DBTestUtils.saveFeedlist(NUM_FEEDS, NUM_ITEMS, true); DBReader.NavDrawerData navDrawerData = DBReader.getNavDrawerData(); assertEquals(NUM_FEEDS, navDrawerData.feeds.size()); assertEquals(0, navDrawerData.numNewItems); diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java b/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java index 7decc49d4..4910882e3 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java @@ -422,7 +422,6 @@ public class DBWriterTest { } private FeedMedia playbackHistorySetup(Date playbackCompletionDate) { - final Context context = getInstrumentation().getTargetContext(); Feed feed = new Feed("url", null, "title"); feed.setItems(new ArrayList<>()); FeedItem item = new FeedItem(0, "title", "id", "link", new Date(), FeedItem.PLAYED, feed); @@ -558,7 +557,6 @@ public class DBWriterTest { @Test public void testAddQueueItemMultipleItems() throws InterruptedException, ExecutionException, TimeoutException { - final Context context = getInstrumentation().getTargetContext(); final int NUM_ITEMS = 10; Feed feed = queueTestSetupMultipleItems(NUM_ITEMS); @@ -583,7 +581,7 @@ public class DBWriterTest { public void testClearQueue() throws InterruptedException, ExecutionException, TimeoutException { final int NUM_ITEMS = 10; - Feed feed = queueTestSetupMultipleItems(NUM_ITEMS); + queueTestSetupMultipleItems(NUM_ITEMS); DBWriter.clearQueue().get(TIMEOUT, TimeUnit.SECONDS); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index 5b5cd3058..e71c36ef2 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -618,7 +618,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity { private final String feedUrl; FeedViewAuthenticationDialog(Context context, int titleRes, String feedUrl) { - super(context, titleRes, true, false, null, null); + super(context, titleRes, true, null, null); this.feedUrl = feedUrl; } @@ -629,7 +629,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity { } @Override - protected void onConfirmed(String username, String password, boolean saveUsernamePassword) { + protected void onConfirmed(String username, String password) { startFeedDownload(feedUrl, username, password); } } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java index c79c611ce..224b8d182 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java @@ -190,8 +190,6 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity { final AtomicReference<List<GpodnetDevice>> devices = new AtomicReference<>(); new AsyncTask<GpodnetService, Void, List<GpodnetDevice>>() { - private volatile Exception exception; - @Override protected void onPreExecute() { super.onPreExecute(); @@ -226,7 +224,6 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity { return params[0].getDevices(username); } catch (GpodnetServiceException e) { e.printStackTrace(); - exception = e; return null; } } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java index 5f019d1db..2b498cd47 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java @@ -38,13 +38,6 @@ public abstract class StatisticsListAdapter extends RecyclerView.Adapter<Recycle return statisticsData.size() + 1; } - public StatisticsItem getItem(int position) { - if (position == 0) { - return null; - } - return statisticsData.get(position - 1); - } - @Override public int getItemViewType(int position) { return position == 0 ? TYPE_HEADER : TYPE_FEED; diff --git a/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java b/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java index f50b4143b..99a3f7ac0 100644 --- a/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java +++ b/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java @@ -45,11 +45,6 @@ public class DownloadServiceCallbacksImpl implements DownloadServiceCallbacks { } @Override - public void onFeedParsed(Context context, Feed feed) { - // do nothing - } - - @Override public boolean shouldCreateReport() { return true; } diff --git a/app/src/main/java/de/danoeh/antennapod/config/PlaybackServiceCallbacksImpl.java b/app/src/main/java/de/danoeh/antennapod/config/PlaybackServiceCallbacksImpl.java index c3f5d898c..a462c4034 100644 --- a/app/src/main/java/de/danoeh/antennapod/config/PlaybackServiceCallbacksImpl.java +++ b/app/src/main/java/de/danoeh/antennapod/config/PlaybackServiceCallbacksImpl.java @@ -33,8 +33,4 @@ public class PlaybackServiceCallbacksImpl implements PlaybackServiceCallbacks { return true; } - @Override - public int getNotificationIconResource(Context context) { - return R.drawable.ic_antenna; - } } diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/AuthenticationDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/AuthenticationDialog.java index 073f7b550..fb2f92742 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/AuthenticationDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/AuthenticationDialog.java @@ -3,7 +3,6 @@ package de.danoeh.antennapod.dialog; import android.app.AlertDialog; import android.content.Context; import android.view.View; -import android.widget.CheckBox; import android.widget.EditText; import de.danoeh.antennapod.R; @@ -13,8 +12,7 @@ import de.danoeh.antennapod.R; public abstract class AuthenticationDialog extends AlertDialog.Builder { public AuthenticationDialog(Context context, int titleRes, boolean enableUsernameField, - boolean showSaveCredentialsCheckbox, String usernameInitialValue, - String passwordInitialValue) { + String usernameInitialValue, String passwordInitialValue) { super(context); setTitle(titleRes); View rootView = View.inflate(context, R.layout.authentication_dialog, null); @@ -22,14 +20,8 @@ public abstract class AuthenticationDialog extends AlertDialog.Builder { final EditText etxtUsername = rootView.findViewById(R.id.etxtUsername); final EditText etxtPassword = rootView.findViewById(R.id.etxtPassword); - final CheckBox saveUsernamePassword = rootView.findViewById(R.id.chkSaveUsernamePassword); etxtUsername.setEnabled(enableUsernameField); - if (showSaveCredentialsCheckbox) { - saveUsernamePassword.setVisibility(View.VISIBLE); - } else { - saveUsernamePassword.setVisibility(View.GONE); - } if (usernameInitialValue != null) { etxtUsername.setText(usernameInitialValue); } @@ -39,13 +31,12 @@ public abstract class AuthenticationDialog extends AlertDialog.Builder { setOnCancelListener(dialog -> onCancelled()); setNegativeButton(R.string.cancel_label, null); setPositiveButton(R.string.confirm_label, (dialog, which) - -> onConfirmed(etxtUsername.getText().toString(), etxtPassword.getText().toString(), - showSaveCredentialsCheckbox && saveUsernamePassword.isChecked())); + -> onConfirmed(etxtUsername.getText().toString(), etxtPassword.getText().toString())); } protected void onCancelled() { } - protected abstract void onConfirmed(String username, String password, boolean saveUsernamePassword); + protected abstract void onConfirmed(String username, String password); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java index 216c8cc57..05f38000c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java @@ -25,7 +25,6 @@ import java.util.Set; * supports swiping to mark as read. */ public class AllEpisodesFragment extends EpisodesListFragment { - public static final String TAG = "AllEpisodesFragment"; private static final String PREF_NAME = "PrefAllEpisodesFragment"; private static final String PREF_FILTER = "filter"; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java index 2cddc10cb..23b8b7f19 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java @@ -200,10 +200,10 @@ public class FeedSettingsFragment extends Fragment { private void setupAuthentificationPreference() { findPreference("authentication").setOnPreferenceClickListener(preference -> { new AuthenticationDialog(getContext(), - R.string.authentication_label, true, false, + R.string.authentication_label, true, feedPreferences.getUsername(), feedPreferences.getPassword()) { @Override - protected void onConfirmed(String username, String password, boolean saveUsernamePassword) { + protected void onConfirmed(String username, String password) { feedPreferences.setUsername(username); feedPreferences.setPassword(password); feed.savePreferences(); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemPagerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemPagerFragment.java index f251de5ec..6f04ff1e5 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemPagerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemPagerFragment.java @@ -41,16 +41,6 @@ public class ItemPagerFragment extends Fragment { /** * Creates a new instance of an ItemPagerFragment. * - * @param feeditem The ID of the FeedItem that should be displayed. - * @return The ItemFragment instance - */ - public static ItemPagerFragment newInstance(long feeditem) { - return newInstance(new long[] { feeditem }, 0); - } - - /** - * Creates a new instance of an ItemPagerFragment. - * * @param feeditems The IDs of the FeedItems that belong to the same list * @param feedItemPos The position of the FeedItem that is currently shown * @return The ItemFragment instance diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java index e34f1ea1c..3ebdd80d8 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.fragment.gpodnet; -import android.content.res.Resources; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -28,7 +27,7 @@ public class GpodnetMainFragment extends Fragment { ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar); ViewPager viewPager = root.findViewById(R.id.viewpager); - GpodnetPagerAdapter pagerAdapter = new GpodnetPagerAdapter(getChildFragmentManager(), getResources()); + GpodnetPagerAdapter pagerAdapter = new GpodnetPagerAdapter(getChildFragmentManager()); viewPager.setAdapter(pagerAdapter); // Give the TabLayout the ViewPager @@ -39,18 +38,13 @@ public class GpodnetMainFragment extends Fragment { } public class GpodnetPagerAdapter extends FragmentPagerAdapter { - - private static final int NUM_PAGES = 2; private static final int POS_TOPLIST = 0; private static final int POS_TAGS = 1; private static final int POS_SUGGESTIONS = 2; - final Resources resources; - - public GpodnetPagerAdapter(FragmentManager fm, Resources resources) { + public GpodnetPagerAdapter(FragmentManager fm) { super(fm); - this.resources = resources; } @Override diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/GpodderPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/GpodderPreferencesFragment.java index 1e51380ca..271b31fad 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/GpodderPreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/GpodderPreferencesFragment.java @@ -63,11 +63,11 @@ public class GpodderPreferencesFragment extends PreferenceFragmentCompat { findPreference(PREF_GPODNET_SETLOGIN_INFORMATION) .setOnPreferenceClickListener(preference -> { AuthenticationDialog dialog = new AuthenticationDialog(activity, - R.string.pref_gpodnet_setlogin_information_title, false, false, GpodnetPreferences.getUsername(), + R.string.pref_gpodnet_setlogin_information_title, false, GpodnetPreferences.getUsername(), null) { @Override - protected void onConfirmed(String username, String password, boolean saveUsernamePassword) { + protected void onConfirmed(String username, String password) { GpodnetPreferences.setPassword(password); } }; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java index 2e7c5c6af..0ea8d5b93 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java @@ -8,7 +8,6 @@ import com.google.android.material.snackbar.Snackbar; import androidx.appcompat.app.AlertDialog; import androidx.preference.PreferenceFragmentCompat; import android.widget.ListView; -import android.widget.Toast; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.activity.PreferenceActivity; @@ -19,7 +18,6 @@ import org.apache.commons.lang3.ArrayUtils; import java.util.List; public class UserInterfacePreferencesFragment extends PreferenceFragmentCompat { - private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java index 4d3e1ff72..edd594385 100644 --- a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java @@ -41,8 +41,7 @@ public class FeedItemMenuHandler { * @param selectedItem The FeedItem for which the menu is supposed to be prepared * @return Returns true if selectedItem is not null. */ - public static boolean onPrepareMenu(Menu menu, - FeedItem selectedItem) { + public static boolean onPrepareMenu(Menu menu, FeedItem selectedItem) { if (menu == null || selectedItem == null) { return false; } @@ -146,15 +145,13 @@ public class FeedItemMenuHandler { } /** - * The same method as onPrepareMenu(MenuInterface, FeedItem, boolean, QueueAccess), but lets the + * The same method as {@link #onPrepareMenu(Menu, FeedItem)}, but lets the * caller also specify a list of menu items that should not be shown. * * @param excludeIds Menu item that should be excluded * @return true if selectedItem is not null. */ - public static boolean onPrepareMenu(Menu menu, - FeedItem selectedItem, - int... excludeIds) { + public static boolean onPrepareMenu(Menu menu, FeedItem selectedItem, int... excludeIds) { if (menu == null || selectedItem == null ) { return false; } diff --git a/app/src/main/java/de/danoeh/antennapod/spa/SPAUtil.java b/app/src/main/java/de/danoeh/antennapod/spa/SPAUtil.java index 5fa6588d9..1f28b5c49 100644 --- a/app/src/main/java/de/danoeh/antennapod/spa/SPAUtil.java +++ b/app/src/main/java/de/danoeh/antennapod/spa/SPAUtil.java @@ -6,8 +6,6 @@ import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.util.Log; -import org.apache.commons.lang3.Validate; - import de.danoeh.antennapod.BuildConfig; import de.danoeh.antennapod.receiver.SPAReceiver; @@ -22,7 +20,6 @@ public class SPAUtil { private SPAUtil() { } - /** * Sends an ACTION_SP_APPS_QUERY_FEEDS intent to all AntennaPod Single Purpose apps. * The receiving single purpose apps will then send their feeds back to AntennaPod via an @@ -53,17 +50,4 @@ public class SPAUtil { return false; } } - - /** - * Resets all preferences created by this class. Should only be used for debug purposes. - */ - public static void resetSPAPreferences(Context c) { - if (BuildConfig.DEBUG) { - Validate.notNull(c); - SharedPreferences.Editor editor = PreferenceManager - .getDefaultSharedPreferences(c.getApplicationContext()).edit(); - editor.putBoolean(PREF_HAS_QUERIED_SP_APPS, false); - editor.apply(); - } - } } diff --git a/app/src/main/java/de/danoeh/antennapod/view/OnSwipeGesture.java b/app/src/main/java/de/danoeh/antennapod/view/OnSwipeGesture.java deleted file mode 100644 index eb72a7135..000000000 --- a/app/src/main/java/de/danoeh/antennapod/view/OnSwipeGesture.java +++ /dev/null @@ -1,9 +0,0 @@ -package de.danoeh.antennapod.view; - -public interface OnSwipeGesture { - - boolean onSwipeLeftToRight(); - - boolean onSwipeRightToLeft(); - -} diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadItemViewHolder.java index d48db196f..274dd4ea8 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/DownloadItemViewHolder.java @@ -11,12 +11,10 @@ import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import com.joanzapata.iconify.widget.IconTextView; import de.danoeh.antennapod.R; -import de.danoeh.antennapod.view.CircularProgressBar; public class DownloadItemViewHolder extends RecyclerView.ViewHolder { public final View secondaryActionButton; public final ImageView secondaryActionIcon; - public final CircularProgressBar secondaryActionProgress; public final IconTextView icon; public final TextView title; public final TextView type; @@ -29,7 +27,6 @@ public class DownloadItemViewHolder extends RecyclerView.ViewHolder { type = itemView.findViewById(R.id.txtvType); icon = itemView.findViewById(R.id.txtvIcon); reason = itemView.findViewById(R.id.txtvReason); - secondaryActionProgress = itemView.findViewById(R.id.secondaryActionProgress); secondaryActionButton = itemView.findViewById(R.id.secondaryActionButton); secondaryActionIcon = itemView.findViewById(R.id.secondaryActionIcon); title = itemView.findViewById(R.id.txtvTitle); diff --git a/app/src/main/res/layout/authentication_dialog.xml b/app/src/main/res/layout/authentication_dialog.xml index 1661eaea1..9c6f3e2bb 100644 --- a/app/src/main/res/layout/authentication_dialog.xml +++ b/app/src/main/res/layout/authentication_dialog.xml @@ -27,10 +27,4 @@ android:focusableInTouchMode="true" android:cursorVisible="true"/> - <CheckBox - android:id="@+id/chkSaveUsernamePassword" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_margin="16dp" - android:text="@string/save_username_password_label"/> </LinearLayout>
\ No newline at end of file |