Skip to content

Commit

Permalink
fix: crash on android 14
Browse files Browse the repository at this point in the history
  • Loading branch information
duzhaokun123 committed Jan 12, 2024
1 parent df32faa commit 9838dc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class HookSystem : IXposedHookZygoteInit, IXposedHookLoadPackage {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
if (lpparam.packageName != "android") return
log(TAG, "xposed init")
log(TAG, "buildtype: ${BuildConfig.BUILD_TYPE}")
log(TAG, "buildtype: ${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE}) ${BuildConfig.BUILD_TYPE}")
EzXHelperInit.initHandleLoadPackage(lpparam)
Initiator.init(lpparam.classLoader)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ class AppWindow(val context: Context, private val densityDpi: Int, private val f
}
}
watchRotation()
context.registerReceiver(broadcastReceiver, IntentFilter(ACTION_RESET_ALL_WINDOW))
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(broadcastReceiver, IntentFilter(ACTION_RESET_ALL_WINDOW), Context.RECEIVER_EXPORTED)
} else {
context.registerReceiver(broadcastReceiver, IntentFilter(ACTION_RESET_ALL_WINDOW))
}
val width = YAMFManager.config.defaultWindowWidth.dpToPx().toInt()
val height = YAMFManager.config.defaultWindowHeight.dpToPx().toInt()
surfaceView.updateLayoutParams {
Expand Down

0 comments on commit 9838dc9

Please sign in to comment.