Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Fixed (telephony) restrictions for Android versions before Lollipop
Browse files Browse the repository at this point in the history
Closes #2202
  • Loading branch information
M66B committed May 25, 2015
1 parent 2d11daa commit 0fb1c77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 4 additions & 3 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down Expand Up @@ -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");

/*
Expand Down

0 comments on commit 0fb1c77

Please sign in to comment.