Bug 17243357: Remove MessagingConfigurationManager
It is replaced with SmsManager.getCarrierConfigValues
Change-Id: I560a53427b08746f2a7ed2e540ecb2c978b7ebd0
diff --git a/api/current.txt b/api/current.txt
index 5e14236..a129bce 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -28700,44 +28700,6 @@
field public static int STATUS_UNKNOWN_ERROR;
}
- public class MessagingConfigurationManager {
- method public boolean getCarrierConfigBoolean(java.lang.String, boolean);
- method public boolean getCarrierConfigBoolean(long, java.lang.String, boolean);
- method public int getCarrierConfigInt(java.lang.String, int);
- method public int getCarrierConfigInt(long, java.lang.String, int);
- method public java.lang.String getCarrierConfigString(java.lang.String, java.lang.String);
- method public java.lang.String getCarrierConfigString(long, java.lang.String, java.lang.String);
- method public static android.telephony.MessagingConfigurationManager getDefault();
- field public static final java.lang.String CONF_ALIAS_ENABLED = "aliasEnabled";
- field public static final java.lang.String CONF_ALIAS_MAX_CHARS = "aliasMaxChars";
- field public static final java.lang.String CONF_ALIAS_MIN_CHARS = "aliasMinChars";
- field public static final java.lang.String CONF_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
- field public static final java.lang.String CONF_APPEND_TRANSACTION_ID = "enabledTransID";
- field public static final java.lang.String CONF_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
- field public static final java.lang.String CONF_HTTP_PARAMS = "httpParams";
- field public static final java.lang.String CONF_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
- field public static final java.lang.String CONF_MAX_IMAGE_HEIGHT = "maxImageHeight";
- field public static final java.lang.String CONF_MAX_IMAGE_WIDTH = "maxImageWidth";
- field public static final java.lang.String CONF_MAX_MESSAGE_SIZE = "maxMessageSize";
- field public static final java.lang.String CONF_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize";
- field public static final java.lang.String CONF_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports";
- field public static final java.lang.String CONF_MMS_ENABLED = "enabledMMS";
- field public static final java.lang.String CONF_MMS_READ_REPORT_ENABLED = "enableMMSReadReports";
- field public static final java.lang.String CONF_MULTIPART_SMS_ENABLED = "enableMultipartSMS";
- field public static final java.lang.String CONF_NAI_SUFFIX = "naiSuffix";
- field public static final java.lang.String CONF_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC";
- field public static final java.lang.String CONF_RECIPIENT_LIMIT = "recipientLimit";
- field public static final java.lang.String CONF_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages";
- field public static final java.lang.String CONF_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports";
- field public static final java.lang.String CONF_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold";
- field public static final java.lang.String CONF_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
- field public static final java.lang.String CONF_SUBJECT_MAX_LENGTH = "maxSubjectLength";
- field public static final java.lang.String CONF_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition";
- field public static final java.lang.String CONF_UA_PROF_TAG_NAME = "uaProfTagName";
- field public static final java.lang.String CONF_UA_PROF_URL = "uaProfUrl";
- field public static final java.lang.String CONF_USER_AGENT = "userAgent";
- }
-
public class NeighboringCellInfo implements android.os.Parcelable {
ctor public deprecated NeighboringCellInfo();
ctor public deprecated NeighboringCellInfo(int, int);
@@ -28887,28 +28849,54 @@
method public boolean deleteStoredMessage(android.net.Uri);
method public java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
method public void downloadMultimediaMessage(java.lang.String, android.content.ContentValues, android.app.PendingIntent);
- method public void downloadMultimediaMessage(long, java.lang.String, android.content.ContentValues, android.app.PendingIntent);
method public boolean getAutoPersisting();
+ method public android.os.Bundle getCarrierConfigValues();
method public static android.telephony.SmsManager getDefault();
+ method public static android.telephony.SmsManager getSmsManagerForSubId(long);
+ method public long getSubId();
method public android.net.Uri importMultimediaMessage(byte[], java.lang.String, long, boolean, boolean);
method public android.net.Uri importTextMessage(java.lang.String, int, java.lang.String, long, boolean, boolean);
method public void injectSmsPdu(byte[], java.lang.String, android.app.PendingIntent);
method public void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
method public void sendMultimediaMessage(byte[], java.lang.String, android.content.ContentValues, android.app.PendingIntent);
- method public void sendMultimediaMessage(long, byte[], java.lang.String, android.content.ContentValues, android.app.PendingIntent);
method public void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
method public void sendStoredMultimediaMessage(android.net.Uri, android.content.ContentValues, android.app.PendingIntent);
- method public void sendStoredMultimediaMessage(long, android.net.Uri, android.content.ContentValues, android.app.PendingIntent);
method public void sendStoredMultipartTextMessage(android.net.Uri, java.lang.String, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
- method public void sendStoredMultipartTextMessage(long, android.net.Uri, java.lang.String, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
method public void sendStoredTextMessage(android.net.Uri, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
- method public void sendStoredTextMessage(long, android.net.Uri, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
method public void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
method public void setAutoPersisting(boolean);
method public void updateMmsDownloadStatus(int, byte[]);
method public void updateMmsSendStatus(int, boolean);
method public void updateSmsSendStatus(int, boolean);
method public boolean updateStoredMessageStatus(android.net.Uri, android.content.ContentValues);
+ field public static final java.lang.String MMS_CONFIG_ALIAS_ENABLED = "aliasEnabled";
+ field public static final java.lang.String MMS_CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
+ field public static final java.lang.String MMS_CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
+ field public static final java.lang.String MMS_CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
+ field public static final java.lang.String MMS_CONFIG_APPEND_TRANSACTION_ID = "enabledTransID";
+ field public static final java.lang.String MMS_CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
+ field public static final java.lang.String MMS_CONFIG_HTTP_PARAMS = "httpParams";
+ field public static final java.lang.String MMS_CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
+ field public static final java.lang.String MMS_CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
+ field public static final java.lang.String MMS_CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
+ field public static final java.lang.String MMS_CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
+ field public static final java.lang.String MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize";
+ field public static final java.lang.String MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports";
+ field public static final java.lang.String MMS_CONFIG_MMS_ENABLED = "enabledMMS";
+ field public static final java.lang.String MMS_CONFIG_MMS_READ_REPORT_ENABLED = "enableMMSReadReports";
+ field public static final java.lang.String MMS_CONFIG_MULTIPART_SMS_ENABLED = "enableMultipartSMS";
+ field public static final java.lang.String MMS_CONFIG_NAI_SUFFIX = "naiSuffix";
+ field public static final java.lang.String MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC";
+ field public static final java.lang.String MMS_CONFIG_RECIPIENT_LIMIT = "recipientLimit";
+ field public static final java.lang.String MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages";
+ field public static final java.lang.String MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports";
+ field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold";
+ field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
+ field public static final java.lang.String MMS_CONFIG_SUBJECT_MAX_LENGTH = "maxSubjectLength";
+ field public static final java.lang.String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition";
+ field public static final java.lang.String MMS_CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
+ field public static final java.lang.String MMS_CONFIG_UA_PROF_URL = "uaProfUrl";
+ field public static final java.lang.String MMS_CONFIG_USER_AGENT = "userAgent";
field public static final java.lang.String MESSAGE_STATUS_READ = "read";
field public static final java.lang.String MESSAGE_STATUS_SEEN = "seen";
field public static final int MMS_ERROR_HTTP_FAILURE = 4; // 0x4
diff --git a/services/core/java/com/android/server/MmsServiceBroker.java b/services/core/java/com/android/server/MmsServiceBroker.java
index df54c7f..2830b5e 100644
--- a/services/core/java/com/android/server/MmsServiceBroker.java
+++ b/services/core/java/com/android/server/MmsServiceBroker.java
@@ -29,10 +29,12 @@
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Binder;
+import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.telephony.TelephonyManager;
import android.util.Slog;
@@ -228,21 +230,8 @@
}
@Override
- public boolean getCarrierConfigBoolean(long subId, String name, boolean defaultValue)
- throws RemoteException {
- return getServiceGuarded().getCarrierConfigBoolean(subId, name, defaultValue);
- }
-
- @Override
- public int getCarrierConfigInt(long subId, String name, int defaultValue)
- throws RemoteException {
- return getServiceGuarded().getCarrierConfigInt(subId, name, defaultValue);
- }
-
- @Override
- public String getCarrierConfigString(long subId, String name, String defaultValue)
- throws RemoteException {
- return getServiceGuarded().getCarrierConfigString(subId, name, defaultValue);
+ public Bundle getCarrierConfigValues(long subId) throws RemoteException {
+ return getServiceGuarded().getCarrierConfigValues(subId);
}
@Override
diff --git a/telephony/java/com/android/internal/telephony/IMms.aidl b/telephony/java/com/android/internal/telephony/IMms.aidl
index cbcef25..2aeb42f 100644
--- a/telephony/java/com/android/internal/telephony/IMms.aidl
+++ b/telephony/java/com/android/internal/telephony/IMms.aidl
@@ -19,6 +19,7 @@
import android.app.PendingIntent;
import android.content.ContentValues;
import android.net.Uri;
+import android.os.Bundle;
/**
* Service interface to handle MMS API requests
@@ -78,33 +79,11 @@
void updateMmsDownloadStatus(int messageRef, in byte[] pdu);
/**
- * Get carrier-dependent configuration value as boolean. For example, if multipart SMS
- * is supported.
+ * Get carrier-dependent configuration values.
*
* @param subId the SIM id
- * @param name the configuration name
- * @param defaultValue the default value if fail to find the name
*/
- boolean getCarrierConfigBoolean(long subId, String name, boolean defaultValue);
-
- /**
- * Get carrier-dependent configuration value as int. For example, the MMS message size limit.
- *
- * @param subId the SIM id
- * @param name the configuration name
- * @param defaultValue the default value if fail to find the name
- */
- int getCarrierConfigInt(long subId, String name, int defaultValue);
-
- /**
- * Get carrier-dependent configuration value as String. For example, extra HTTP headers for
- * MMS request.
- *
- * @param subId the SIM id
- * @param name the configuration name
- * @param defaultValue the default value if fail to find the name
- */
- String getCarrierConfigString(long subId, String name, String defaultValue);
+ Bundle getCarrierConfigValues(long subId);
/**
* Import a text message into system's SMS store