Add logging

This commit is contained in:
solohsu 2019-02-23 17:10:20 +08:00
parent e42a4e0979
commit 2686467bc9
3 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package com.elderdrivers.riru.xposed.config;
import com.elderdrivers.riru.xposed.util.Utils;
import java.util.Collections;
import java.util.Set;
@ -20,6 +22,7 @@ public class ConfigManager {
static {
IS_DYNAMIC_MODULES = isFileExists(DYNAMIC_MODULES);
Utils.logI("using dynamic modules mode: " + IS_DYNAMIC_MODULES);
}
public static boolean isDynamicModulesMode() {

View File

@ -57,6 +57,7 @@ public class MethodInfo {
public Class getClassForSure() {
try {
// TODO does initialize make sense?
return Class.forName(className, true, classLoader);
} catch (Throwable throwable) {
DexLog.e("error when getClassForSure", throwable);

View File

@ -23,6 +23,7 @@ public class MethodHookUtils {
Method method = (Method) target;
if (method.getDeclaringClass().equals(Application.class)
&& method.getName().equals("attach")) {
Utils.logW("replacing Application#attch to ContextWrapper#attachBaseContext, this is error-prone!");
return ContextWrapper.class.getDeclaredMethod("attachBaseContext", Context.class);
}
}