* commit 'e3776a47dbebc8195edeac39f7f4ce3e08b59bec': Add a config to set Dun capabilities.
This commit is contained in:
@@ -227,6 +227,13 @@
|
|||||||
<item>4</item>
|
<item>4</item>
|
||||||
</integer-array>
|
</integer-array>
|
||||||
|
|
||||||
|
<!-- If the DUN connection for this CDMA device supports more than just DUN -->
|
||||||
|
<!-- traffic you should list them here. -->
|
||||||
|
<!-- If this device is not CDMA this is ignored. If this list is empty on -->
|
||||||
|
<!-- a DUN-requiring CDMA device, the DUN APN will just support just DUN. -->
|
||||||
|
<string-array translatable="false" name="config_cdma_dun_supported_types">
|
||||||
|
</string-array>
|
||||||
|
|
||||||
<!-- String containing the apn value for tethering. May be overriden by secure settings
|
<!-- String containing the apn value for tethering. May be overriden by secure settings
|
||||||
TETHER_DUN_APN. Value is a comma separated series of strings:
|
TETHER_DUN_APN. Value is a comma separated series of strings:
|
||||||
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
|
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
|
||||||
|
|||||||
@@ -93,6 +93,9 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
|||||||
Phone.APN_TYPE_MMS,
|
Phone.APN_TYPE_MMS,
|
||||||
Phone.APN_TYPE_HIPRI };
|
Phone.APN_TYPE_HIPRI };
|
||||||
|
|
||||||
|
private String[] mDunApnTypes = {
|
||||||
|
Phone.APN_TYPE_DUN };
|
||||||
|
|
||||||
private static final int mDefaultApnId = DataConnectionTracker.APN_DEFAULT_ID;
|
private static final int mDefaultApnId = DataConnectionTracker.APN_DEFAULT_ID;
|
||||||
|
|
||||||
/* Constructor */
|
/* Constructor */
|
||||||
@@ -118,6 +121,21 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
|||||||
|
|
||||||
createAllDataConnectionList();
|
createAllDataConnectionList();
|
||||||
broadcastMessenger();
|
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
|
@Override
|
||||||
@@ -343,8 +361,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
|||||||
String[] types;
|
String[] types;
|
||||||
int apnId;
|
int apnId;
|
||||||
if (mRequestedApnType.equals(Phone.APN_TYPE_DUN)) {
|
if (mRequestedApnType.equals(Phone.APN_TYPE_DUN)) {
|
||||||
types = new String[1];
|
types = mDunApnTypes;
|
||||||
types[0] = Phone.APN_TYPE_DUN;
|
|
||||||
apnId = DataConnectionTracker.APN_DUN_ID;
|
apnId = DataConnectionTracker.APN_DUN_ID;
|
||||||
} else {
|
} else {
|
||||||
types = mDefaultApnTypes;
|
types = mDefaultApnTypes;
|
||||||
|
|||||||
Reference in New Issue
Block a user