[2.13.0]修正leakcanary在monkey测试中出现的崩溃

This commit is contained in:
renwj
2022-12-05 10:47:54 +08:00
parent 03ef756253
commit c57d307f87

View File

@@ -48,4 +48,15 @@ class LeakCanaryCrashFix {
t.printStackTrace()
}
}
@Insert
@TargetClass("leakcanary.internal.activity.db.Io\$execute\$2")
@TargetMethod(methodName = "run")
fun proxyRun() {
try {
Origin.callVoid()
} catch (t: Throwable) {
t.printStackTrace()
}
}
}