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

Commit

Permalink
Fixed incompatibility with Xposed 2.6 beta 1
Browse files Browse the repository at this point in the history
Fixed #1659
  • Loading branch information
M66B committed May 14, 2014
1 parent ba3f88d commit d148f94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Changelog

**Next release**

* Fixed incompatibility with Xposed 2.6 beta 1 ([issue](/../../issues/1659))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

**Version 2.0.20 STABLE**
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ for unknown reasons ([issue](https://github.com/M66B/XPrivacy/issues/1607)).

XPrivacy seems to cause camera lag on a Samsung Galaxy Note II ([issue](https://github.com/M66B/XPrivacy/issues/715))

XPrivacy is reported to be incompatible with [WSM TOOLS](http://forum.xda-developers.com/showthread.php?t=2481178)
([issue](https://github.com/M66B/XPrivacy/issues/1655)).

Installation
------------

Expand Down
5 changes: 4 additions & 1 deletion src/biz/bokhorst/xprivacy/PrivacyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Date;
Expand Down Expand Up @@ -1695,7 +1696,9 @@ private Context getContext() {
Object am = cam.getMethod("self").invoke(null);
if (am == null)
return null;
return (Context) cam.getDeclaredField("mContext").get(am);
Field mContext = cam.getDeclaredField("mContext");
mContext.setAccessible(true);
return (Context) mContext.get(am);
} catch (Throwable ex) {
Util.bug(null, ex);
return null;
Expand Down
5 changes: 4 additions & 1 deletion src/biz/bokhorst/xprivacy/XActivityManagerService.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package biz.bokhorst.xprivacy;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Semaphore;
Expand Down Expand Up @@ -159,7 +160,9 @@ private int getUidANR(XParam param) throws IllegalAccessException {
try {
Class<?> pr = Class.forName("com.android.server.am.ProcessRecord");
if (param.args.length > 0 && param.args[0] != null && param.args[0].getClass().equals(pr)) {
uid = (Integer) pr.getDeclaredField("uid").get(param.args[0]);
Field fUid = pr.getDeclaredField("uid");
fUid.setAccessible(true);
uid = (Integer) fUid.get(param.args[0]);
}
} catch (ClassNotFoundException ignored) {
} catch (NoSuchFieldException ignored) {
Expand Down

0 comments on commit d148f94

Please sign in to comment.