Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
feat: update purge rule
Browse files Browse the repository at this point in the history
  • Loading branch information
mkx173 committed Aug 5, 2024
1 parent 171186e commit be255a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/gm/tieba/tabswitch/XposedInit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ class XposedInit : XposedContext(), IXposedHookZygoteInit, IXposedHookLoadPackag
override fun handleLoadPackage(lpparam: LoadPackageParam) {
if (("com.baidu.tieba" != lpparam.packageName && XposedHelpers.findClassIfExists(
"com.baidu.tieba.tblauncher.MainTabActivity", lpparam.classLoader
) == null) || !lpparam.isFirstApplication
) return
) == null)) return

sClassLoader = lpparam.classLoader
sAssetManager = XModuleResources.createInstance(sPath, null).assets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ class Purge : XposedContext(), IHooker, Obfuscated {
if (XposedHelpers.getObjectField(thread, "ala_info") != null) {
return@removeIf true
}
val gameExt = XposedHelpers.getObjectField(thread, "game_ext") as? String
if (gameExt?.length != 0) {
return@removeIf true
}
val worksInfo = XposedHelpers.getObjectField(thread, "works_info")
worksInfo != null && XposedHelpers.getObjectField(worksInfo, "is_works") as? Int == 1
}
Expand Down

0 comments on commit be255a6

Please sign in to comment.