Skip to content

Commit

Permalink
fix: system settings - all dark mode, wrong international build
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed Jul 3, 2024
1 parent 7e0f1b1 commit 88fda14
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinde
import com.sevtinge.hyperceiler.module.base.*
import com.sevtinge.hyperceiler.utils.api.LazyClass.clazzMiuiBuild
import com.sevtinge.hyperceiler.utils.devicesdk.*
import de.robv.android.xposed.*

//from SetoHook by SetoSkins
// from SetoHook by SetoSkins
class AllDarkMode : BaseHook() {
override fun init() {
if (isInternational()) return
Expand All @@ -37,14 +38,13 @@ class AllDarkMode : BaseHook() {
clazzForceDarkAppListManager.methodFinder().filterByName("getDarkModeAppList").toList()
.createHooks {
before {
val originalValue = XposedHelpers.getStaticBooleanField(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD")
setStaticObject(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD", true)
it.setObjectExtra("originalValue", originalValue)
}
after {
setStaticObject(
clazzMiuiBuild,
"IS_INTERNATIONAL_BUILD",
isInternational()
)
val originalValue = it.getObjectExtra("originalValue")
setStaticObject(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD", originalValue)
}
}
clazzForceDarkAppListManager.methodFinder().filterByName("shouldShowInSettings").toList()
Expand Down

0 comments on commit 88fda14

Please sign in to comment.