summaryrefslogtreecommitdiffstats
path: root/src/android/support/v7/mms/CarrierConfigValuesLoader.java
blob: ad94fb272c6ed5c7f04f4f48748c2161801a14cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.support.v7.mms;

import android.os.Bundle;

/**
 * Loader for carrier dependent configuration values
 */
public interface CarrierConfigValuesLoader {
    /**
     * Get the carrier config values in a bundle
     *
     * @param subId the associated subscription ID for the carrier configuration
     * @return a bundle of all the values
     */
    Bundle get(int subId);

    // Configuration keys and default values

    /** Boolean value: if MMS is enabled */
    public static final String CONFIG_ENABLED_MMS = "enabledMMS";
    public static final boolean CONFIG_ENABLED_MMS_DEFAULT = true;
    /**
     * Boolean value: if transaction ID should be appended to
     * the download URL of a single segment WAP push message
     */
    public static final String CONFIG_ENABLED_TRANS_ID = "enabledTransID";
    public static final boolean CONFIG_ENABLED_TRANS_ID_DEFAULT = false;
    /**
     * Boolean value: if acknowledge or notify response to a download
     * should be sent to the WAP push message's download URL
     */
    public static final String CONFIG_ENABLED_NOTIFY_WAP_MMSC = "enabledNotifyWapMMSC";
    public static final boolean CONFIG_ENABLED_NOTIFY_WAP_MMSC_DEFAULT = false;
    /**
     * Boolean value: if phone number alias can be used
     */
    public static final String CONFIG_ALIAS_ENABLED = "aliasEnabled";
    public static final boolean CONFIG_ALIAS_ENABLED_DEFAULT = false;
    /**
     * Boolean value: if audio is allowed in attachment
     */
    public static final String CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
    public static final boolean CONFIG_ALLOW_ATTACH_AUDIO_DEFAULT = true;
    /**
     * Boolean value: if true, long sms messages are always sent as multi-part sms
     * messages, with no checked limit on the number of segments. If false, then
     * as soon as the user types a message longer than a single segment (i.e. 140 chars),
     * the message will turn into and be sent as an mms message or separate,
     * independent SMS messages (dependent on CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES flag).
     * This feature exists for carriers that don't support multi-part sms.
     */
    public static final String CONFIG_ENABLE_MULTIPART_SMS = "enableMultipartSMS";
    public static final boolean CONFIG_ENABLE_MULTIPART_SMS_DEFAULT = true;
    /**
     * Boolean value: if SMS delivery report is supported
     */
    public static final String CONFIG_ENABLE_SMS_DELIVERY_REPORTS = "enableSMSDeliveryReports";
    public static final boolean CONFIG_ENABLE_SMS_DELIVERY_REPORTS_DEFAULT = true;
    /**
     * Boolean value: if group MMS is supported
     */
    public static final String CONFIG_ENABLE_GROUP_MMS = "enableGroupMms";
    public static final boolean CONFIG_ENABLE_GROUP_MMS_DEFAULT = true;
    /**
     * Boolean value: if the content_disposition field of an MMS part should be parsed
     * Check wap-230-wsp-20010705-a.pdf, chapter 8.4.2.21. Most carriers support it except some.
     */
    public static final String CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION =
            "supportMmsContentDisposition";
    public static final boolean CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION_DEFAULT = true;
    /**
     * Boolean value: if the sms app should support a link to the system settings
     * where amber alerts are configured.
     */
    public static final String CONFIG_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks";
    public static final boolean CONFIG_CELL_BROADCAST_APP_LINKS_DEFAULT = true;
    /**
     * Boolean value: if multipart SMS should be sent as separate SMS messages
     */
    public static final String CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES =
            "sendMultipartSmsAsSeparateMessages";
    public static final boolean CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_DEFAULT = false;
    /**
     * Boolean value: if MMS read report is supported
     */
    public static final String CONFIG_ENABLE_MMS_READ_REPORTS = "enableMMSReadReports";
    public static final boolean CONFIG_ENABLE_MMS_READ_REPORTS_DEFAULT = false;
    /**
     * Boolean value: if MMS delivery report is supported
     */
    public static final String CONFIG_ENABLE_MMS_DELIVERY_REPORTS = "enableMMSDeliveryReports";
    public static final boolean CONFIG_ENABLE_MMS_DELIVERY_REPORTS_DEFAULT = false;
    /**
     * Boolean value: if "charset" value is supported in the "Content-Type" HTTP header
     */
    public static final String CONFIG_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader";
    public static final boolean CONFIG_SUPPORT_HTTP_CHARSET_HEADER_DEFAULT = false;
    /**
     * Integer value: maximal MMS message size in bytes
     */
    public static final String CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
    public static final int CONFIG_MAX_MESSAGE_SIZE_DEFAULT = 300 * 1024;
    /**
     * Integer value: maximal MMS image height in pixels
     */
    public static final String CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
    public static final int CONFIG_MAX_IMAGE_HEIGHT_DEFAULT = 480;
    /**
     * Integer value: maximal MMS image width in pixels
     */
    public static final String CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
    public static final int CONFIG_MAX_IMAGE_WIDTH_DEFAULT = 640;
    /**
     * Integer value: limit on recipient list of an MMS message
     */
    public static final String CONFIG_RECIPIENT_LIMIT = "recipientLimit";
    public static final int CONFIG_RECIPIENT_LIMIT_DEFAULT = Integer.MAX_VALUE;
    /**
     * Integer value: HTTP socket timeout in milliseconds for MMS
     */
    public static final String CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
    public static final int CONFIG_HTTP_SOCKET_TIMEOUT_DEFAULT = 60 * 1000;
    /**
     * Integer value: minimal number of characters of an alias
     */
    public static final String CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
    public static final int CONFIG_ALIAS_MIN_CHARS_DEFAULT = 2;
    /**
     * Integer value: maximal number of characters of an alias
     */
    public static final String CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
    public static final int CONFIG_ALIAS_MAX_CHARS_DEFAULT = 48;
    /**
     * Integer value: the threshold of number of SMS parts when an multipart SMS will be
     * converted into an MMS, e.g. if this is "4", when an multipart SMS message has 5
     * parts, then it will be sent as MMS message instead. "-1" indicates no such conversion
     * can happen.
     */
    public static final String CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
    public static final int CONFIG_SMS_TO_MMS_TEXT_THRESHOLD_DEFAULT = -1;
    /**
     * Integer value: the threshold of SMS length when it will be converted into an MMS.
     * "-1" indicates no such conversion can happen.
     */
    public static final String CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD =
            "smsToMmsTextLengthThreshold";
    public static final int CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_DEFAULT = -1;
    /**
     * Integer value: maximal length in bytes of SMS message
     */
    public static final String CONFIG_MAX_MESSAGE_TEXT_SIZE = "maxMessageTextSize";
    public static final int CONFIG_MAX_MESSAGE_TEXT_SIZE_DEFAULT = -1;
    /**
     * Integer value: maximum number of characters allowed for mms subject
     */
    public static final String CONFIG_MAX_SUBJECT_LENGTH = "maxSubjectLength";
    public static final int CONFIG_MAX_SUBJECT_LENGTH_DEFAULT = 40;
    /**
     * String value: name for the user agent profile HTTP header
     */
    public static final String CONFIG_UA_PROF_TAG_NAME = "mUaProfTagName";
    public static final String CONFIG_UA_PROF_TAG_NAME_DEFAULT = "x-wap-profile";
    /**
     * String value: additional HTTP headers for MMS HTTP requests.
     * The format is
     * header_1:header_value_1|header_2:header_value_2|...
     * Each value can contain macros.
     */
    public static final String CONFIG_HTTP_PARAMS = "httpParams";
    public static final String CONFIG_HTTP_PARAMS_DEFAULT = null;
    /**
     * String value: number of email gateway
     */
    public static final String CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
    public static final String CONFIG_EMAIL_GATEWAY_NUMBER_DEFAULT = null;
    /**
     * String value: suffix for the NAI HTTP header value, e.g. ":pcs"
     * (NAI is used as authentication in HTTP headers for some carriers)
     */
    public static final String CONFIG_NAI_SUFFIX = "naiSuffix";
    public static final String CONFIG_NAI_SUFFIX_DEFAULT = null;
}