diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index fab84078e..62fd4b515 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -111,20 +111,13 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi private Toolbar toolbar; private ExternalPlayerFragment externalPlayerFragment; private DrawerLayout drawerLayout; - private View navDrawer; private ListView navList; private NavListAdapter navAdapter; private int mPosition = -1; - private ActionBarDrawerToggle drawerToggle; - private CharSequence currentTitle; - - private ProgressDialog pd; - private Disposable disposable; - private long lastBackButtonPressTime = 0; @NonNull @@ -282,10 +275,6 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi return drawerLayout != null && navDrawer != null && drawerLayout.isDrawerOpen(navDrawer); } - public List getFeeds() { - return (navDrawerData != null) ? navDrawerData.feeds : null; - } - private void loadFragment(int index, Bundle args) { Log.d(TAG, "loadFragment(index: " + index + ", args: " + args + ")"); if (index < navAdapter.getSubscriptionOffset()) { @@ -518,9 +507,6 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi if (disposable != null) { disposable.dispose(); } - if(pd != null) { - pd.dismiss(); - } } @@ -849,9 +835,4 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi super.onNewIntent(intent); setIntent(intent); } - - @VisibleForTesting - public void updateNavDrawer() { - navAdapter.notifyDataSetChanged(); - } } diff --git a/app/src/main/java/de/danoeh/antennapod/view/SwipeGestureDetector.java b/app/src/main/java/de/danoeh/antennapod/view/SwipeGestureDetector.java deleted file mode 100644 index f4ee092df..000000000 --- a/app/src/main/java/de/danoeh/antennapod/view/SwipeGestureDetector.java +++ /dev/null @@ -1,44 +0,0 @@ -package de.danoeh.antennapod.view; - -import android.util.Log; -import android.view.GestureDetector; -import android.view.MotionEvent; - -public class SwipeGestureDetector extends GestureDetector.SimpleOnGestureListener { - - private static final String TAG = "SwipeGestureDetector"; - - private static final int SWIPE_MIN_DISTANCE = 120; - private static final int SWIPE_MAX_OFF_PATH = 250; - private static final int SWIPE_THRESHOLD_VELOCITY = 200; - - private final OnSwipeGesture callback; - - public SwipeGestureDetector(OnSwipeGesture callback) { - this.callback = callback; - } - - @Override - public boolean onDown(MotionEvent e) { - return true; - } - - @Override - public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { - try { - if (Math.abs(e1.getY() - e2.getY()) > SWIPE_MAX_OFF_PATH) - return false; - if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE - && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - return callback.onSwipeRightToLeft(); - } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE - && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - return callback.onSwipeLeftToRight(); - } - } catch (Exception e) { - Log.d(TAG, Log.getStackTraceString(e)); - } - return false; - } - -} diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java index 4f871e83b..9db5eb212 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java @@ -805,14 +805,6 @@ public class UserPreferences { prefs.edit().putString(PREF_MEDIA_PLAYER, "sonic").apply(); } - public static void enableExoplayer() { - prefs.edit().putString(PREF_MEDIA_PLAYER, PREF_MEDIA_PLAYER_EXOPLAYER).apply(); - } - - public static void enableBuiltin() { - prefs.edit().putString(PREF_MEDIA_PLAYER, "builtin").apply(); - } - public static boolean stereoToMono() { return prefs.getBoolean(PREF_STEREO_TO_MONO, false); } diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index edcaacefc..e01d1fdf2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -151,7 +151,6 @@ public class PlaybackService extends MediaBrowserServiceCompat { public static final int EXTRA_CODE_CAST = 3; public static final int NOTIFICATION_TYPE_ERROR = 0; - public static final int NOTIFICATION_TYPE_INFO = 1; public static final int NOTIFICATION_TYPE_BUFFER_UPDATE = 2; /** diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/QueueAccess.java b/core/src/main/java/de/danoeh/antennapod/core/util/QueueAccess.java index 9408be348..ec8b8a430 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/QueueAccess.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/QueueAccess.java @@ -26,36 +26,4 @@ public abstract class QueueAccess { private QueueAccess() { } - - public static QueueAccess ItemListAccess(final List items) { - return new QueueAccess() { - @Override - public boolean contains(long id) { - if (items == null) { - return false; - } - for (FeedItem item : items) { - if (item.getId() == id) { - return true; - } - } - return false; - } - - @Override - public boolean remove(long id) { - Iterator it = items.iterator(); - FeedItem item; - while (it.hasNext()) { - item = it.next(); - if (item.getId() == id) { - it.remove(); - return true; - } - } - return false; - } - }; - } - }