2
0
mirror of https://github.com/topjohnwu/Magisk synced 2025-08-31 12:15:15 +00:00

Update appcompat

This commit is contained in:
南宫雪珊
2023-02-10 12:13:40 +08:00
committed by GitHub
parent 7a9e6d2ad2
commit 9a4458ffac
2 changed files with 4 additions and 4 deletions

View File

@@ -18,8 +18,8 @@
# Stub
-keep class com.topjohnwu.magisk.core.App { <init>(java.lang.Object); }
-keepclassmembers class androidx.appcompat.app.AppCompatDelegateImpl {
boolean mActivityHandlesUiModeChecked;
boolean mActivityHandlesUiMode;
boolean mActivityHandlesConfigFlagsChecked;
int mActivityHandlesConfigFlags;
}
# main

View File

@@ -68,8 +68,8 @@ abstract class BaseActivity : AppCompatActivity() {
// Overwrite private members to avoid nasty "false" stack traces being logged
val delegate = delegate
val clz = delegate.javaClass
clz.reflectField("mActivityHandlesUiModeChecked").set(delegate, true)
clz.reflectField("mActivityHandlesUiMode").set(delegate, false)
clz.reflectField("mActivityHandlesConfigFlagsChecked").set(delegate, true)
clz.reflectField("mActivityHandlesConfigFlags").set(delegate, 0)
}
contentCallback = savedInstanceState?.getParcelable(CONTENT_CALLBACK_KEY)
super.onCreate(savedInstanceState)