From 592cf84a5c1b622a2a8ae3433fa04af7a86953e7 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 23 Feb 2014 09:20:50 +0100 Subject: [PATCH] Fixed hooking base constructors Closes #1431 Refs #1420 --- CHANGELOG.md | 1 + src/biz/bokhorst/xprivacy/XPrivacy.java | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89c8b130e..2a340e36a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Changelog **Next release** +* Fixed hooking base constructors ([issue](/../../issues/1431)) * Restrict all *view* actions, show parameters and whitelisting ([issue](/../../issues/1419)) * You might see a few more messages *Restricted by XPrivacy* because of this * Improved usage data layout, option to copy parameters ([issue](/../../issues/1424)) diff --git a/src/biz/bokhorst/xprivacy/XPrivacy.java b/src/biz/bokhorst/xprivacy/XPrivacy.java index 264bac9aa..fa195eec8 100644 --- a/src/biz/bokhorst/xprivacy/XPrivacy.java +++ b/src/biz/bokhorst/xprivacy/XPrivacy.java @@ -375,6 +375,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { for (Constructor constructor : clazz.getDeclaredConstructors()) if (Modifier.isPublic(constructor.getModifiers()) ? hook.isVisible() : !hook.isVisible()) listMember.add(constructor); + break; } else { for (Method method : clazz.getDeclaredMethods()) if (method.getName().equals(hook.getMethodName())