From 5f7f1d738d4d3fc15b0a01c097f1a78819313419 Mon Sep 17 00:00:00 2001 From: Colin Edwards Date: Wed, 27 Dec 2023 13:34:37 -0600 Subject: [PATCH 1/2] android: set kotlin target to 9 The naming scheme was changed in kotlin but not java after java 8 --- android/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 6eb5d74a7..cb0bb9771 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -41,7 +41,7 @@ android { targetCompatibility = JavaVersion.VERSION_1_9 } kotlinOptions { - jvmTarget = "1.9" + jvmTarget = "9" } packaging { resources { From 201e081750b9f41ae647c4f0bf0b2d26419a4922 Mon Sep 17 00:00:00 2001 From: Colin Edwards Date: Wed, 27 Dec 2023 13:38:38 -0600 Subject: [PATCH 2/2] android: Fix boot receiver settings and intent check --- android/app/src/main/java/org/musicpd/Receiver.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/org/musicpd/Receiver.java b/android/app/src/main/java/org/musicpd/Receiver.java index afa32427e..6ee3e51a0 100644 --- a/android/app/src/main/java/org/musicpd/Receiver.java +++ b/android/app/src/main/java/org/musicpd/Receiver.java @@ -20,9 +20,9 @@ public class Receiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Log.d("Receiver", "onReceive: " + intent); - if (intent.getAction() == "android.intent.action.BOOT_COMPLETED") { - if (Settings.Preferences.getBoolean(context, - Settings.Preferences.KEY_RUN_ON_BOOT, + if (BOOT_ACTIONS.contains(intent.getAction())) { + if (Preferences.getBoolean(context, + Preferences.KEY_RUN_ON_BOOT, false)) { final boolean wakelock = Preferences.getBoolean(context,