diff options
38 files changed, 215 insertions, 45 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b6be6ab82..34e3ac1bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ Change Log ========== -Version 1.6.6 +Version 1.7.0 ------------- -* Experimental new media player (ExoPlayer) +* NEW ExoPlayer (experimental) * Fix for Bluetooth Forward (Oreo) * Preference redesign + search * Notification improvements diff --git a/app/build.gradle b/app/build.gradle index 281313628..a5cdf8a38 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -150,7 +150,7 @@ dependencies { implementation "com.android.support:gridlayout-v7:$supportVersion" implementation "com.android.support:percent:$supportVersion" implementation "com.android.support:recyclerview-v7:$supportVersion" - provided 'com.google.android.wearable:wearable:2.2.0' + compileOnly 'com.google.android.wearable:wearable:2.2.0' implementation "org.apache.commons:commons-lang3:$commonslangVersion" implementation("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") { exclude group: "org.json", module: "json" diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java b/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java index c9c715a86..a577e5e36 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBTestUtils.java @@ -21,6 +21,7 @@ import de.danoeh.antennapod.core.util.flattr.FlattrStatus; */ class DBTestUtils { + private DBTestUtils(){} /** * Use this method when tests don't involve chapters. */ diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java index 7f6f0fb0f..89542d222 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java +++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/GeneratorUtil.java @@ -8,6 +8,7 @@ import java.io.IOException; * Utility methods for FeedGenerator */ class GeneratorUtil { + private GeneratorUtil(){} public static void addPaymentLink(XmlSerializer xml, String paymentLink, boolean withNamespace) throws IOException { String ns = (withNamespace) ? "http://www.w3.org/2005/Atom" : null; diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 95cd12d0f..6e62bc227 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,8 +2,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.danoeh.antennapod" android:installLocation="auto" - android:versionCode="1060691" - android:versionName="1.6.6-RC2"> + android:versionCode="1070000" + android:versionName="1.7.0"> <!-- Version code schema: "1.2.3-SNAPSHOT" -> 1020300 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() { diff --git a/app/src/main/play/de/listing/fulldescription b/app/src/main/play/de/listing/fulldescription index e5d7ec72a..0e09c5c29 100644 --- a/app/src/main/play/de/listing/fulldescription +++ b/app/src/main/play/de/listing/fulldescription @@ -1,4 +1,4 @@ -AntennaPod ist ein Podcast-Manager und -Player, der Dir unmittelbar Zugriff auf Millionen von freien und bezahlten Podcasts ermöglicht, angefangen von unabhängigen Podcastern zu großen Rundfunkanstalten oder Hörfunksendern wie BBC, NPR und CNN. Abonniere, importiere und exportiere deine Feeds mühelos mit Hilfe des iTunes-Verzeichnisses, OPML-Dateien oder einfachen RSS-URLs. Reduziere Aufwand, Stromverbrauch und Datenverbrauch durch die Kontrolle der Downloads (bestimmte Uhrzeiten, Intervalle, WiFi-Netze) und des Löschens von Episoden (basierend auf deinen Favoriten und weiteren Einstellungen).<br> +AntennaPod ist ein Podcast-Manager und -Player, der Dir unmittelbar Zugriff auf Millionen von freien und kostenpflichtigen Podcasts ermöglicht, angefangen von unabhängigen Podcastern bis hin zu großen Rundfunkanstalten wie BBC, NPR und CNN. Abonniere, importiere und exportiere deine Feeds mühelos mit Hilfe des iTunes-Verzeichnisses, OPML-Dateien oder einfachen RSS-URLs. Reduziere Aufwand, Stromverbrauch und Datenverbrauch durch die Kontrolle der Downloads (bestimmte Uhrzeiten, Intervalle, WiFi-Netze) und des Löschens von Episoden (basierend auf deinen Favoriten und weiteren Einstellungen).<br> Aber am wichtigsten: Downloade, streame oder füge Episoden zur Abspielliste hinzu und genieße sie mit einstellbarer Abspielgeschwindigkeit, Unterstützung von Kapiteln und Schlummerfunktion. Mit Flattr kannst du den Podcastern sogar deine Wertschätzung zeigen. AntennaPod ist, von Podcast-Enthusiasten gemacht, frei im Sinne des Wortes: Open Source, keine Kosten, keine Werbung. @@ -24,7 +24,7 @@ STEUER DAS SYSTEM<br> • Passe das Aussehen mit dem hellen oder dunklen Theme an<br> • Sichere deine Abonnements mit gPodder.net oder über den OPML-Export -<b>Trete der AntennaPod-Community bei!</b><br> +<b>Tritt der AntennaPod-Community bei!</b><br> AntennaPod wird aktiv von Freiwilligen weiterentwickelt. Auch du kannst bei der Entwicklung mit Quellcode oder Kommentaren mitwirken! Wir verwenden GitHub für Funktionswünsche (Feature Requests), Fehlerberichte (Bug Reports) und zum Beisteuern von Code (Code Contributions). diff --git a/core/src/main/java/android/support/v4/app/SafeJobIntentService.java b/core/src/main/java/android/support/v4/app/SafeJobIntentService.java new file mode 100644 index 000000000..c07c409ee --- /dev/null +++ b/core/src/main/java/android/support/v4/app/SafeJobIntentService.java @@ -0,0 +1,118 @@ +package android.support.v4.app; + +import android.app.job.JobParameters; +import android.app.job.JobServiceEngine; +import android.app.job.JobWorkItem; +import android.content.Intent; +import android.os.Build; +import android.os.IBinder; +import android.support.annotation.RequiresApi; +import android.util.Log; + + +public abstract class SafeJobIntentService extends JobIntentService { + + @Override + public void onCreate() { + super.onCreate(); + if (Build.VERSION.SDK_INT >= 26) { + mJobImpl = new SafeJobServiceEngineImpl(this); + } + } + + /** + * Implementation of a safe JobServiceEngine for interaction with JobIntentService. + */ + @RequiresApi(26) + static final class SafeJobServiceEngineImpl extends JobServiceEngine + implements JobIntentService.CompatJobEngine { + static final String TAG = "JobServiceEngineImpl"; + + static final boolean DEBUG = false; + + final JobIntentService mService; + final Object mLock = new Object(); + JobParameters mParams; + + final class WrapperWorkItem implements JobIntentService.GenericWorkItem { + final JobWorkItem mJobWork; + + WrapperWorkItem(JobWorkItem jobWork) { + mJobWork = jobWork; + } + + @Override + public Intent getIntent() { + return mJobWork.getIntent(); + } + + @Override + public void complete() { + synchronized (mLock) { + if (mParams != null) { + try { + mParams.completeWork(mJobWork); + } catch (SecurityException e) { + Log.e(TAG, Log.getStackTraceString(e)); + } + } + } + } + } + + SafeJobServiceEngineImpl(JobIntentService service) { + super(service); + mService = service; + } + + @Override + public IBinder compatGetBinder() { + return getBinder(); + } + + @Override + public boolean onStartJob(JobParameters params) { + if (DEBUG) Log.d(TAG, "onStartJob: " + params); + mParams = params; + // We can now start dequeuing work! + mService.ensureProcessorRunningLocked(false); + return true; + } + + @Override + public boolean onStopJob(JobParameters params) { + if (DEBUG) Log.d(TAG, "onStartJob: " + params); + boolean result = mService.doStopCurrentWork(); + synchronized (mLock) { + // Once we return, the job is stopped, so its JobParameters are no + // longer valid and we should not be doing anything with them. + mParams = null; + } + return result; + } + + /** + * Dequeue some work. + */ + @Override + public JobIntentService.GenericWorkItem dequeueWork() { + JobWorkItem work = null; + synchronized (mLock) { + if (mParams == null) { + return null; + } + try { + work = mParams.dequeueWork(); + } catch (SecurityException e) { + Log.e(TAG, Log.getStackTraceString(e)); + } + } + if (work != null) { + work.getIntent().setExtrasClassLoader(mService.getClassLoader()); + return new WrapperWorkItem(work); + } else { + return null; + } + } + } +} diff --git a/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java b/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java index ea07fc76e..a42d495ac 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/UpdateManager.java @@ -24,6 +24,8 @@ import de.danoeh.antennapod.core.storage.DBWriter; */ class UpdateManager { + private UpdateManager(){} + private static final String TAG = UpdateManager.class.getSimpleName(); private static final String PREF_NAME = "app_version"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/ApGlideSettings.java b/core/src/main/java/de/danoeh/antennapod/core/glide/ApGlideSettings.java index fc1acd0e1..d0061af99 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/ApGlideSettings.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/ApGlideSettings.java @@ -6,6 +6,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy; * The settings that AntennaPod will use for various Glide options */ public class ApGlideSettings { + private ApGlideSettings(){} public static final DiskCacheStrategy AP_DISK_CACHE_STRATEGY = DiskCacheStrategy.ALL; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java index b51b8d996..5b17dd338 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/GpodnetPreferences.java @@ -24,6 +24,8 @@ import de.danoeh.antennapod.core.service.GpodnetSyncService; */ public class GpodnetPreferences { + private GpodnetPreferences(){} + private static final String TAG = "GpodnetPreferences"; private static final String PREF_NAME = "gpodder.net"; 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 6aaf65e18..5eec32ebc 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 @@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit; * when called. */ public class UserPreferences { + private UserPreferences(){} private static final String IMPORT_DIR = "import/"; @@ -44,7 +45,7 @@ public class UserPreferences { public static final String PREF_HIDDEN_DRAWER_ITEMS = "prefHiddenDrawerItems"; private static final String PREF_DRAWER_FEED_ORDER = "prefDrawerFeedOrder"; private static final String PREF_DRAWER_FEED_COUNTER = "prefDrawerFeedIndicator"; - private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; + public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify"; public static final String PREF_COMPACT_NOTIFICATION_BUTTONS = "prefCompactNotificationButtons"; public static final String PREF_LOCKSCREEN_BACKGROUND = "prefLockscreenBackground"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java index fe6e8c400..5584991ca 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java @@ -6,8 +6,8 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; -import android.support.v4.app.JobIntentService; import android.support.v4.app.NotificationCompat; +import android.support.v4.app.SafeJobIntentService; import android.support.v4.util.ArrayMap; import android.util.Log; import android.util.Pair; @@ -44,7 +44,7 @@ import de.danoeh.antennapod.core.util.gui.NotificationUtils; * Synchronizes local subscriptions with gpodder.net service. The service should be started with ACTION_SYNC as an action argument. * This class also provides static methods for starting the GpodnetSyncService. */ -public class GpodnetSyncService extends JobIntentService { +public class GpodnetSyncService extends SafeJobIntentService { private static final String TAG = "GpodnetSyncService"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java index d2214cac8..6dab9a561 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java @@ -9,23 +9,24 @@ import android.content.ServiceConnection; import android.os.Build; import android.os.IBinder; import android.support.annotation.NonNull; -import android.support.v4.app.JobIntentService; +import android.support.v4.app.SafeJobIntentService; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.widget.RemoteViews; + import de.danoeh.antennapod.core.R; import de.danoeh.antennapod.core.receiver.MediaButtonReceiver; +import de.danoeh.antennapod.core.receiver.PlayerWidget; import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.service.playback.PlayerStatus; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.playback.Playable; -import de.danoeh.antennapod.core.receiver.PlayerWidget; /** * Updates the state of the player widget */ -public class PlayerWidgetJobService extends JobIntentService { +public class PlayerWidgetJobService extends SafeJobIntentService { private static final String TAG = "PlayerWidgetJobService"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java index 57d099dfc..97007a214 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java @@ -40,6 +40,9 @@ import okhttp3.internal.http.StatusLine; * Provides access to a HttpClient singleton. */ public class AntennapodHttpClient { + + private AntennapodHttpClient(){} + private static final String TAG = "AntennapodHttpClient"; private static final int CONNECTION_TIMEOUT = 30000; diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/FeedSearcher.java b/core/src/main/java/de/danoeh/antennapod/core/storage/FeedSearcher.java index aa5706ad0..f91e2ad08 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/FeedSearcher.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/FeedSearcher.java @@ -19,6 +19,8 @@ import de.danoeh.antennapod.core.util.comparator.SearchResultValueComparator; * Performs search on Feeds and FeedItems */ public class FeedSearcher { + private FeedSearcher(){} + private static final String TAG = "FeedSearcher"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java index e17d8de3e..101992e8c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java @@ -17,7 +17,9 @@ import java.util.TimeZone; */ public class DateUtils { - private static final String TAG = "DateUtils"; + private DateUtils(){} + + private static final String TAG = "DateUtils"; private static final TimeZone defaultTimezone = TimeZone.getTimeZone("GMT"); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java b/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java index 76a6549ae..826c06822 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/FeedItemUtil.java @@ -5,6 +5,7 @@ import java.util.List; import de.danoeh.antennapod.core.feed.FeedItem; public class FeedItemUtil { + private FeedItemUtil(){} public static int indexOfItemWithDownloadUrl(List<FeedItem> items, String downloadUrl) { if(items == null) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java index aaaaf8f4d..e81ab47ed 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java @@ -8,6 +8,7 @@ import android.content.pm.ResolveInfo; import java.util.List; public class IntentUtils { + private IntentUtils(){} /* * Checks if there is at least one exported activity that can be performed for the intent diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java index 7ec7f84c4..90e0b0981 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java @@ -5,6 +5,9 @@ import android.support.v4.util.ArrayMap; import java.nio.charset.Charset; public class LangUtils { + + private LangUtils(){} + public static final Charset UTF_8 = Charset.forName("UTF-8"); private static final ArrayMap<String, String> languages; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java index cbda583fa..49709bb53 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java @@ -27,6 +27,7 @@ import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; public class NetworkUtils { + private NetworkUtils(){} private static final String TAG = NetworkUtils.class.getSimpleName(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/RewindAfterPauseUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/RewindAfterPauseUtils.java index ee306a401..d1818aeef 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/RewindAfterPauseUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/RewindAfterPauseUtils.java @@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit; * Media file should be "rewinded" x seconds after user resumes the playback. */ public class RewindAfterPauseUtils { + private RewindAfterPauseUtils(){} public static final long ELAPSED_TIME_FOR_SHORT_REWIND = TimeUnit.MINUTES.toMillis(1); public static final long ELAPSED_TIME_FOR_MEDIUM_REWIND = TimeUnit.HOURS.toMillis(1); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java index 1ef81bf64..3a6bf5755 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java @@ -14,6 +14,8 @@ import de.danoeh.antennapod.core.preferences.UserPreferences; * Utility functions for handling storage errors */ public class StorageUtils { + private StorageUtils(){} + private static final String TAG = "StorageUtils"; public static boolean storageAvailable() { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java index 03d0f10ff..031eaed49 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java @@ -11,6 +11,8 @@ import de.danoeh.antennapod.core.R; import de.danoeh.antennapod.core.preferences.UserPreferences; public class ThemeUtils { + private ThemeUtils(){} + private static final String TAG = "ThemeUtils"; public static int getSelectionBackgroundColor() { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java index 45cb56988..d4d5843d2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrServiceCreator.java @@ -11,7 +11,9 @@ import de.danoeh.antennapod.core.BuildConfig; /** Ensures that only one instance of the FlattrService class exists at a time */ class FlattrServiceCreator { - private static final String TAG = "FlattrServiceCreator"; + private FlattrServiceCreator(){} + + public static final String TAG = "FlattrServiceCreator"; private static volatile FlattrService flattrService; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java index 313d1c2f2..dfb5484cd 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java @@ -36,6 +36,8 @@ import de.danoeh.antennapod.core.storage.DBWriter; */ public class FlattrUtils { + private FlattrUtils(){} + private static final String TAG = "FlattrUtils"; private static final String HOST_NAME = "de.danoeh.antennapod"; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/MediaPlayerError.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/MediaPlayerError.java index a576dd497..b04c02075 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/MediaPlayerError.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/MediaPlayerError.java @@ -7,6 +7,7 @@ import de.danoeh.antennapod.core.R; /** Utility class for MediaPlayer errors. */ public class MediaPlayerError { + private MediaPlayerError(){} /** Get a human-readable string for a specific error code. */ public static String getErrorString(Context context, int code) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/Playable.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/Playable.java index ff7f5b79d..da9b96430 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/Playable.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/Playable.java @@ -176,6 +176,8 @@ public interface Playable extends Parcelable, * Provides utility methods for Playable objects. */ class PlayableUtils { + private PlayableUtils(){} + private static final String TAG = "PlayableUtils"; /** diff --git a/core/src/main/res/values-de/strings.xml b/core/src/main/res/values-de/strings.xml index b31056a7a..b8f4ffbab 100644 --- a/core/src/main/res/values-de/strings.xml +++ b/core/src/main/res/values-de/strings.xml @@ -60,15 +60,16 @@ <string name="yes">Ja</string> <string name="no">Nein</string> <string name="reset">Reset</string> - <string name="author_label">Autor</string> + <string name="author_label">Autor(en)</string> <string name="language_label">Sprache</string> <string name="url_label">URL</string> <string name="podcast_settings_label">Einstellungen</string> <string name="cover_label">Bild</string> <string name="error_label">Fehler</string> <string name="error_msg_prefix">Ein Fehler ist aufgetreten:</string> + <string name="needs_storage_permission">Für diese Funktion wird die Speicher-Berechtigung benötigt</string> <string name="refresh_label">Aktualisieren</string> - <string name="external_storage_error_msg">Der externe Speicher ist nicht verfügbar. Bitte stelle sicher, dass das externe Speichermedium eingelegt ist, damit die Anwendung funktioniert.</string> + <string name="external_storage_error_msg">Der externe Speicher ist nicht verfügbar. Bitte stelle sicher, dass das externe Speichermedium eingelegt ist, damit die App funktioniert.</string> <string name="chapters_label">Kapitel</string> <string name="chapter_duration">Dauer: %1$s</string> <string name="shownotes_label">Shownotizen</string> @@ -117,17 +118,16 @@ <string name="show_feed_settings_label">Zeige Feed-Einstellungen</string> <string name="feed_info_label">Feed-Informationen</string> <string name="feed_settings_label">Feed-Einstellungen</string> - <string name="rename_feed_label">Podcast umbenennen</string> + <string name="rename_feed_label">Feed umbenennen</string> <string name="remove_feed_label">Podcast entfernen</string> <string name="share_label">Teilen…</string> - <string name="share_link_label">Teile Link</string> - <string name="share_file_label">Teile Datei</string> + <string name="share_link_label">Episoden URL Teilen</string> <string name="share_link_with_position_label">Teile Link mit Zeitmarke</string> + <string name="share_file_label">Teile Datei</string> <string name="share_feed_url_label">Teile URL des Podcasts</string> - <string name="share_item_url_label">Teile URL der Episode</string> - <string name="share_item_url_with_position_label">Teile URL der Episode mit Zeitmarke</string> - <string name="feed_delete_confirmation_msg">Bitte bestätige, dass du den Feed \"%1$s\" und ALLE heruntergeladenen Episoden löschen möchtest.</string> - <string name="feed_remover_msg">Entferne Feed</string> + <string name="share_item_url_label">Teile URL der Episodendatei</string> + <string name="share_item_url_with_position_label">Teile URL der Episodendatei mit Zeitmarke</string> + <string name="feed_delete_confirmation_msg">Bitte bestätige, dass du den Podcast \"%1$s\" und ALLE heruntergeladenen Episoden dieses Feeds entfernen möchtest.</string> <string name="load_complete_feed">Kompletten Feed aktualisieren</string> <string name="hide_episodes_title">Episoden verbergen</string> <string name="batch_edit">Stapelbearbeitung</string> @@ -139,6 +139,7 @@ <string name="hide_downloaded_episodes_label">Heruntergeladen</string> <string name="hide_not_downloaded_episodes_label">Nicht heruntergeladen</string> <string name="hide_has_media_label">Hat Medien</string> + <string name="hide_is_favorite_label">Favorit</string> <string name="filtered_label">Gefiltert</string> <string name="refresh_failed_msg">{fa-exclamation-circle} Aktualisierung fehlgeschlagen</string> <string name="open_podcast">Podcast öffnen</string> @@ -152,6 +153,7 @@ <string name="delete_label">Löschen</string> <string name="delete_failed">Die Datei kann nicht gelöscht werden. Eventuell hilft es, das Gerät neu zu starten.</string> <string name="remove_episode_lable">Episode entfernen</string> + <string name="mark_as_seen_label">Als gelesen markieren</string> <string name="marked_as_seen_label">Als gesehen markiert</string> <string name="mark_read_label">Als gespielt markieren</string> <string name="marked_as_read_label">Als gespielt markiert</string> @@ -244,7 +246,7 @@ <string name="date">Datum</string> <string name="duration">Dauer</string> <string name="episode_title">Episodentitel</string> - <string name="feed_title">Podcastname</string> + <string name="feed_title">Feedname</string> <string name="random">Zufällig</string> <string name="smart_shuffle">Schlaues Mischen</string> <string name="ascending">Aufsteigend</string> @@ -302,7 +304,7 @@ <string name="appearance">Erscheinungsbild</string> <string name="external_elements">Externe Elemente</string> <string name="interruptions">Unterbrechungen</string> - <string name="buttons">Knöpfe</string> + <string name="buttons">Buttons zur Steuerung der Wiedergabe</string> <string name="media_player">Medienabspieler</string> <string name="pref_episode_cleanup_title">Automatisches Löschen</string> <string name="pref_episode_cleanup_summary">Episoden, die weder in der Abspielliste noch Favoriten sind, können gelöscht werden, wenn beim automatischen Herunterladen Speicherplatz für neue Episoden gebraucht wird</string> @@ -359,7 +361,6 @@ <string name="pref_nav_drawer_feed_order_title">Reihenfolge der Abonnements einstellen</string> <string name="pref_nav_drawer_feed_order_sum">Ändere die Reihenfolge deiner Abonnements</string> <string name="pref_nav_drawer_feed_counter_title">Abonnement-Zähler einstellen</string> - <string name="pref_nav_drawer_feed_counter_sum">Ändere, welche Information der Abonnement-Zähler anzeigt</string> <string name="pref_set_theme_sum">Ändere das Aussehen von AntennaPod.</string> <string name="pref_automatic_download_title">Automatisches Herunterladen</string> <string name="pref_automatic_download_sum">Konfiguriere das automatische Herunterladen von Episoden.</string> @@ -373,7 +374,6 @@ <string name="pref_episode_cache_title">Episodenspeicher</string> <string name="pref_theme_title_light">Hell</string> <string name="pref_theme_title_dark">Dunkel</string> - <string name="pref_theme_title_trueblack">Echtes Schwarz</string> <string name="pref_episode_cache_unlimited">Unbegrenzt</string> <string name="pref_update_interval_hours_plural">Stunden</string> <string name="pref_update_interval_hours_singular">Stunde</string> @@ -437,10 +437,10 @@ <string name="pref_enqueue_downloaded_title">Downloads einreihen</string> <string name="pref_enqueue_downloaded_summary">Füge heruntergeladene Episoden zur Abspielliste hinzu</string> <string name="media_player_builtin">Androids eingebauter Abspieler</string> - <string name="pref_videoBehavior_title">Video-Verhalten</string> + <string name="pref_videoBehavior_title">Beim Beenden des Videos</string> <string name="pref_videoBehavior_sum">Verhalten beim Verlassen der Video-Wiedergabe</string> <string name="stop_playback">Wiedergabe anhalten</string> - <string name="continue_playback">Wiedergabe fortsetzen</string> + <string name="continue_playback">Audiowiedergabe fortsetzen</string> <!--Auto-Flattr dialog--> <string name="auto_flattr_enable">Automatisches Flattrn aktivieren</string> <string name="auto_flattr_after_percent">Flattr eine Episode, sobald %d Prozent gespielt worden sind</string> @@ -450,8 +450,6 @@ <string name="search_hint">Suche nach Episoden</string> <string name="found_in_shownotes_label">In Shownotizen gefunden</string> <string name="found_in_chapters_label">In Kapiteln gefunden</string> - <string name="found_in_authors_label">In Autoren gefunden</string> - <string name="found_in_feeds_label">In Feeds gefunden</string> <string name="search_status_no_results">Keine Ergebnisse gefunden</string> <string name="search_label">Suchen</string> <string name="found_in_title_label">In Titel gefunden</string> diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 7037020bc..ad91ecc76 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -337,7 +337,7 @@ <string name="pref_unpauseOnHeadsetReconnect_sum">Resume playback when the headphones are reconnected</string> <string name="pref_unpauseOnBluetoothReconnect_sum">Resume playback when bluetooth reconnects</string> <string name="pref_hardwareForwardButtonSkips_title">Forward Button Skips</string> - <string name="pref_hardwareForwardButtonSkips_sum">When pressing a hardware forward button skip to the next episode instead of fast-forwarding</string> + <string name="pref_hardwareForwardButtonSkips_sum">When pressing a forward button on a bluetooth-connected device skip to the next episode instead of fast-forwarding</string> <string name="pref_hardwarePreviousButtonRestarts_title">Previous button restarts</string> <string name="pref_hardwarePreviousButtonRestarts_sum">When pressing a hardware previous button restart playing the current episode instead of rewinding</string> <string name="pref_followQueue_sum">Jump to next queue item when playback completes</string> @@ -429,8 +429,8 @@ <string name="pref_rewind_sum">Customize the number of seconds to jump backwards when the rewind button is clicked</string> <string name="pref_gpodnet_sethostname_title">Set hostname</string> <string name="pref_gpodnet_sethostname_use_default_host">Use default host</string> - <string name="pref_expandNotify_title">Expand Notification</string> - <string name="pref_expandNotify_sum">Always expand the notification to show playback buttons.</string> + <string name="pref_expandNotify_title">High Notification priority</string> + <string name="pref_expandNotify_sum">This usually expands the notification to show playback buttons.</string> <string name="pref_persistNotify_title">Persistent Playback Controls</string> <string name="pref_persistNotify_sum">Keep notification and lockscreen controls when playback is paused.</string> <string name="pref_compact_notification_buttons_title">Set Lockscreen Buttons</string> diff --git a/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java b/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java index f12f1d806..9af76cf86 100644 --- a/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java +++ b/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java @@ -14,6 +14,7 @@ import de.danoeh.antennapod.core.util.NetworkUtils; * Apps using the core module of AntennaPod should register implementations of all interfaces here. */ public class ClientConfig { + private ClientConfig(){} /** * Should be used when setting User-Agent header for HTTP-requests. diff --git a/core/src/play/java/de/danoeh/antennapod/core/cast/CastUtils.java b/core/src/play/java/de/danoeh/antennapod/core/cast/CastUtils.java index aec559a5f..88da6a0ec 100644 --- a/core/src/play/java/de/danoeh/antennapod/core/cast/CastUtils.java +++ b/core/src/play/java/de/danoeh/antennapod/core/cast/CastUtils.java @@ -23,6 +23,8 @@ import de.danoeh.antennapod.core.util.playback.Playable; * Helper functions for Cast support. */ public class CastUtils { + private CastUtils(){} + private static final String TAG = "CastUtils"; public static final String KEY_MEDIA_ID = "de.danoeh.antennapod.core.cast.MediaId"; |