diff --git a/.gitignore b/.gitignore index 028cf0971c..46e46c6bb6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ .externalNativeBuild *.apk *.jar +/.kotlin diff --git a/app/src/main/java/me/iacn/biliroaming/hook/MusicNotificationHook.kt b/app/src/main/java/me/iacn/biliroaming/hook/MusicNotificationHook.kt index ffb97114c6..c78a100427 100644 --- a/app/src/main/java/me/iacn/biliroaming/hook/MusicNotificationHook.kt +++ b/app/src/main/java/me/iacn/biliroaming/hook/MusicNotificationHook.kt @@ -1,5 +1,6 @@ package me.iacn.biliroaming.hook +import de.robv.android.xposed.XposedHelpers import me.iacn.biliroaming.utils.Log import me.iacn.biliroaming.utils.findClassOrNull import me.iacn.biliroaming.utils.hookBeforeMethod @@ -23,6 +24,17 @@ class MusicNotificationHook(classLoader: ClassLoader) : BaseHook(classLoader) { } } } + + // Play store + "com.bilibili.lib.blconfig.ConfigManager\$a".findClassOrNull(mClassLoader)?.run { + XposedHelpers.findMethodExactIfExists(this, "g", String::class.java)?.hookBeforeMethod { + (it.args[0] as String).run { + if (this == "ff_background_use_system_media_controls") { + it.result = true + } + } + } + } } }