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

Commit

Permalink
Fixed IMEI restriction on Android 5.0.x
Browse files Browse the repository at this point in the history
Closes #2200
  • Loading branch information
M66B committed May 24, 2015
1 parent 4596beb commit da39240
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions res/values/functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@
<string name="phone_Srv_getCompleteVoiceMailNumberForSubscriber5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getVoiceMailNumber()">Google documentation</a>]]></string>
<string name="phone_Srv_getDeviceId5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId()">Google documentation</a>]]></string>
<string name="phone_Srv_getDeviceIdForPhone5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId()">Google documentation</a>]]></string>
<string name="phone_Srv_getDeviceIdForSubscriber5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId()">Google documentation</a>]]></string>
<string name="phone_Srv_getGroupIdLevel1ForSubscriber5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getGroupIdLevel1()">Google documentation</a>]]></string>
<string name="phone_Srv_getIccSerialNumberForSubscriber5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getSimSerialNumber()">Google documentation</a>]]></string>
<string name="phone_Srv_getImeiForSubscriber5" translatable="false"><![CDATA[<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId()">Google documentation</a>]]></string>
Expand Down
3 changes: 2 additions & 1 deletion src/biz/bokhorst/xprivacy/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ public static List<Hook> 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));
Expand Down
5 changes: 5 additions & 0 deletions src/biz/bokhorst/xprivacy/XTelephonyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ private enum Methods {
Srv_getCompleteVoiceMailNumberForSubscriber5,
Srv_getDeviceId5,
Srv_getDeviceIdForPhone5,
Srv_getDeviceIdForSubscriber5,
Srv_getGroupIdLevel1ForSubscriber5,
Srv_getIccSerialNumberForSubscriber5,
Srv_getImeiForSubscriber5,
Expand Down Expand Up @@ -207,6 +208,8 @@ public static List<XHook> 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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit da39240

Please sign in to comment.