Add logging
This commit is contained in:
parent
e42a4e0979
commit
2686467bc9
|
|
@ -1,5 +1,7 @@
|
||||||
package com.elderdrivers.riru.xposed.config;
|
package com.elderdrivers.riru.xposed.config;
|
||||||
|
|
||||||
|
import com.elderdrivers.riru.xposed.util.Utils;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
@ -20,6 +22,7 @@ public class ConfigManager {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
IS_DYNAMIC_MODULES = isFileExists(DYNAMIC_MODULES);
|
IS_DYNAMIC_MODULES = isFileExists(DYNAMIC_MODULES);
|
||||||
|
Utils.logI("using dynamic modules mode: " + IS_DYNAMIC_MODULES);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDynamicModulesMode() {
|
public static boolean isDynamicModulesMode() {
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public class MethodInfo {
|
||||||
|
|
||||||
public Class getClassForSure() {
|
public Class getClassForSure() {
|
||||||
try {
|
try {
|
||||||
|
// TODO does initialize make sense?
|
||||||
return Class.forName(className, true, classLoader);
|
return Class.forName(className, true, classLoader);
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
DexLog.e("error when getClassForSure", throwable);
|
DexLog.e("error when getClassForSure", throwable);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ public class MethodHookUtils {
|
||||||
Method method = (Method) target;
|
Method method = (Method) target;
|
||||||
if (method.getDeclaringClass().equals(Application.class)
|
if (method.getDeclaringClass().equals(Application.class)
|
||||||
&& method.getName().equals("attach")) {
|
&& method.getName().equals("attach")) {
|
||||||
|
Utils.logW("replacing Application#attch to ContextWrapper#attachBaseContext, this is error-prone!");
|
||||||
return ContextWrapper.class.getDeclaredMethod("attachBaseContext", Context.class);
|
return ContextWrapper.class.getDeclaredMethod("attachBaseContext", Context.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue