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
4b61b99217
commit
64663983b8
@ -2,4 +2,4 @@ package app.revanced.patches.tiktok.misc.extension
|
||||
|
||||
import app.revanced.patches.shared.misc.extension.sharedExtensionPatch
|
||||
|
||||
val sharedExtensionPatch = sharedExtensionPatch("tiktok", initHook, jatoInitHook)
|
||||
val sharedExtensionPatch = sharedExtensionPatch("tiktok", initHook, jatoInitHook, storeRegionInitHook)
|
||||
|
@ -3,9 +3,7 @@ package app.revanced.patches.tiktok.misc.extension
|
||||
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val initHook = extensionHook(
|
||||
insertIndexResolver = { 0 }
|
||||
) {
|
||||
internal val initHook = extensionHook {
|
||||
custom { method, classDef ->
|
||||
classDef.type == "Lcom/ss/android/ugc/aweme/main/MainActivity;" &&
|
||||
method.name == "onCreate"
|
||||
@ -16,14 +14,24 @@ internal val initHook = extensionHook(
|
||||
* 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"
|
||||
* This class is called from startup code titled "BPEA RunnableGuardLancet".
|
||||
*/
|
||||
internal val jatoInitHook = extensionHook(
|
||||
insertIndexResolver = { 0 },
|
||||
contextRegisterResolver = { "p1" }
|
||||
) {
|
||||
parameters("Landroid/content/Context;")
|
||||
custom { method, classDef ->
|
||||
classDef.type == "Lcom/ss/android/ugc/aweme/legoImp/task/JatoInitTask;" &&
|
||||
method.name == "run"
|
||||
}
|
||||
}
|
||||
|
||||
internal val storeRegionInitHook = extensionHook(
|
||||
contextRegisterResolver = { "p1" }
|
||||
) {
|
||||
parameters("Landroid/content/Context;")
|
||||
custom { method, classDef ->
|
||||
classDef.type == "Lcom/ss/android/ugc/aweme/legoImp/task/StoreRegionInitTask;" &&
|
||||
method.name == "run"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user