Prefer the preferred APN for all types it supports
We used to only prefer it when connecting for default connection purposes, but it makes sense to use the preference for all apn types it supports. bug:6377793 Change-Id: I8b26b77fc0787121749cce9d32303ab24cc72c75
This commit is contained in:
@@ -2322,8 +2322,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
String operator = mPhone.mIccRecords.getOperatorNumeric();
|
String operator = mPhone.mIccRecords.getOperatorNumeric();
|
||||||
int networkType = mPhone.getServiceState().getNetworkType();
|
int networkType = mPhone.getServiceState().getNetworkType();
|
||||||
|
|
||||||
if (requestedApnType.equals(Phone.APN_TYPE_DEFAULT)) {
|
if (canSetPreferApn && mPreferredApn != null &&
|
||||||
if (canSetPreferApn && mPreferredApn != null) {
|
mPreferredApn.canHandleType(requestedApnType)) {
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
log("buildWaitingApns: Preferred APN:" + operator + ":"
|
log("buildWaitingApns: Preferred APN:" + operator + ":"
|
||||||
+ mPreferredApn.numeric + ":" + mPreferredApn);
|
+ mPreferredApn.numeric + ":" + mPreferredApn);
|
||||||
@@ -2344,7 +2344,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
mPreferredApn = null;
|
mPreferredApn = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (mAllApns != null) {
|
if (mAllApns != null) {
|
||||||
for (ApnSetting apn : mAllApns) {
|
for (ApnSetting apn : mAllApns) {
|
||||||
if (apn.canHandleType(requestedApnType)) {
|
if (apn.canHandleType(requestedApnType)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user