From b488eee4571dab12da67b54651f59d4cd264e93e Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 1 Jul 2015 10:06:36 +0200 Subject: [PATCH] Fixed IPC restrictions for Lollipop --- src/biz/bokhorst/xprivacy/XBinder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/biz/bokhorst/xprivacy/XBinder.java b/src/biz/bokhorst/xprivacy/XBinder.java index b9adb3278..62b7999c5 100644 --- a/src/biz/bokhorst/xprivacy/XBinder.java +++ b/src/biz/bokhorst/xprivacy/XBinder.java @@ -10,6 +10,7 @@ import android.content.Context; import android.os.Binder; +import android.os.Build; import android.os.IBinder; import android.os.Parcel; import android.os.Process; @@ -308,7 +309,8 @@ private void checkIPC(XParam param) throws Throwable { try { // static protected final Parcel obtain(int obj) // frameworks/base/core/java/android/os/Parcel.java - Method methodObtain = Parcel.class.getDeclaredMethod("obtain", int.class); + Method methodObtain = Parcel.class.getDeclaredMethod("obtain", + Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? int.class : long.class); methodObtain.setAccessible(true); reply = (Parcel) methodObtain.invoke(null, param.args[2]); } catch (NoSuchMethodException ex) {