summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTacoTheDank <SkytkRSfan3895@gmail.com>2023-05-14 17:02:34 -0400
committerTacoTheDank <SkytkRSfan3895@gmail.com>2023-05-14 17:02:34 -0400
commitcf4345564c13b72b805d7aac58e88559e77643b9 (patch)
treeb999a8f3dac2db01b16f6aa58d98249cd3582078
parent90d6095dad5c53435f8dc4ee7e9641bece42d39b (diff)
downloadAntennaPod-cf4345564c13b72b805d7aac58e88559e77643b9.zip
Remove no longer needed Compat stuff
-rw-r--r--app/build.gradle1
-rw-r--r--app/src/main/java/com/google/android/material/bottomsheet/ViewPagerBottomSheetBehavior.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/PodcastApp.java4
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java6
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/SwipeActionsDialog.java6
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/HomeSection.java4
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java3
-rw-r--r--common.gradle1
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java4
-rw-r--r--core/src/main/res/layout/player_widget.xml3
11 files changed, 14 insertions, 24 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 2fab1731b..816a1073f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -98,7 +98,6 @@ dependencies {
implementation "androidx.fragment:fragment:$fragmentVersion"
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation "androidx.media:media:$mediaVersion"
- implementation 'androidx.multidex:multidex:2.0.1'
implementation "androidx.palette:palette:$paletteVersion"
implementation "androidx.preference:preference:$preferenceVersion"
implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"
diff --git a/app/src/main/java/com/google/android/material/bottomsheet/ViewPagerBottomSheetBehavior.java b/app/src/main/java/com/google/android/material/bottomsheet/ViewPagerBottomSheetBehavior.java
index d9b912634..b50232fcc 100644
--- a/app/src/main/java/com/google/android/material/bottomsheet/ViewPagerBottomSheetBehavior.java
+++ b/app/src/main/java/com/google/android/material/bottomsheet/ViewPagerBottomSheetBehavior.java
@@ -5,7 +5,6 @@ import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
-import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager2.widget.ViewPager2;
@@ -29,7 +28,7 @@ public class ViewPagerBottomSheetBehavior<V extends View> extends BottomSheetBeh
@Override
View findScrollingChild(View view) {
- if (ViewCompat.isNestedScrollingEnabled(view)) {
+ if (view.isNestedScrollingEnabled()) {
return view;
}
diff --git a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
index 942e2cf24..bd93e3ea9 100644
--- a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
+++ b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
@@ -1,10 +1,10 @@
package de.danoeh.antennapod;
+import android.app.Application;
import android.content.ComponentName;
import android.content.Intent;
import android.os.StrictMode;
-import androidx.multidex.MultiDexApplication;
import com.google.android.material.color.DynamicColors;
import com.joanzapata.iconify.Iconify;
import com.joanzapata.iconify.fonts.FontAwesomeModule;
@@ -21,7 +21,7 @@ import de.danoeh.antennapod.spa.SPAUtil;
import org.greenrobot.eventbus.EventBus;
/** Main application class. */
-public class PodcastApp extends MultiDexApplication {
+public class PodcastApp extends Application {
private static PodcastApp singleton;
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java
index 9070cd6f8..fe5eb369c 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java
@@ -1,6 +1,5 @@
package de.danoeh.antennapod.activity;
-import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.graphics.drawable.ColorDrawable;
@@ -20,6 +19,7 @@ import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.View;
+import android.view.Window;
import android.view.WindowManager;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
@@ -30,7 +30,6 @@ import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.SeekBar;
import androidx.annotation.Nullable;
-import androidx.core.view.WindowCompat;
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
import com.bumptech.glide.Glide;
import de.danoeh.antennapod.R;
@@ -95,13 +94,12 @@ public class VideoplayerActivity extends CastEnabledActivity implements SeekBar.
private Disposable disposable;
private float prog;
- @SuppressLint("AppCompatMethod")
@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
// has to be called before setting layout content
- supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY);
+ supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
setTheme(R.style.Theme_AntennaPod_VideoPlayer);
super.onCreate(savedInstanceState);
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/SwipeActionsDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/SwipeActionsDialog.java
index 4e579fce4..257158f15 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/SwipeActionsDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/SwipeActionsDialog.java
@@ -156,12 +156,12 @@ public class SwipeActionsDialog {
Drawable icon = DrawableCompat.wrap(AppCompatResources.getDrawable(context, action.getActionIcon()));
icon.mutate();
- DrawableCompat.setTintMode(icon, PorterDuff.Mode.SRC_ATOP);
+ icon.setTintMode(PorterDuff.Mode.SRC_ATOP);
if ((direction == LEFT && leftAction == action) || (direction == RIGHT && rightAction == action)) {
- DrawableCompat.setTint(icon, ThemeUtils.getColorFromAttr(context, action.getActionColor()));
+ icon.setTint(ThemeUtils.getColorFromAttr(context, action.getActionColor()));
item.swipeActionLabel.setTextColor(ThemeUtils.getColorFromAttr(context, action.getActionColor()));
} else {
- DrawableCompat.setTint(icon, ThemeUtils.getColorFromAttr(context, R.attr.action_icon_color));
+ icon.setTint(ThemeUtils.getColorFromAttr(context, R.attr.action_icon_color));
}
item.swipeIcon.setImageDrawable(icon);
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/HomeSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/HomeSection.java
index 6cde2927b..03036d267 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/home/HomeSection.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/home/HomeSection.java
@@ -9,8 +9,6 @@ import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.core.text.TextUtilsCompat;
-import androidx.core.view.ViewCompat;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.DefaultItemAnimator;
import de.danoeh.antennapod.adapter.EpisodeItemListAdapter;
@@ -38,7 +36,7 @@ public abstract class HomeSection extends Fragment implements View.OnCreateConte
@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
viewBinding = HomeSectionBinding.inflate(inflater);
viewBinding.titleLabel.setText(getSectionTitle());
- if (TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_LTR) {
+ if (TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_LTR) {
viewBinding.moreButton.setText(getMoreLinkTitle() + "\u00A0»");
} else {
viewBinding.moreButton.setText("«\u00A0" + getMoreLinkTitle());
diff --git a/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java b/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java
index ed1b3fdd0..1e53ee828 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java
@@ -3,7 +3,6 @@ package de.danoeh.antennapod.view;
import android.animation.ValueAnimator;
import android.view.View;
import androidx.annotation.NonNull;
-import androidx.core.view.ViewCompat;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -18,7 +17,7 @@ public class LiftOnScrollListener extends RecyclerView.OnScrollListener
public LiftOnScrollListener(View appBar) {
animator = ValueAnimator.ofFloat(0, appBar.getContext().getResources().getDisplayMetrics().density * 8);
- animator.addUpdateListener(animation -> ViewCompat.setElevation(appBar, (float) animation.getAnimatedValue()));
+ animator.addUpdateListener(animation -> appBar.setElevation((float) animation.getAnimatedValue()));
}
@Override
diff --git a/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java b/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java
index a289e630a..ea3c73f15 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java
@@ -19,7 +19,6 @@ import android.webkit.WebViewClient;
import androidx.core.content.ContextCompat;
import androidx.core.util.Consumer;
-import androidx.core.view.ViewCompat;
import com.google.android.material.snackbar.Snackbar;
@@ -133,7 +132,7 @@ public class ShownotesWebView extends WebView implements View.OnLongClickListene
cm.setPrimaryClip(clipData);
if (Build.VERSION.SDK_INT < 32) {
Snackbar s = Snackbar.make(this, R.string.copied_to_clipboard, Snackbar.LENGTH_LONG);
- ViewCompat.setElevation(s.getView(), 100);
+ s.getView().setElevation(100);
s.show();
}
} else if (itemId == R.id.go_to_position_item) {
diff --git a/common.gradle b/common.gradle
index e7f55e082..65eed001c 100644
--- a/common.gradle
+++ b/common.gradle
@@ -5,7 +5,6 @@ android {
minSdk 21
targetSdk 33
- multiDexEnabled true
vectorDrawables.useSupportLibrary true
vectorDrawables.generatedDensities = []
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
index d8cef7ec2..fe98dbc8f 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
@@ -14,8 +14,8 @@ import android.support.v4.media.session.MediaSessionCompat;
import android.util.Log;
import android.view.KeyEvent;
import androidx.annotation.NonNull;
+import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.app.NotificationCompat;
-import androidx.core.content.ContextCompat;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import de.danoeh.antennapod.core.R;
@@ -119,7 +119,7 @@ public class PlaybackServiceNotificationBuilder {
}
private static Bitmap getBitmap(Context context, int drawableId) {
- Drawable drawable = ContextCompat.getDrawable(context, drawableId);
+ Drawable drawable = AppCompatResources.getDrawable(context, drawableId);
if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable) drawable).getBitmap();
} else if (drawable instanceof VectorDrawable) {
diff --git a/core/src/main/res/layout/player_widget.xml b/core/src/main/res/layout/player_widget.xml
index 227cb1cc5..616e61e91 100644
--- a/core/src/main/res/layout/player_widget.xml
+++ b/core/src/main/res/layout/player_widget.xml
@@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:padding="@dimen/widget_margin"
- tools:ignore="VectorDrawableCompat">
+ android:padding="@dimen/widget_margin">
<RelativeLayout
android:id="@+id/widgetLayout"