From d2933af2ca67ab420df0f089218f28a2ac596eab Mon Sep 17 00:00:00 2001 From: meowarex Date: Thu, 21 May 2026 02:59:11 +1000 Subject: [PATCH] Fix Player Controls in Notif --- .../rlmobile/patcher/util/ManifestPatcher.kt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/patcher/util/ManifestPatcher.kt b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/patcher/util/ManifestPatcher.kt index a727118..c725c72 100644 --- a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/patcher/util/ManifestPatcher.kt +++ b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/patcher/util/ManifestPatcher.kt @@ -89,16 +89,13 @@ object ManifestPatcher { } } - "uses-sdk" -> object : NodeVisitor(nv) { - override fun attr(ns: String?, name: String?, resourceId: Int, type: Int, value: Any?) { - if (name == "targetSdkVersion") { - val version = if (Build.VERSION.SDK_INT >= 31) 30 else 28 - super.attr(ns, name, resourceId, type, version) - } else { - super.attr(ns, name, resourceId, type, value) - } - } - } + // Preserve the original targetSdkVersion. Downgrading it (e.g. to 30) + // makes Android render MediaStyle notifications with the legacy + // compact-row layout instead of the modern auto-rendered controls, + // because TIDAL's notification builder skips addAction() on API 33+ + // expecting the system to auto-infer buttons from the MediaSession — + // which only happens for apps targeting SDK >= 31. + "uses-sdk" -> nv "permission" -> object : NodeVisitor(nv) { override fun attr(ns: String?, name: String, resourceId: Int, type: Int, value: Any?) {