diff options
-rw-r--r-- | telephony/java/com/android/internal/telephony/gsm/DataConnectionTracker.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/DataConnectionTracker.java index 999a508..02a6841 100644 --- a/telephony/java/com/android/internal/telephony/gsm/DataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/DataConnectionTracker.java @@ -1693,6 +1693,7 @@ final class DataConnectionTracker extends Handler if (allApns.isEmpty()) { if (DBG) log("No APN found for carrier: " + operator); + preferredApn = null; notifyNoData(PdpConnection.PdpFailCause.BAD_APN); } else { preferredApn = getPreferredApn(); @@ -1819,7 +1820,7 @@ final class DataConnectionTracker extends Handler cursor.moveToFirst(); pos = cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers._ID)); for(ApnSetting p:allApns) { - if (p.id == pos) { + if (p.id == pos && p.canHandleType(mRequestedApnType)) { cursor.close(); return p; } |