From 625c3256b6bdfc1673dae0819a5464e45d81f2a8 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 --- CHANGELOG.md | 2 +- res/values/functions.xml | 1 + src/biz/bokhorst/xprivacy/Meta.java | 3 ++- src/biz/bokhorst/xprivacy/XTelephonyManager.java | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05051a40e..5f3a48472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ Changelog **Next release** -* ... +* Fixed *getDeviceId* (IMEI) restriction for Android 5.0.x ([issue](/../../issues/2200)) [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) 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: