summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2012-02-08 10:52:21 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2012-02-14 11:29:36 -0800
commit8d27f20ac2d5ccbeacb66502309666e0db0ea268 (patch)
tree634ce7647952a7b4117e7e428999fdc68671e2dc /telephony
parent08eb7dd630a2de8dd51a988a747da26ff9d3f8fb (diff)
downloadframeworks_base-8d27f20ac2d5ccbeacb66502309666e0db0ea268.zip
frameworks_base-8d27f20ac2d5ccbeacb66502309666e0db0ea268.tar.gz
frameworks_base-8d27f20ac2d5ccbeacb66502309666e0db0ea268.tar.bz2
Add a config to set Dun capabilities.
Since CDMA doesn't use APN settings there was no place to say what a cdma device's DUN connection would support, so by default normal device originating traffic would be blocked on a tethering single-connection device. With this change you can (via overlay) say that it supports everything so mms and on-device browsing/email will still work even when on a dun connection. The reason to allow both: some carriers will charge per byte for dun access and so they don't want lots of non-tethering traffic used (costs the user alot) but other carriers just use a dun connection to limit access to tethering, but once there give unlimited data, so it makes sense to support everything there. bug:5972599 Change-Id: I78fd7f3ac63c51a0560b659ed5ec219b10a93f8d
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index e2a4a7a..b3277e5 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -93,6 +93,9 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
Phone.APN_TYPE_MMS,
Phone.APN_TYPE_HIPRI };
+ private String[] mDunApnTypes = {
+ Phone.APN_TYPE_DUN };
+
private static final int mDefaultApnId = DataConnectionTracker.APN_DEFAULT_ID;
/* Constructor */
@@ -118,6 +121,21 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
createAllDataConnectionList();
broadcastMessenger();
+
+ Context c = mCdmaPhone.getContext();
+ String[] t = c.getResources().getStringArray(
+ com.android.internal.R.array.config_cdma_dun_supported_types);
+ if (t != null && t.length > 0) {
+ ArrayList<String> temp = new ArrayList<String>();
+ for(int i=0; i< t.length; i++) {
+ if (!Phone.APN_TYPE_DUN.equalsIgnoreCase(t[i])) {
+ temp.add(t[i]);
+ }
+ }
+ temp.add(0, Phone.APN_TYPE_DUN);
+ mDunApnTypes = temp.toArray(t);
+ }
+
}
@Override
@@ -343,8 +361,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
String[] types;
int apnId;
if (mRequestedApnType.equals(Phone.APN_TYPE_DUN)) {
- types = new String[1];
- types[0] = Phone.APN_TYPE_DUN;
+ types = mDunApnTypes;
apnId = DataConnectionTracker.APN_DUN_ID;
} else {
types = mDefaultApnTypes;