From 0d74de979ab277b97412b6d9b9d44c8637499c26 Mon Sep 17 00:00:00 2001 From: Tim Schneeberger Date: Sun, 15 Dec 2024 18:22:31 +0100 Subject: [PATCH] chore: add TODO for Android 15 targetting --- .../receiver/BootCompletedReceiver.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/me/timschneeberger/rootlessjamesdsp/receiver/BootCompletedReceiver.kt b/app/src/main/java/me/timschneeberger/rootlessjamesdsp/receiver/BootCompletedReceiver.kt index b07d7a02d..699b23989 100644 --- a/app/src/main/java/me/timschneeberger/rootlessjamesdsp/receiver/BootCompletedReceiver.kt +++ b/app/src/main/java/me/timschneeberger/rootlessjamesdsp/receiver/BootCompletedReceiver.kt @@ -46,6 +46,18 @@ class BootCompletedReceiver : BroadcastReceiver(), KoinComponent { // Root version: if enhanced processing mode is on, we need to start the service manually if(preferences.get(R.string.key_audioformat_enhanced_processing) && !preferences.get(R.string.key_audioformat_processing)) { + + /* + FIXME: When targetting Android 15+, we are not allowed to start a + media_playback/media_projection foreground service from a BOOT_COMPLETED receiver. + + Possible solutions: + - Also use EngineLauncherActivity for this. + Downside: requires SYSTEM_ALERT_WINDOW permission for the root build + - Better: Use the special use FGS type instead of media_playback for the root service. + + Ref: https://developer.android.com/about/versions/15/behavior-changes-15#fgs-sysalert + */ RootAudioProcessorService.startServiceEnhanced(context) } else if(preferences.get(R.string.key_audioformat_processing))