- XposedHelpers.findAndHookMethod(devicePolicyManager, "hasAnyCaCertsInstalled", new XC_MethodReplacement() {
- @Override
- protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
- return false;
- }
+ public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
+ if (!lpparam.packageName.equals("android"))
+ return;
+
+ final Class<?> userHandle = XposedHelpers.findClass("android.os.UserHandle", lpparam.classLoader);
+ final Class<?> notifyTask = XposedHelpers.findClass("com.android.server.devicepolicy.DevicePolicyManagerService$MonitoringCertNotificationTask", lpparam.classLoader);
+
+ XposedHelpers.findAndHookMethod(notifyTask, "manageNotification", userHandle,
+ new XC_MethodReplacement() {
+ @Override
+ protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
+ XposedBridge.log("Not showing FUD notification");
+ return null;
+ }