Skip to content

Commit 4c89b14

Browse files
author
Robert Greenwalt
committed
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
1 parent df6410d commit 4c89b14

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ public boolean isDataConnectionAsDesired() {
361361
@Override
362362
protected boolean isApnTypeActive(String type) {
363363
// TODO: support simultaneous with List instead
364+
if (Phone.APN_TYPE_DUN.equals(type)) {
365+
ApnSetting dunApn = fetchDunApn();
366+
if (dunApn != null) {
367+
return ((mActiveApn != null) && (dunApn.toString().equals(mActiveApn.toString())));
368+
}
369+
}
364370
return mActiveApn != null && mActiveApn.canHandleType(type);
365371
}
366372

0 commit comments

Comments
 (0)