summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/OpmlImportHolder.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java22
-rw-r--r--app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java3
7 files changed, 27 insertions, 10 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportHolder.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportHolder.java
index b01cf43e4..dc5570dc0 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportHolder.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportHolder.java
@@ -14,6 +14,8 @@ import de.danoeh.antennapod.core.export.opml.OpmlElement;
*/
public class OpmlImportHolder {
+ private OpmlImportHolder(){}
+
private static ArrayList<OpmlElement> readElements;
public static ArrayList<OpmlElement> getReadElements() {
diff --git a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java
index d2498955c..4138738f6 100644
--- a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java
+++ b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java
@@ -8,6 +8,8 @@ import de.danoeh.antennapod.core.ClientConfig;
*/
class ClientConfigurator {
+ private ClientConfigurator(){}
+
static {
ClientConfig.USER_AGENT = "AntennaPod/" + BuildConfig.VERSION_NAME;
ClientConfig.applicationCallbacks = new ApplicationCallbacksImpl();
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java
index e64f1e08b..933ced0f9 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java
@@ -17,6 +17,9 @@ import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
* Creates a dialog that lets the user change the hostname for the gpodder.net service.
*/
public class GpodnetSetHostnameDialog {
+
+ private GpodnetSetHostnameDialog(){}
+
private static final String TAG = "GpodnetSetHostnameDialog";
public static AlertDialog createDialog(final Context context) {
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java
index 72000170e..ece184035 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/RatingDialog.java
@@ -17,6 +17,8 @@ import de.danoeh.antennapod.R;
public class RatingDialog {
+ private RatingDialog(){}
+
private static final String TAG = RatingDialog.class.getSimpleName();
private static final int AFTER_DAYS = 7;
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java
index dc0ea07ff..9e8c9731e 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java
@@ -20,10 +20,10 @@ import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.MediaType;
import de.danoeh.antennapod.core.glide.ApGlideSettings;
import de.danoeh.antennapod.core.service.playback.PlaybackService;
-import de.danoeh.antennapod.core.util.Converter;
import de.danoeh.antennapod.core.util.playback.Playable;
import de.danoeh.antennapod.core.util.playback.PlaybackController;
import rx.Single;
+import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
@@ -41,6 +41,7 @@ public class ExternalPlayerFragment extends Fragment {
private TextView mFeedName;
private ProgressBar mProgressBar;
private PlaybackController controller;
+ private Subscription subscription;
public ExternalPlayerFragment() {
super();
@@ -81,7 +82,7 @@ public class ExternalPlayerFragment extends Fragment {
super.onActivityCreated(savedInstanceState);
controller = setupPlaybackController();
butPlay.setOnClickListener(v -> {
- if(controller != null) {
+ if (controller != null) {
controller.playPause();
}
});
@@ -142,6 +143,9 @@ public class ExternalPlayerFragment extends Fragment {
if (controller != null) {
controller.release();
}
+ if (subscription != null) {
+ subscription.unsubscribe();
+ }
}
@Override
@@ -162,7 +166,7 @@ public class ExternalPlayerFragment extends Fragment {
controller = setupPlaybackController();
if (butPlay != null) {
butPlay.setOnClickListener(v -> {
- if(controller != null) {
+ if (controller != null) {
controller.playPause();
}
});
@@ -177,7 +181,10 @@ public class ExternalPlayerFragment extends Fragment {
return false;
}
- Single.create(subscriber -> subscriber.onSuccess(controller.getMedia()))
+ if (subscription != null) {
+ subscription.unsubscribe();
+ }
+ subscription = Single.create(subscriber -> subscriber.onSuccess(controller.getMedia()))
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(media -> updateUi((Playable) media));
@@ -206,15 +213,10 @@ public class ExternalPlayerFragment extends Fragment {
butPlay.setVisibility(View.VISIBLE);
}
} else {
- Log.w(TAG, "loadMediaInfo was called while the media object of playbackService was null!");
+ Log.w(TAG, "loadMediaInfo was called while the media object of playbackService was null!");
}
}
- private String getPositionString(int position, int duration) {
- return Converter.getDurationStringLong(position) + " / "
- + Converter.getDurationStringLong(duration);
- }
-
public PlaybackController getPlaybackControllerTestingOnly() {
return controller;
}
diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java
index ab7d0e7c6..bd4fe9bcf 100644
--- a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java
+++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java
@@ -30,6 +30,9 @@ import de.danoeh.antennapod.core.util.ShareUtils;
* Handles interactions with the FeedItemMenu.
*/
public class FeedMenuHandler {
+
+ private FeedMenuHandler(){ }
+
private static final String TAG = "FeedMenuHandler";
public static boolean onCreateOptionsMenu(MenuInflater inflater, Menu menu) {
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
index c55117ecc..e1fcc43c5 100644
--- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
+++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
@@ -227,6 +227,9 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
return true;
});
+ if (Build.VERSION.SDK_INT >= 26) {
+ ui.findPreference(UserPreferences.PREF_EXPANDED_NOTIFICATION).setVisible(false);
+ }
}
private void setupStorageScreen() {