From 8789b6bab06a3ae645917190c5ee6e6b0a3379f0 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 May 2015 13:45:36 +0200 Subject: [PATCH] Fixed telephony registry hooks Refs #2195 --- src/biz/bokhorst/xprivacy/XPrivacy.java | 1 + src/biz/bokhorst/xprivacy/XTelephonyManager.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/biz/bokhorst/xprivacy/XPrivacy.java b/src/biz/bokhorst/xprivacy/XPrivacy.java index fa82cc43b..bdd950ac2 100644 --- a/src/biz/bokhorst/xprivacy/XPrivacy.java +++ b/src/biz/bokhorst/xprivacy/XPrivacy.java @@ -323,6 +323,7 @@ private void hookSystem(Object am, ClassLoader classLoader) throws Throwable { // Telephone service if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) hookAll(XTelephonyManager.getInstances(null, true), classLoader, mSecret, false); + hookAll(XTelephonyManager.getRegistryInstances(), classLoader, mSecret, false); // Usage statistics manager hookAll(XUsageStatsManager.getInstances(true), classLoader, mSecret, false); diff --git a/src/biz/bokhorst/xprivacy/XTelephonyManager.java b/src/biz/bokhorst/xprivacy/XTelephonyManager.java index 1bd4b5954..fba41d138 100644 --- a/src/biz/bokhorst/xprivacy/XTelephonyManager.java +++ b/src/biz/bokhorst/xprivacy/XTelephonyManager.java @@ -163,6 +163,7 @@ public static List getInstances(String className, boolean server) { listHook.add(new XTelephonyManager(Methods.Srv_getDeviceId, PrivacyManager.cPhone, Srv.SubInfo)); else listHook.add(new XTelephonyManager(Methods.Srv_getDeviceId, PrivacyManager.cPhone, Srv.Phone)); + listHook.add(new XTelephonyManager(Methods.Srv_getGroupIdLevel1, PrivacyManager.cPhone, Srv.SubInfo)); listHook.add(new XTelephonyManager(Methods.Srv_getIccSerialNumber, PrivacyManager.cPhone, Srv.SubInfo)); listHook.add(new XTelephonyManager(Methods.Srv_getIsimDomain, PrivacyManager.cPhone, Srv.SubInfo)); @@ -180,10 +181,6 @@ public static List getInstances(String className, boolean server) { listHook.add(new XTelephonyManager(Methods.Srv_getImei, PrivacyManager.cPhone, Srv.SubInfo)); listHook.add(new XTelephonyManager(Methods.Srv_getIsimIst, PrivacyManager.cPhone, Srv.SubInfo)); listHook.add(new XTelephonyManager(Methods.Srv_getIsimPcscf, PrivacyManager.cPhone, Srv.SubInfo)); - - // Registry - listHook.add(new XTelephonyManager(Methods.Srv_listen, PrivacyManager.cLocation, Srv.Registry)); - listHook.add(new XTelephonyManager(Methods.Srv_listen, PrivacyManager.cPhone, Srv.Registry)); } else { listHook.add(new XTelephonyManager(Methods.disableLocationUpdates, null, className)); listHook.add(new XTelephonyManager(Methods.enableLocationUpdates, PrivacyManager.cLocation, className)); @@ -241,6 +238,13 @@ public static List getPhoneInstances() { return listHook; } + public static List getRegistryInstances() { + List listHook = new ArrayList(); + listHook.add(new XTelephonyManager(Methods.Srv_listen, PrivacyManager.cLocation, Srv.Registry)); + listHook.add(new XTelephonyManager(Methods.Srv_listen, PrivacyManager.cPhone, Srv.Registry)); + return listHook; + } + @Override protected void before(XParam param) throws Throwable { switch (mMethod) {