您好,有个疑问,只要实现了IDatabaseHook,“executeSql”一定会被绕过
CuteRem opened this issue · 1 comments
CuteRem commented
Database中onExecuteHooker的"beforeHookedMethod"用“notifyForBypassFlags”,
只要实现了IDatabaseHook,其中的“onDatabaseExecuting”的默认值是false,
"notifyForBypassFlags"方法中“notifyForResults”得到的就是一个{false,……}的list,
any方法执行得到的值就会是true,
那么微信数据库的“executeSql”方法就一定会被绕过,无法执行原生方法
我的测试是微信【设置-聊天-清空聊天记录】的操作,一定会被拦截无法成功执行
CuteRem commented
我觉得如果要根据返回值来判断的话,“notifyForBypassFlags”的第一行是不是应该改为
val shouldBypass = notifyForResults(event, action).any{it}