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

Commit

Permalink
Fixed telephony registry hooks
Browse files Browse the repository at this point in the history
Refs #2195
  • Loading branch information
M66B committed May 23, 2015
1 parent 496c8b3 commit 8789b6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 8 additions & 4 deletions src/biz/bokhorst/xprivacy/XTelephonyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ public static List<XHook> 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));
Expand All @@ -180,10 +181,6 @@ public static List<XHook> 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));
Expand Down Expand Up @@ -241,6 +238,13 @@ public static List<XHook> getPhoneInstances() {
return listHook;
}

public static List<XHook> getRegistryInstances() {
List<XHook> listHook = new ArrayList<XHook>();
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) {
Expand Down

0 comments on commit 8789b6b

Please sign in to comment.