Skip to content

Commit dfcb8c5

Browse files
Robert GreenwaltAndroid (Google) Code Review
authored andcommitted
Merge "Don't accept a user-defined dun-capable connection" into gingerbread
2 parents 4bdab17 + 4c89b14 commit dfcb8c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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)