diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8b4e5908..9bcb63faf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@ Changelog
* Added restriction *Srv_getCurrentSyncsAsUser* ([issue](/../../issues/1757))
* Added restrictions *Srv_addGpsMeasurementsListener* and *Srv_addGpsNavigationMessageListener* ([issue](/../../issues/1757))
* Added restrictions *getCarrierConfigValues* and *sendMultimediaMessage* ([issue](/../../issues/1757))
+* Added restrictions *Srv_getImei*, *Srv_getIsimIst* and *Srv_getIsimPcscf* ([issue](/../../issues/1757))
[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
diff --git a/res/values/functions.xml b/res/values/functions.xml
index b3b3243c1..ef819d19f 100644
--- a/res/values/functions.xml
+++ b/res/values/functions.xml
@@ -314,6 +314,9 @@
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 95d84a047..26c735cfb 100644
--- a/src/biz/bokhorst/xprivacy/Meta.java
+++ b/src/biz/bokhorst/xprivacy/Meta.java
@@ -368,6 +368,9 @@ public static List get() {
mListHook.add(new Hook("phone", "Srv_getVoiceMailAlphaTag", "READ_PHONE_STATE", 10, "2.99", "getVoiceMailAlphaTag").AOSP(19));
mListHook.add(new Hook("phone", "Srv_getVoiceMailNumber", "READ_PHONE_STATE", 10, "2.99", "getVoiceMailNumber").AOSP(19));
mListHook.add(new Hook("phone", "Srv_getCompleteVoiceMailNumber", "READ_PHONE_STATE", 10, "2.99", null).AOSP(19));
+ mListHook.add(new Hook("phone", "Srv_getImei", "READ_PHONE_STATE", 21, "3.5.6", null));
+ mListHook.add(new Hook("phone", "Srv_getIsimIst", "READ_PRIVILEGED_PHONE_STATE", 21, "3.5.6", null));
+ mListHook.add(new Hook("phone", "Srv_getIsimPcscf", "READ_PRIVILEGED_PHONE_STATE", 21, "3.5.6", null));
mListHook.add(new Hook("phone", "listen", "READ_PHONE_STATE", 10, null, null).notAOSP(19));
mListHook.add(new Hook("phone", "Srv_listen", "READ_PHONE_STATE", 10, null, null).AOSP(19));
diff --git a/src/biz/bokhorst/xprivacy/XTelephonyManager.java b/src/biz/bokhorst/xprivacy/XTelephonyManager.java
index 20bc59b96..5633cf57c 100644
--- a/src/biz/bokhorst/xprivacy/XTelephonyManager.java
+++ b/src/biz/bokhorst/xprivacy/XTelephonyManager.java
@@ -79,31 +79,33 @@ public String getClassName() {
// frameworks/base/telephony/java/android/telephony/TelephonyManager.java
// http://developer.android.com/reference/android/telephony/TelephonyManager.html
- // public java.lang.String getDeviceId()
- // public java.lang.String getDeviceSvn()
- // public java.lang.String getSubscriberId()
- // public java.lang.String getGroupIdLevel1()
- // public java.lang.String getIccSerialNumber()
- // public java.lang.String getLine1Number()
- // public java.lang.String getLine1AlphaTag()
- // public java.lang.String getMsisdn()
- // public java.lang.String getVoiceMailNumber()
- // public java.lang.String getCompleteVoiceMailNumber()
- // public java.lang.String getVoiceMailAlphaTag()
- // public java.lang.String getIsimImpi()
- // public java.lang.String getIsimDomain()
- // public java.lang.String[] getIsimImpu()
- // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.4_r1/com/android/internal/telephony/PhoneSubInfo.java
+ // public String getDeviceId()
+ // public String getSubscriberId()
+ // public String getGroupIdLevel1()
+ // public String getIccSerialNumber()
+ // public String getImei()
+ // public String getLine1Number()
+ // public String getLine1AlphaTag()
+ // public String getMsisdn()
+ // public String getVoiceMailNumber()
+ // public String getVoiceMailAlphaTag()
+ // public String getCompleteVoiceMailNumber()
+ // public String getIsimImpi()
+ // public String getIsimDomain()
+ // public String[] getIsimImpu()
+ // public String getIsimIst()
+ // public String[] getIsimPcscf()
+ // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/com/android/internal/telephony/PhoneSubInfo.java
// public void listen(java.lang.String pkg, IPhoneStateListener callback, int events, boolean notifyNow)
- // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.4_r1/com/android/server/TelephonyRegistry.java
+ // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/com/android/server/TelephonyRegistry.java
// public void enableLocationUpdates()
// public void disableLocationUpdates()
// public java.util.List getAllCellInfo()
// public android.os.Bundle getCellLocation()
// public java.util.List getNeighboringCellInfo()
- // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.4.4_r1/com/android/phone/PhoneInterfaceManager.java#PhoneInterfaceManager
+ // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/5.0.0_r1/com/android/phone/PhoneInterfaceManager.java
// @formatter:on
@@ -128,6 +130,7 @@ private enum Methods {
Srv_getMsisdn,
Srv_getSubscriberId,
Srv_getCompleteVoiceMailNumber, Srv_getVoiceMailNumber, Srv_getVoiceMailAlphaTag,
+ Srv_getImei, Srv_getIsimIst, Srv_getIsimPcscf,
Srv_listen,
@@ -190,6 +193,10 @@ public static List getInstances(String className) {
listHook.add(new XTelephonyManager(Methods.Srv_getVoiceMailAlphaTag, PrivacyManager.cPhone, Srv.SubInfo));
listHook.add(new XTelephonyManager(Methods.Srv_getVoiceMailNumber, PrivacyManager.cPhone, Srv.SubInfo));
+ 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));
+
listHook.add(new XTelephonyManager(Methods.Srv_listen, PrivacyManager.cLocation, Srv.Registry));
listHook.add(new XTelephonyManager(Methods.Srv_listen, PrivacyManager.cPhone, Srv.Registry));
}
@@ -308,6 +315,9 @@ protected void before(XParam param) throws Throwable {
case Srv_getCompleteVoiceMailNumber:
case Srv_getVoiceMailNumber:
case Srv_getVoiceMailAlphaTag:
+ case Srv_getImei:
+ case Srv_getIsimIst:
+ case Srv_getIsimPcscf:
break;
}
}
@@ -388,6 +398,7 @@ protected void after(XParam param) throws Throwable {
case Srv_getIsimImpi:
case Srv_getIsimImpu:
case Srv_getSubscriberId:
+ case Srv_getImei:
if (param.getResult() != null)
if (isRestricted(param))
param.setResult(PrivacyManager.getDefacedProp(uid, mMethod.name().replace("Srv_", "")));
@@ -404,6 +415,13 @@ protected void after(XParam param) throws Throwable {
if (isRestrictedValue(param, srvPhoneNumber))
param.setResult(PrivacyManager.getDefacedProp(uid, mMethod.name().replace("Srv_", "")));
break;
+
+ case Srv_getIsimIst:
+ case Srv_getIsimPcscf:
+ if (param.getResult() != null)
+ if (isRestricted(param))
+ param.setResult(null);
+ break;
}
}