dev: project update
[noFUDroid.git] / app / src / main / java / it / skarafaz / xposed / nwmonblocker / Mod.java
1 package it.skarafaz.xposed.nwmonblocker;
2
3 import de.robv.android.xposed.IXposedHookZygoteInit;
4 import de.robv.android.xposed.XC_MethodReplacement;
5 import de.robv.android.xposed.XposedHelpers;
6
7 public class Mod implements IXposedHookZygoteInit {
8     private static final String CLASS_DEVICE_POLICY_MANAGER = "android.app.admin.DevicePolicyManager";
9
10     @Override
11     public void initZygote(StartupParam startupParam) throws Throwable {
12         final Class<?> devicePolicyManager = XposedHelpers.findClass(CLASS_DEVICE_POLICY_MANAGER, null);
13
14         XposedHelpers.findAndHookMethod(devicePolicyManager, "hasAnyCaCertsInstalled", new XC_MethodReplacement() {
15             @Override
16             protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
17                 return false;
18             }
19         });
20     }
21 }