Skip to content

Commit

Permalink
Fix get wechat Application in BUGHook
Browse files Browse the repository at this point in the history
  • Loading branch information
keta1 committed May 7, 2021
1 parent 1a02d36 commit d1edf37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/me/kyuubiran/qqcleaner/WeChatHookLoader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package me.kyuubiran.qqcleaner

import android.annotation.SuppressLint
import android.app.Application
import android.content.Context
import com.github.kyuubiran.ezxhelper.init.EzXHelperInit
import com.github.kyuubiran.ezxhelper.utils.Log
import de.robv.android.xposed.callbacks.XC_LoadPackage
Expand Down Expand Up @@ -34,7 +33,7 @@ class WeChatHookLoader(lpparam: XC_LoadPackage.LoadPackageParam) {
private fun doInit(rtLoader: ClassLoader) {
if (firstInit) return
try {
Application::class.java.getDeclaredMethod("attach", Context::class.java)
Application::class.java.getDeclaredMethod("onCreate")
.hookAfter {
if (secondInitWeChat) return@hookAfter
val ctx = it.thisObject as Application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.github.kyuubiran.ezxhelper.init.InitFields.appContext
import com.github.kyuubiran.ezxhelper.utils.*
import de.robv.android.xposed.XC_MethodHook
import de.robv.android.xposed.XposedBridge
import me.kyuubiran.qqcleaner.R
import me.kyuubiran.qqcleaner.activity.SettingsActivity
import me.kyuubiran.qqcleaner.data.hostApp
import me.kyuubiran.qqcleaner.data.hostInfo
Expand Down

0 comments on commit d1edf37

Please sign in to comment.