summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2011-09-22 11:49:01 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2011-09-22 11:49:01 -0700
commit5840639fd18c334c0df30ae03b270c452fee0a61 (patch)
tree7ec703e08cbdc422fb5ce8ef48bc06c7f7b761a9 /telephony
parent745f1e3a06eb504c9e4465afc987854a6269220d (diff)
downloadframeworks_base-5840639fd18c334c0df30ae03b270c452fee0a61.zip
frameworks_base-5840639fd18c334c0df30ae03b270c452fee0a61.tar.gz
frameworks_base-5840639fd18c334c0df30ae03b270c452fee0a61.tar.bz2
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
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index c62ccc6..78ba7dd 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -2087,18 +2087,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
}
/**
- * Check current radio access technology is LTE or EHRPD.
- *
- * @param integer value of radio access technology
- * @return true when current radio access technology is LTE or EHRPD
- * @ false when current radio access technology is not LTE or EHRPD
- */
- private boolean needToCheckApnBearer(int radioTech) {
- return (radioTech == ServiceState.RADIO_TECHNOLOGY_LTE ||
- radioTech == ServiceState.RADIO_TECHNOLOGY_EHRPD);
- }
-
- /**
* Build a list of APNs to be used to create PDP's.
*
* @param requestedApnType
@@ -2119,7 +2107,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
String operator = mPhone.mIccRecords.getOperatorNumeric();
int radioTech = mPhone.getServiceState().getRadioTechnology();
- boolean needToCheckApnBearer = needToCheckApnBearer(radioTech);
if (requestedApnType.equals(Phone.APN_TYPE_DEFAULT)) {
if (canSetPreferApn && mPreferredApn != null) {
@@ -2128,7 +2115,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
+ mPreferredApn.numeric + ":" + mPreferredApn);
}
if (mPreferredApn.numeric.equals(operator)) {
- if (!needToCheckApnBearer || mPreferredApn.bearer == radioTech) {
+ if (mPreferredApn.bearer == 0 || mPreferredApn.bearer == radioTech) {
apnList.add(mPreferredApn);
if (DBG) log("buildWaitingApns: X added preferred apnList=" + apnList);
return apnList;
@@ -2147,7 +2134,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
if (mAllApns != null) {
for (ApnSetting apn : mAllApns) {
if (apn.canHandleType(requestedApnType)) {
- if (!needToCheckApnBearer || apn.bearer == radioTech) {
+ if (apn.bearer == 0 || apn.bearer == radioTech) {
if (DBG) log("apn info : " +apn.toString());
apnList.add(apn);
}