Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 731a59fc authored by Jonathan Basseri's avatar Jonathan Basseri
Browse files

Migrating MmsConfig to CarrierConfigManager.

This brings MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER from MmsConfig.java
into the public API.

Because classes in frameworks/base/telephony cannot refer to classes in
frameworks/opt/telephony, the literal values of these constants are
moving to CarrierConfigManager. The public API is not affected by this
shuffling.

This was originally Change-Id: I2e6897890e182fb181a6d8453c3f1780cb323045

Bug: 21085630
Change-Id: Ibb08500e83f9efbe7c8c08a56918016b95a20b19
parent ee08a180
Loading
Loading
Loading
Loading
+63 −36
Original line number Diff line number Diff line
@@ -87,131 +87,158 @@ public final class SmsManager {
     * Whether to append transaction id to MMS WAP Push M-Notification.ind's content location URI
     * when constructing the download URL of a new MMS (boolean type)
     */
    public static final String MMS_CONFIG_APPEND_TRANSACTION_ID = "enabledTransID";
    public static final String
            MMS_CONFIG_APPEND_TRANSACTION_ID = CarrierConfigManager.BOOL_MMS_APPEND_TRANSACTION_ID;
    /**
     * Whether MMS is enabled for the current carrier (boolean type)
     */
    public static final String MMS_CONFIG_MMS_ENABLED = "enabledMMS";
    public static final String MMS_CONFIG_MMS_ENABLED = CarrierConfigManager.BOOL_MMS_MMS_ENABLED;
    /**
     * Whether group MMS is enabled for the current carrier (boolean type)
     */
    public static final String MMS_CONFIG_GROUP_MMS_ENABLED = "enableGroupMms";
    public static final String
            MMS_CONFIG_GROUP_MMS_ENABLED = CarrierConfigManager.BOOL_MMS_GROUP_MMS_ENABLED;
    /**
     * If this is enabled, M-NotifyResp.ind should be sent to the WAP Push content location
     * instead of the default MMSC (boolean type)
     * If this is enabled, M-NotifyResp.ind should be sent to the WAP Push content location instead
     * of the default MMSC (boolean type)
     */
    public static final String MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC";
    public static final String MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED =
            CarrierConfigManager.BOOL_MMS_NOTIFY_WAP_MMSC_ENABLED;
    /**
     * Whether alias is enabled (boolean type)
     */
    public static final String MMS_CONFIG_ALIAS_ENABLED = "aliasEnabled";
    public static final String
            MMS_CONFIG_ALIAS_ENABLED = CarrierConfigManager.BOOL_MMS_ALIAS_ENABLED;
    /**
     * Whether audio is allowed to be attached for MMS messages (boolean type)
     */
    public static final String MMS_CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
    public static final String
            MMS_CONFIG_ALLOW_ATTACH_AUDIO = CarrierConfigManager.BOOL_MMS_ALLOW_ATTACH_AUDIO;
    /**
     * Whether multipart SMS is enabled (boolean type)
     */
    public static final String MMS_CONFIG_MULTIPART_SMS_ENABLED = "enableMultipartSMS";
    public static final String
            MMS_CONFIG_MULTIPART_SMS_ENABLED = CarrierConfigManager.BOOL_MMS_MULTIPART_SMS_ENABLED;
    /**
     * Whether SMS delivery report is enabled (boolean type)
     */
    public static final String MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports";
    public static final String MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED =
            CarrierConfigManager.BOOL_MMS_SMS_DELIVERY_REPORT_ENABLED;
    /**
     * Whether content-disposition field should be expected in an MMS PDU (boolean type)
     */
    public static final String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION =
            "supportMmsContentDisposition";
            CarrierConfigManager.BOOL_MMS_SUPPORT_MMS_CONTENT_DISPOSITION;
    /**
     * Whether multipart SMS should be sent as separate messages
     */
    public static final String MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES =
            "sendMultipartSmsAsSeparateMessages";
            CarrierConfigManager.BOOL_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES;
    /**
     * Whether MMS read report is enabled (boolean type)
     */
    public static final String MMS_CONFIG_MMS_READ_REPORT_ENABLED = "enableMMSReadReports";
    public static final String MMS_CONFIG_MMS_READ_REPORT_ENABLED =
            CarrierConfigManager.BOOL_MMS_MMS_READ_REPORT_ENABLED;
    /**
     * Whether MMS delivery report is enabled (boolean type)
     */
    public static final String MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports";
    public static final String MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED =
            CarrierConfigManager.BOOL_MMS_MMS_DELIVERY_REPORT_ENABLED;
    /**
     * Max MMS message size in bytes (int type)
     */
    public static final String MMS_CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
    public static final String
            MMS_CONFIG_MAX_MESSAGE_SIZE = CarrierConfigManager.INT_MMS_MAX_MESSAGE_SIZE;
    /**
     * Max MMS image width (int type)
     */
    public static final String MMS_CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
    public static final String
            MMS_CONFIG_MAX_IMAGE_WIDTH = CarrierConfigManager.INT_MMS_MAX_IMAGE_WIDTH;
    /**
     * Max MMS image height (int type)
     */
    public static final String MMS_CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
    public static final String
            MMS_CONFIG_MAX_IMAGE_HEIGHT = CarrierConfigManager.INT_MMS_MAX_IMAGE_HEIGHT;
    /**
     * Limit of recipients of MMS messages (int type)
     */
    public static final String MMS_CONFIG_RECIPIENT_LIMIT = "recipientLimit";
    public static final String
            MMS_CONFIG_RECIPIENT_LIMIT = CarrierConfigManager.INT_MMS_RECIPIENT_LIMIT;
    /**
     * Min alias character count (int type)
     */
    public static final String MMS_CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
    public static final String
            MMS_CONFIG_ALIAS_MIN_CHARS = CarrierConfigManager.INT_MMS_ALIAS_MIN_CHARS;
    /**
     * Max alias character count (int type)
     */
    public static final String MMS_CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
    public static final String
            MMS_CONFIG_ALIAS_MAX_CHARS = CarrierConfigManager.INT_MMS_ALIAS_MAX_CHARS;
    /**
     * When the number of parts of a multipart SMS reaches this threshold, it should be
     * converted into an MMS (int type)
     * When the number of parts of a multipart SMS reaches this threshold, it should be converted
     * into an MMS (int type)
     */
    public static final String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
    public static final String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD =
            CarrierConfigManager.INT_MMS_SMS_TO_MMS_TEXT_THRESHOLD;
    /**
     * Some carriers require SMS to be converted into MMS when text length reaches this threshold
     * (int type)
     */
    public static final String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD =
            "smsToMmsTextLengthThreshold";
            CarrierConfigManager.INT_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD;
    /**
     * Max message text size (int type)
     */
    public static final String MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize";
    public static final String
            MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE = CarrierConfigManager.INT_MMS_MESSAGE_TEXT_MAX_SIZE;
    /**
     * Max message subject length (int type)
     */
    public static final String MMS_CONFIG_SUBJECT_MAX_LENGTH = "maxSubjectLength";
    public static final String
            MMS_CONFIG_SUBJECT_MAX_LENGTH = CarrierConfigManager.INT_MMS_SUBJECT_MAX_LENGTH;
    /**
     * MMS HTTP socket timeout in milliseconds (int type)
     */
    public static final String MMS_CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
    public static final String
            MMS_CONFIG_HTTP_SOCKET_TIMEOUT = CarrierConfigManager.INT_MMS_HTTP_SOCKET_TIMEOUT;
    /**
     * The name of the UA Prof URL HTTP header for MMS HTTP request (String type)
     */
    public static final String MMS_CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
    public static final String
            MMS_CONFIG_UA_PROF_TAG_NAME = CarrierConfigManager.STRING_MMS_UA_PROF_TAG_NAME;
    /**
     * The User-Agent header value for MMS HTTP request (String type)
     */
    public static final String MMS_CONFIG_USER_AGENT = "userAgent";
    public static final String MMS_CONFIG_USER_AGENT = CarrierConfigManager.STRING_MMS_USER_AGENT;
    /**
     * The UA Profile URL header value for MMS HTTP request (String type)
     */
    public static final String MMS_CONFIG_UA_PROF_URL = "uaProfUrl";
    public static final String MMS_CONFIG_UA_PROF_URL = CarrierConfigManager.STRING_MMS_UA_PROF_URL;
    /**
     * A list of HTTP headers to add to MMS HTTP request, separated by "|" (String type)
     */
    public static final String MMS_CONFIG_HTTP_PARAMS = "httpParams";
    public static final String MMS_CONFIG_HTTP_PARAMS = CarrierConfigManager.STRING_MMS_HTTP_PARAMS;
    /**
     * Email gateway number (String type)
     */
    public static final String MMS_CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
    public static final String
            MMS_CONFIG_EMAIL_GATEWAY_NUMBER = CarrierConfigManager.STRING_MMS_EMAIL_GATEWAY_NUMBER;
    /**
     * The suffix to append to the NAI header value for MMS HTTP request (String type)
     */
    public static final String MMS_CONFIG_NAI_SUFFIX = "naiSuffix";
    public static final String MMS_CONFIG_NAI_SUFFIX = CarrierConfigManager.STRING_MMS_NAI_SUFFIX;
    /**
     * If true, show the cell broadcast (amber alert) in the SMS settings. Some carriers
     * don't want this shown. (Boolean type)
     * If true, show the cell broadcast (amber alert) in the SMS settings. Some carriers don't want
     * this shown. (Boolean type)
     */
    public static final String MMS_CONFIG_SHOW_CELL_BROADCAST_APP_LINKS =
            "config_cellBroadcastAppLinks";
            CarrierConfigManager.BOOL_MMS_SHOW_CELL_BROADCAST_APP_LINKS;
    /**
     * Whether the carrier MMSC supports charset field in Content-Type header. If this is false,
     * then we don't add "charset" to "Content-Type"
     */
    public static final String MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER =
            CarrierConfigManager.BOOL_MMS_SUPPORT_HTTP_CHARSET_HEADER;
    /*
     * Forwarded constants from SimDialogActivity.
     */