summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2011-03-09 15:08:15 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2011-03-09 16:33:33 -0800
commit4c89b14db431dc1c9c2c8d8f14b88f991a29ab62 (patch)
tree1a1192c24e1b9d11e8f7f127887a8f45786168f9 /telephony/java
parentdf6410dce3dae0bdb7e13118b3878079a1dcce03 (diff)
downloadframeworks_base-4c89b14db431dc1c9c2c8d8f14b88f991a29ab62.zip
frameworks_base-4c89b14db431dc1c9c2c8d8f14b88f991a29ab62.tar.gz
frameworks_base-4c89b14db431dc1c9c2c8d8f14b88f991a29ab62.tar.bz2
Don't accept a user-defined dun-capable connection
If we're asked to connect to a DUN APN and we have a carrier specified DUN APN setting, verify what we're connected to is the same as what the carrier specified before accepting it. bug:4048013 Change-Id: I91edc4a1342cb40c1f6959e149303b7d76710f96
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 10988b1..96005f0 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -361,6 +361,12 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
@Override
protected boolean isApnTypeActive(String type) {
// TODO: support simultaneous with List instead
+ if (Phone.APN_TYPE_DUN.equals(type)) {
+ ApnSetting dunApn = fetchDunApn();
+ if (dunApn != null) {
+ return ((mActiveApn != null) && (dunApn.toString().equals(mActiveApn.toString())));
+ }
+ }
return mActiveApn != null && mActiveApn.canHandleType(type);
}