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

Commit

Permalink
Fixed compatibility with Boat Browser
Browse files Browse the repository at this point in the history
Fixes #1760
  • Loading branch information
M66B committed Jun 26, 2014
1 parent fa6d77a commit 91f9008
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Changelog

* Fixed all problems reported through the support info
* Thanks for sending all the support info!
* Fixed compatibility with [Boat Browser](https://play.google.com/store/apps/details?id=com.boatbrowser.free)
* Updated Slovak translation

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
Expand Down
14 changes: 12 additions & 2 deletions src/biz/bokhorst/xprivacy/XField.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ protected void before(XParam param) throws Throwable {
if (Binder.getCallingUid() == android.os.Process.SYSTEM_UID)
return;

// Check if class listed
// Make accessible
Field field = (Field) param.thisObject;
param.setObjectExtra("accessible", (Boolean) field.isAccessible());
field.setAccessible(true);

// Check if class listed
String className = field.getDeclaringClass().getName();
if (!cClassName.contains(className))
return;
Expand All @@ -131,6 +135,12 @@ protected void before(XParam param) throws Throwable {

@Override
protected void after(XParam param) throws Throwable {
// Do nothing
// Check if Android
if (Binder.getCallingUid() == android.os.Process.SYSTEM_UID)
return;

// Restore accessibility
Field field = (Field) param.thisObject;
field.setAccessible((Boolean) param.getObjectExtra("accessible"));
}
}

0 comments on commit 91f9008

Please sign in to comment.