Merge pull request #3955 from ByteHamster/consumer

Use AndroidX consumer instead of our own
This commit is contained in:
H. Lehmann 2020-03-23 11:09:00 +01:00 committed by GitHub
commit 884d00a537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 27 deletions

View File

@ -1,8 +1,7 @@
package de.danoeh.antennapod.core.service.download;
import androidx.annotation.NonNull;
import de.danoeh.antennapod.core.util.Consumer;
import androidx.core.util.Consumer;
public class StubDownloader extends Downloader {

View File

@ -4,6 +4,7 @@ import android.content.Context;
import android.content.Intent;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.util.Consumer;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@ -35,7 +36,6 @@ import de.danoeh.antennapod.core.service.download.StubDownloader;
import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.storage.DBWriter;
import de.danoeh.antennapod.core.storage.DownloadRequester;
import de.danoeh.antennapod.core.util.Consumer;
import static de.test.antennapod.util.event.DownloadEventListener.withDownloadEventListener;
import static de.test.antennapod.util.event.FeedItemEventListener.withFeedItemEventListener;

View File

@ -6,6 +6,7 @@ import android.database.Cursor;
import android.preference.PreferenceManager;
import android.util.Log;
import androidx.core.util.Consumer;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
@ -31,7 +32,6 @@ import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.storage.DBWriter;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
import de.danoeh.antennapod.core.util.Consumer;
import de.danoeh.antennapod.core.util.FeedItemUtil;
import static androidx.test.InstrumentationRegistry.getInstrumentation;

View File

@ -22,9 +22,12 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.arch.core.util.Function;
import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.content.ContextCompat;
import androidx.core.util.Consumer;
import androidx.core.util.Supplier;
import com.bumptech.glide.Glide;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.event.PlaybackPositionEvent;
@ -35,15 +38,12 @@ import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.service.playback.PlaybackService;
import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.storage.DBWriter;
import de.danoeh.antennapod.core.util.Consumer;
import de.danoeh.antennapod.core.util.Converter;
import de.danoeh.antennapod.core.util.FeedItemUtil;
import de.danoeh.antennapod.core.util.Flavors;
import de.danoeh.antennapod.core.util.Function;
import de.danoeh.antennapod.core.util.IntentUtils;
import de.danoeh.antennapod.core.util.ShareUtils;
import de.danoeh.antennapod.core.util.StorageUtils;
import de.danoeh.antennapod.core.util.Supplier;
import de.danoeh.antennapod.core.util.TimeSpeedConverter;
import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil;
import de.danoeh.antennapod.core.util.playback.ExternalMedia;

View File

@ -15,11 +15,9 @@ import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.core.content.ContextCompat;
import androidx.core.util.Consumer;
import com.google.android.material.snackbar.Snackbar;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.util.Consumer;
import de.danoeh.antennapod.core.util.Converter;
import de.danoeh.antennapod.core.util.IntentUtils;
import de.danoeh.antennapod.core.util.NetworkUtils;

View File

@ -1,5 +0,0 @@
package de.danoeh.antennapod.core.util;
public interface Consumer<T> {
void accept(T t);
}

View File

@ -1,7 +0,0 @@
package de.danoeh.antennapod.core.util;
import io.reactivex.annotations.NonNull;
public interface Function<T, R> {
R apply(@NonNull T t);
}

View File

@ -1,5 +0,0 @@
package de.danoeh.antennapod.core.util;
public interface Supplier<T> {
T get();
}