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

Commit

Permalink
Fixed telephony manager restrictions
Browse files Browse the repository at this point in the history
Refs #2195
  • Loading branch information
M66B committed May 23, 2015
1 parent cc01161 commit 1a30b65
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,15 @@ private void hookSystem(Object am, ClassLoader classLoader) throws Throwable {
hookAll(XSmsManager.getInstances(true), classLoader, mSecret, false);

// Telephone service
hookAll(XTelephonyManager.getInstances(null, true), classLoader, mSecret, false);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
hookAll(XTelephonyManager.getInstances(null, true), classLoader, mSecret, false);

// Usage statistics manager
hookAll(XUsageStatsManager.getInstances(true), classLoader, mSecret, false);

// Wi-Fi service
hookAll(XWifiManager.getInstances(null, true), classLoader, mSecret, false);

/*
* Add pure system server hooks
*/
Expand Down Expand Up @@ -418,8 +420,11 @@ private void hookPackage(String packageName, ClassLoader classLoader) {
}

// Phone interface manager
if ("com.android.phone".equals(packageName))
if ("com.android.phone".equals(packageName)) {
hookAll(XTelephonyManager.getPhoneInstances(), classLoader, mSecret, false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
hookAll(XTelephonyManager.getInstances(null, true), classLoader, mSecret, false);
}

// Providers
hookAll(XContentResolver.getPackageInstances(packageName, classLoader), classLoader, mSecret, false);
Expand Down

0 comments on commit 1a30b65

Please sign in to comment.