diff --git a/app/build.gradle b/app/build.gradle
index 92682e6c3..08e569987 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,7 +1,7 @@
plugins {
id('com.android.application')
id('com.getkeepsafe.dexcount')
- id('com.github.triplet.play') version '3.4.0' apply false
+ id('com.github.triplet.play') version '3.6.0-agp4.2' apply false
}
apply from: "../common.gradle"
apply from: "../playFlavor.gradle"
@@ -76,9 +76,9 @@ android {
dexcount {
if (project.hasProperty("enableDexcountInDebug")) {
- runOnEachPackage enableDexcountInDebug.toBoolean()
+ runOnEachPackage = enableDexcountInDebug.toBoolean()
} else { // default to not running dexcount
- runOnEachPackage false
+ runOnEachPackage = false
}
}
}
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java
index 3020aba43..674071294 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java
@@ -1,21 +1,14 @@
package de.danoeh.antennapod.activity;
-import android.Manifest;
-import android.app.WallpaperManager;
import android.appwidget.AppWidgetManager;
import android.content.Intent;
import android.content.SharedPreferences;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
-import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
-import androidx.core.content.ContextCompat;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.receiver.PlayerWidget;
@@ -51,7 +44,6 @@ public class WidgetConfigActivity extends AppCompatActivity {
finish();
}
- displayDeviceBackground();
opacityTextView = findViewById(R.id.widget_opacity_textView);
opacitySeekBar = findViewById(R.id.widget_opacity_seekBar);
widgetPreview = findViewById(R.id.widgetLayout);
@@ -102,16 +94,6 @@ public class WidgetConfigActivity extends AppCompatActivity {
widgetPreview.findViewById(R.id.butRew).setVisibility(ckRewind.isChecked() ? View.VISIBLE : View.GONE);
}
- private void displayDeviceBackground() {
- int permission = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);
- if (Build.VERSION.SDK_INT < 27 || permission == PackageManager.PERMISSION_GRANTED) {
- final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
- final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
- ImageView background = findViewById(R.id.widget_config_background);
- background.setImageDrawable(wallpaperDrawable);
- }
- }
-
private void confirmCreateWidget(View v) {
int backgroundColor = getColorWithAlpha(PlayerWidget.DEFAULT_COLOR, opacitySeekBar.getProgress());
diff --git a/build.gradle b/build.gradle
index f6992882c..7271a4650 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,9 +6,9 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.3'
- classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:1.0.4'
- classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
+ classpath 'com.android.tools.build:gradle:4.2.2'
+ classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.0'
+ classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.4'
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.0"
}
}
diff --git a/core/lint.xml b/core/lint.xml
index fd9f5eb99..aa2c50677 100644
--- a/core/lint.xml
+++ b/core/lint.xml
@@ -8,4 +8,8 @@
+
+
+
+
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 76dfab169..c20666aaa 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
@@ -530,7 +530,8 @@ public class UserPreferences {
private static void setAllowMobileFor(String type, boolean allow) {
HashSet defaultValue = new HashSet<>();
defaultValue.add("images");
- Set allowed = prefs.getStringSet(PREF_MOBILE_UPDATE, defaultValue);
+ final Set getValueStringSet = prefs.getStringSet(PREF_MOBILE_UPDATE, defaultValue);
+ final Set allowed = new HashSet<>(getValueStringSet);
if (allow) {
allowed.add(type);
} else {
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/mapper/FeedMediaCursorMapper.java b/core/src/main/java/de/danoeh/antennapod/core/storage/mapper/FeedMediaCursorMapper.java
index 608fce5c4..0dc3dc231 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/mapper/FeedMediaCursorMapper.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/mapper/FeedMediaCursorMapper.java
@@ -36,7 +36,7 @@ public abstract class FeedMediaCursorMapper {
}
Boolean hasEmbeddedPicture;
- switch (cursor.getInt(cursor.getColumnIndex(PodDBAdapter.KEY_HAS_EMBEDDED_PICTURE))) {
+ switch (cursor.getInt(cursor.getColumnIndexOrThrow(PodDBAdapter.KEY_HAS_EMBEDDED_PICTURE))) {
case 1:
hasEmbeddedPicture = Boolean.TRUE;
break;