diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb9dc6889..c8b4e5908 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ Changelog
* Added restrictions *InetAddress.getAllByNameOnNet* and *InetAddress.getByNameOnNet* ([issue](/../../issues/1757))
* 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))
[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
diff --git a/res/values/functions.xml b/res/values/functions.xml
index 00998c382..b3b3243c1 100644
--- a/res/values/functions.xml
+++ b/res/values/functions.xml
@@ -33,6 +33,7 @@
Google documentation]]>
+ Google documentation]]>
Google documentation]]>
Google documentation]]>
Google documentation]]>
@@ -213,6 +214,7 @@
+ Google documentation]]>
diff --git a/src/biz/bokhorst/xprivacy/Meta.java b/src/biz/bokhorst/xprivacy/Meta.java
index b563ff66d..95d84a047 100644
--- a/src/biz/bokhorst/xprivacy/Meta.java
+++ b/src/biz/bokhorst/xprivacy/Meta.java
@@ -81,6 +81,7 @@ public static List get() {
mListHook.add(new Hook("calendar", "CalendarProvider2", "READ_CALENDAR,WRITE_CALENDAR", 1, null, null));
mListHook.add(new Hook("calling", "sendDataMessage", "SEND_SMS", 4, null, null).notAOSP(19).whitelist(cTypeAddress).doNotify());
+ mListHook.add(new Hook("calling", "sendMultimediaMessage", "SEND_SMS", 21, "3.5.6", null).doNotify());
mListHook.add(new Hook("calling", "sendMultipartTextMessage", "SEND_SMS", 4, null, null).notAOSP(19).whitelist(cTypeAddress).doNotify());
mListHook.add(new Hook("calling", "sendTextMessage", "SEND_SMS", 4, null, null).notAOSP(19).whitelist(cTypeAddress).doNotify());
@@ -282,6 +283,7 @@ public static List get() {
mListHook.add(new Hook("media", "Camera2.setRepeatingBurst", "CAMERA", 20, null, null).unsafe().doNotify());
mListHook.add(new Hook("messages", "getAllMessagesFromIcc", "RECEIVE_SMS", 10, null, null).notAOSP(19));
+ mListHook.add(new Hook("messages", "getCarrierConfigValues", "", 21, "3.5.6", null));
mListHook.add(new Hook("messages", "Srv_getAllMessagesFromIccEf", "RECEIVE_SMS", 19, "2.99", "getAllMessagesFromIcc").AOSP(19));
mListHook.add(new Hook("messages", "SmsProvider", "READ_SMS,WRITE_SMS", 1, null, null));
diff --git a/src/biz/bokhorst/xprivacy/XSmsManager.java b/src/biz/bokhorst/xprivacy/XSmsManager.java
index cffc3a44f..593a79935 100644
--- a/src/biz/bokhorst/xprivacy/XSmsManager.java
+++ b/src/biz/bokhorst/xprivacy/XSmsManager.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import android.os.Bundle;
import android.telephony.SmsMessage;
public class XSmsManager extends XHook {
@@ -23,8 +24,10 @@ public String getClassName() {
// @formatter:off
// public static ArrayList getAllMessagesFromIcc()
+ // public Bundle getCarrierConfigValues()
// public void sendDataMessage(String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
// public void sendMultipartTextMessage(String destinationAddress, String scAddress, ArrayList parts, ArrayList sentIntents, ArrayList deliveryIntents)
+ // public void sendMultimediaMessage(Context context, Uri contentUri, String locationUrl, Bundle configOverrides, PendingIntent sentIntent)
// public void sendTextMessage(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)
// frameworks/base/telephony/java/android/telephony/SmsManager.java
// http://developer.android.com/reference/android/telephony/SmsManager.html
@@ -39,7 +42,7 @@ public String getClassName() {
// @formatter:off
private enum Methods {
- getAllMessagesFromIcc, sendDataMessage, sendMultipartTextMessage, sendTextMessage,
+ getAllMessagesFromIcc, getCarrierConfigValues, sendDataMessage, sendMultipartTextMessage, sendMultimediaMessage, sendTextMessage,
Srv_getAllMessagesFromIccEf, Srv_sendData, Srv_sendMultipartText, Srv_sendText
};
// @formatter:on
@@ -47,7 +50,9 @@ private enum Methods {
public static List getInstances() {
List listHook = new ArrayList();
listHook.add(new XSmsManager(Methods.getAllMessagesFromIcc, PrivacyManager.cMessages));
+ listHook.add(new XSmsManager(Methods.getCarrierConfigValues, PrivacyManager.cMessages));
listHook.add(new XSmsManager(Methods.sendDataMessage, PrivacyManager.cCalling));
+ listHook.add(new XSmsManager(Methods.sendMultimediaMessage, PrivacyManager.cCalling));
listHook.add(new XSmsManager(Methods.sendMultipartTextMessage, PrivacyManager.cCalling));
listHook.add(new XSmsManager(Methods.sendTextMessage, PrivacyManager.cCalling));
@@ -62,6 +67,7 @@ public static List getInstances() {
protected void before(XParam param) throws Throwable {
switch (mMethod) {
case getAllMessagesFromIcc:
+ case getCarrierConfigValues:
// Do nothing
break;
@@ -73,6 +79,11 @@ protected void before(XParam param) throws Throwable {
param.setResult(null);
break;
+ case sendMultimediaMessage:
+ if (isRestricted(param))
+ param.setResult(null);
+ break;
+
case Srv_getAllMessagesFromIccEf:
// Do nothing
break;
@@ -96,7 +107,13 @@ protected void after(XParam param) throws Throwable {
param.setResult(new ArrayList());
break;
+ case getCarrierConfigValues:
+ if (param.getResult() != null && isRestricted(param))
+ param.setResult(new Bundle());
+ break;
+
case sendDataMessage:
+ case sendMultimediaMessage:
case sendMultipartTextMessage:
case sendTextMessage:
// Do nothing