diff --git a/CHANGELOG.md b/CHANGELOG.md index 97ebc58a7..4cd9655aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Changelog **Next release** * Fixed on demand restricting for some custom ROMs (OPPO) +* Fixed (telephony) restrictions for Android versions before Lollipop ([issue](/../../issues/2202)) [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/src/biz/bokhorst/xprivacy/XPrivacy.java b/src/biz/bokhorst/xprivacy/XPrivacy.java index f17ebf42b..aabc15d0e 100644 --- a/src/biz/bokhorst/xprivacy/XPrivacy.java +++ b/src/biz/bokhorst/xprivacy/XPrivacy.java @@ -115,7 +115,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { PrivacyService.register(mListHookError, loader, mSecret, param.thisObject); - hookSystem(param.thisObject, loader); + hookSystem(loader); } }); } catch (Throwable ex) { @@ -130,12 +130,13 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { PrivacyService.register(mListHookError, null, mSecret, param.thisObject); - hookSystem(param.thisObject, null); } }); } hookZygote(); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) + hookSystem(null); } catch (Throwable ex) { Util.bug(null, ex); @@ -291,7 +292,7 @@ private void hookZygote() throws Throwable { hookAll(XActivity.getInstances(), null, mSecret, false); } - private void hookSystem(Object am, ClassLoader classLoader) throws Throwable { + private void hookSystem(ClassLoader classLoader) throws Throwable { Log.w("XPrivacy", "Hooking system"); /*