summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java3
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/comparator/CompareCompat.java29
2 files changed, 1 insertions, 31 deletions
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 4aeed734e..4cbd8b2c2 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
@@ -8,7 +8,6 @@ import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
-import androidx.core.net.ConnectivityManagerCompat;
import android.text.TextUtils;
import android.util.Log;
@@ -97,7 +96,7 @@ public class NetworkUtils {
private static boolean isNetworkMetered() {
ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
- return ConnectivityManagerCompat.isActiveNetworkMetered(connManager);
+ return connManager.isActiveNetworkMetered();
}
private static boolean isNetworkCellular() {
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/comparator/CompareCompat.java b/core/src/main/java/de/danoeh/antennapod/core/util/comparator/CompareCompat.java
deleted file mode 100644
index c189f2389..000000000
--- a/core/src/main/java/de/danoeh/antennapod/core/util/comparator/CompareCompat.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package de.danoeh.antennapod.core.util.comparator;
-
-/**
- * Some compare() methods are not available before API 19.
- * This class provides fallbacks
- */
-public class CompareCompat {
-
- private CompareCompat() {
- // Must not be instantiated
- }
-
- /**
- * Compares two {@code long} values. Long.compare() is not available before API 19
- *
- * @return 0 if long1 = long2, less than 0 if long1 < long2,
- * and greater than 0 if long1 > long2.
- */
- public static int compareLong(long long1, long long2) {
- //noinspection UseCompareMethod
- if (long1 > long2) {
- return -1;
- } else if (long1 < long2) {
- return 1;
- } else {
- return 0;
- }
- }
-}