mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-04-29 22:24:27 +02:00
fix(TikTok): Resolve startup app crash
This commit is contained in:
parent
5811cb5a14
commit
d7000768a5
@ -2,4 +2,4 @@ package app.revanced.patches.tiktok.misc.extension
|
||||
|
||||
import app.revanced.patches.shared.misc.extension.sharedExtensionPatch
|
||||
|
||||
val sharedExtensionPatch = sharedExtensionPatch("tiktok", initHook)
|
||||
val sharedExtensionPatch = sharedExtensionPatch("tiktok", initHook, jatoInitHook)
|
||||
|
@ -12,3 +12,19 @@ internal val initHook = extensionHook(
|
||||
method.name == "<init>"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* In some cases the extension code can be called before
|
||||
* the app main activity onCreate is called.
|
||||
*
|
||||
* This class is called from startup code titled "BPEA RunnableGuardLancet"
|
||||
*/
|
||||
internal val jatoInitHook = extensionHook(
|
||||
insertIndexResolver = { 0 },
|
||||
contextRegisterResolver = { "p1" }
|
||||
) {
|
||||
custom { method, classDef ->
|
||||
classDef.type == "Lcom/ss/android/ugc/aweme/legoImp/task/JatoInitTask;" &&
|
||||
method.name == "run"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user