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

Commit

Permalink
Attempt to fix finger print lockscreen
Browse files Browse the repository at this point in the history
Refs #1759
  • Loading branch information
M66B committed Jun 28, 2014
1 parent be69da0 commit a70a4c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Changelog
* Fixed all problems reported through the support info
* Thanks for sending all the support info!
* Fixed returning wrong restriction sometimes for repeated on demand restricting
* Attempt to fix finger print lockscreen ([issue](/../../issues/1759))
* Added allow/deny once for category ([issue](/../../issues/1764))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
Expand Down
22 changes: 12 additions & 10 deletions src/biz/bokhorst/xprivacy/XField.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,18 @@ public static List<XHook> getInstances() {

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

// Make accessible
Field field = (Field) param.thisObject;
String className = field.getDeclaringClass().getName();

// Make accessible: Xposed will invoke original method
param.setObjectExtra("accessible", (Boolean) field.isAccessible());
field.setAccessible(true);

// Check if Android
if (Binder.getCallingUid() == android.os.Process.SYSTEM_UID)
return;

// Check if class listed
String className = field.getDeclaringClass().getName();
if (!cClassName.contains(className))
return;

Expand All @@ -141,12 +142,13 @@ protected void before(XParam param) throws Throwable {

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

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

// Check if Android
if (Binder.getCallingUid() == android.os.Process.SYSTEM_UID)
return;
}
}

0 comments on commit a70a4c0

Please sign in to comment.