From 2be29b07cbbd70640b77271731e776bf96ddefd1 Mon Sep 17 00:00:00 2001 From: Marcel Bokhorst Date: Sat, 22 Jun 2013 08:54:56 +0200 Subject: [PATCH] Attempt to fix #50 @vipere could you please try this (since I cannot reproduce this problem) --- src/biz/bokhorst/xprivacy/XRuntime.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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())); } }