Skip to content

Commit 5840639

Browse files
author
Robert Greenwalt
committed
Fix apn bearer logic.
The original change said that if the RAT were X or Y we would only accept APN's that explicitly called out X or Y. This meant that any device using X or Y would stop working until their APN db were adjusted. This change changes it to be if a particular APN calls out X or Y it will only be considered if the current RAT matches. If the APN doesn't specify, it matches all RAT. This allows just as tight a restriction, but the default is looser. Change-Id: Ia5e92f13c5052e890bf169e0db9584302afb36f5
1 parent 745f1e3 commit 5840639

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,18 +2086,6 @@ private void destroyDataConnections() {
20862086
}
20872087
}
20882088

2089-
/**
2090-
* Check current radio access technology is LTE or EHRPD.
2091-
*
2092-
* @param integer value of radio access technology
2093-
* @return true when current radio access technology is LTE or EHRPD
2094-
* @ false when current radio access technology is not LTE or EHRPD
2095-
*/
2096-
private boolean needToCheckApnBearer(int radioTech) {
2097-
return (radioTech == ServiceState.RADIO_TECHNOLOGY_LTE ||
2098-
radioTech == ServiceState.RADIO_TECHNOLOGY_EHRPD);
2099-
}
2100-
21012089
/**
21022090
* Build a list of APNs to be used to create PDP's.
21032091
*
@@ -2119,7 +2107,6 @@ private ArrayList<ApnSetting> buildWaitingApns(String requestedApnType) {
21192107

21202108
String operator = mPhone.mIccRecords.getOperatorNumeric();
21212109
int radioTech = mPhone.getServiceState().getRadioTechnology();
2122-
boolean needToCheckApnBearer = needToCheckApnBearer(radioTech);
21232110

21242111
if (requestedApnType.equals(Phone.APN_TYPE_DEFAULT)) {
21252112
if (canSetPreferApn && mPreferredApn != null) {
@@ -2128,7 +2115,7 @@ private ArrayList<ApnSetting> buildWaitingApns(String requestedApnType) {
21282115
+ mPreferredApn.numeric + ":" + mPreferredApn);
21292116
}
21302117
if (mPreferredApn.numeric.equals(operator)) {
2131-
if (!needToCheckApnBearer || mPreferredApn.bearer == radioTech) {
2118+
if (mPreferredApn.bearer == 0 || mPreferredApn.bearer == radioTech) {
21322119
apnList.add(mPreferredApn);
21332120
if (DBG) log("buildWaitingApns: X added preferred apnList=" + apnList);
21342121
return apnList;
@@ -2147,7 +2134,7 @@ private ArrayList<ApnSetting> buildWaitingApns(String requestedApnType) {
21472134
if (mAllApns != null) {
21482135
for (ApnSetting apn : mAllApns) {
21492136
if (apn.canHandleType(requestedApnType)) {
2150-
if (!needToCheckApnBearer || apn.bearer == radioTech) {
2137+
if (apn.bearer == 0 || apn.bearer == radioTech) {
21512138
if (DBG) log("apn info : " +apn.toString());
21522139
apnList.add(apn);
21532140
}

0 commit comments

Comments
 (0)