summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Bright <dbright@google.com>2020-01-16 02:04:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-01-16 02:04:39 +0000
commitfbffaeed3750a9843ab1e7a4a555c566877b1f98 (patch)
treee3f9feae21aaf3797b753210ae0b45ecd0026f8c
parent73c06ae3d1965177ae88a910fdf096db754b7301 (diff)
parentf3810dda57b6273fa8b11772621c57dfc9b7ae8f (diff)
downloadMms-fbffaeed3750a9843ab1e7a4a555c566877b1f98.tar.gz
Merge "Moved apn type constants to class"
-rw-r--r--src/com/android/mms/service/ApnSettings.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/mms/service/ApnSettings.java b/src/com/android/mms/service/ApnSettings.java
index 5f923c9..6e54166 100644
--- a/src/com/android/mms/service/ApnSettings.java
+++ b/src/com/android/mms/service/ApnSettings.java
@@ -23,7 +23,6 @@ import android.net.Uri;
import android.provider.Telephony;
import android.text.TextUtils;
-import com.android.internal.telephony.PhoneConstants;
import com.android.mms.service.exception.ApnException;
import java.net.URI;
@@ -33,6 +32,11 @@ import java.net.URISyntaxException;
* APN settings used for MMS transactions
*/
public class ApnSettings {
+
+ // APN types needed in the carrier table.
+ final static String APN_TYPE_ALL = "*";
+ final static String APN_TYPE_MMS = "mms";
+
// MMSC URL
private final String mServiceCenter;
// MMSC proxy address
@@ -126,7 +130,7 @@ public class ApnSettings {
while (cursor.moveToNext()) {
// Read values from APN settings
if (isValidApnType(
- cursor.getString(COLUMN_TYPE), PhoneConstants.APN_TYPE_MMS)) {
+ cursor.getString(COLUMN_TYPE), APN_TYPE_MMS)) {
String mmscUrl = trimWithNullCheck(cursor.getString(COLUMN_MMSC));
if (TextUtils.isEmpty(mmscUrl)) {
continue;
@@ -209,7 +213,7 @@ public class ApnSettings {
}
for (String type : types.split(",")) {
type = type.trim();
- if (type.equals(requestType) || type.equals(PhoneConstants.APN_TYPE_ALL)) {
+ if (type.equals(requestType) || type.equals(APN_TYPE_ALL)) {
return true;
}
}