mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-06-17 21:13:11 +10:00
Fix Player Controls in Notif
This commit is contained in:
@@ -89,16 +89,13 @@ object ManifestPatcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"uses-sdk" -> object : NodeVisitor(nv) {
|
// Preserve the original targetSdkVersion. Downgrading it (e.g. to 30)
|
||||||
override fun attr(ns: String?, name: String?, resourceId: Int, type: Int, value: Any?) {
|
// makes Android render MediaStyle notifications with the legacy
|
||||||
if (name == "targetSdkVersion") {
|
// compact-row layout instead of the modern auto-rendered controls,
|
||||||
val version = if (Build.VERSION.SDK_INT >= 31) 30 else 28
|
// because TIDAL's notification builder skips addAction() on API 33+
|
||||||
super.attr(ns, name, resourceId, type, version)
|
// expecting the system to auto-infer buttons from the MediaSession —
|
||||||
} else {
|
// which only happens for apps targeting SDK >= 31.
|
||||||
super.attr(ns, name, resourceId, type, value)
|
"uses-sdk" -> nv
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
"permission" -> object : NodeVisitor(nv) {
|
"permission" -> object : NodeVisitor(nv) {
|
||||||
override fun attr(ns: String?, name: String, resourceId: Int, type: Int, value: Any?) {
|
override fun attr(ns: String?, name: String, resourceId: Int, type: Int, value: Any?) {
|
||||||
|
|||||||
Reference in New Issue
Block a user