diff --git a/src/biz/bokhorst/xprivacy/XRuntime.java b/src/biz/bokhorst/xprivacy/XRuntime.java index 05280637a..aafb49fdd 100644 --- a/src/biz/bokhorst/xprivacy/XRuntime.java +++ b/src/biz/bokhorst/xprivacy/XRuntime.java @@ -44,13 +44,13 @@ protected void before(MethodHookParam param) throws Throwable { if (isRestricted(param, mCommand == null ? getMethodName() : mCommand)) param.setThrowable(new IOException(XRestriction.getDefacedString())); } - } else if (param.getResult() != null) - if (isRestricted(param)) - param.setResult(null); + } } @Override protected void after(MethodHookParam param) throws Throwable { - // Do nothing + if (!param.method.getName().equals("exec")) + if (isRestricted(param)) + param.setResult(new UnsatisfiedLinkError(XRestriction.getDefacedString())); } }