summaryrefslogtreecommitdiffstats
path: root/telephony/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java/com')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/DataConnectionTracker.java3
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;
}