From da39240fb02dfd453c0b1843be6e28f8ab5ee9da Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 24 May 2015 11:49:48 +0200 Subject: [PATCH] Fixed IMEI restriction on Android 5.0.x Closes #2200 --- res/values/functions.xml | 1 + src/biz/bokhorst/xprivacy/Meta.java | 3 ++- src/biz/bokhorst/xprivacy/XTelephonyManager.java | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/res/values/functions.xml b/res/values/functions.xml index 90942ce92..c06401fea 100644 --- a/res/values/functions.xml +++ b/res/values/functions.xml @@ -330,6 +330,7 @@ Google documentation]]> Google documentation]]> Google documentation]]> + Google documentation]]> Google documentation]]> Google documentation]]> Google documentation]]> diff --git a/src/biz/bokhorst/xprivacy/Meta.java b/src/biz/bokhorst/xprivacy/Meta.java index b83cd9399..a5cdea3d8 100644 --- a/src/biz/bokhorst/xprivacy/Meta.java +++ b/src/biz/bokhorst/xprivacy/Meta.java @@ -387,7 +387,8 @@ public static List get() { mListHook.add(new Hook("phone", "Srv_getCompleteVoiceMailNumberForSubscriber5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getCompleteVoiceMailNumber").AOSP(Build.VERSION_CODES.LOLLIPOP)); mListHook.add(new Hook("phone", "Srv_getDeviceId5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getDeviceId").AOSP(Build.VERSION_CODES.LOLLIPOP)); - mListHook.add(new Hook("phone", "Srv_getDeviceIdForPhone5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getDeviceId").AOSP(Build.VERSION_CODES.LOLLIPOP)); + mListHook.add(new Hook("phone", "Srv_getDeviceIdForPhone5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getDeviceId").AOSP(Build.VERSION_CODES.LOLLIPOP_MR1)); + mListHook.add(new Hook("phone", "Srv_getDeviceIdForSubscriber5", "READ_PHONE_STATE", 21, "3.6.13", "Srv_getDeviceId").AOSP(Build.VERSION_CODES.LOLLIPOP).to(Build.VERSION_CODES.LOLLIPOP)); mListHook.add(new Hook("phone", "Srv_getGroupIdLevel1ForSubscriber5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getGroupIdLevel1").AOSP(Build.VERSION_CODES.LOLLIPOP)); mListHook.add(new Hook("phone", "Srv_getIccSerialNumberForSubscriber5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getIccSerialNumber").AOSP(Build.VERSION_CODES.LOLLIPOP)); mListHook.add(new Hook("phone", "Srv_getImeiForSubscriber5", "READ_PHONE_STATE", 21, "3.6.12", "Srv_getImei").AOSP(Build.VERSION_CODES.LOLLIPOP)); diff --git a/src/biz/bokhorst/xprivacy/XTelephonyManager.java b/src/biz/bokhorst/xprivacy/XTelephonyManager.java index 21831de47..8fc6ad742 100644 --- a/src/biz/bokhorst/xprivacy/XTelephonyManager.java +++ b/src/biz/bokhorst/xprivacy/XTelephonyManager.java @@ -156,6 +156,7 @@ private enum Methods { Srv_getCompleteVoiceMailNumberForSubscriber5, Srv_getDeviceId5, Srv_getDeviceIdForPhone5, + Srv_getDeviceIdForSubscriber5, Srv_getGroupIdLevel1ForSubscriber5, Srv_getIccSerialNumberForSubscriber5, Srv_getImeiForSubscriber5, @@ -207,6 +208,8 @@ public static List getInstances(String className, boolean server) { } else { listHook.add(new XTelephonyManager(Methods.Srv_getDeviceIdForPhone5, PrivacyManager.cPhone, Srv.SICtl)); + listHook.add(new XTelephonyManager(Methods.Srv_getDeviceIdForSubscriber5, PrivacyManager.cPhone, + Srv.SICtl)); listHook.add(new XTelephonyManager(Methods.Srv_getGroupIdLevel1ForSubscriber5, PrivacyManager.cPhone, Srv.SICtl)); listHook.add(new XTelephonyManager(Methods.Srv_getIccSerialNumberForSubscriber5, @@ -420,6 +423,7 @@ protected void before(XParam param) throws Throwable { case Srv_getCompleteVoiceMailNumberForSubscriber5: case Srv_getDeviceId5: case Srv_getDeviceIdForPhone5: + case Srv_getDeviceIdForSubscriber5: case Srv_getGroupIdLevel1ForSubscriber5: case Srv_getIccSerialNumberForSubscriber5: case Srv_getImeiForSubscriber5: @@ -521,6 +525,7 @@ protected void after(XParam param) throws Throwable { case Srv_getImei: case Srv_getDeviceId5: case Srv_getDeviceIdForPhone5: + case Srv_getDeviceIdForSubscriber5: case Srv_getGroupIdLevel1ForSubscriber5: case Srv_getIccSerialNumberForSubscriber5: case Srv_getImeiForSubscriber5: