Change-Id: I89cb2f46dca59d5738dd16eb657104c3158ebcd2
return result;
}
+ private boolean dataConnectionNotInUse(DataConnectionAc dcac) {
+ for (ApnContext apnContext : mApnContexts.values()) {
+ if (apnContext.getDataConnectionAc() == dcac) return false;
+ }
+ return true;
+ }
+
private GsmDataConnection findFreeDataConnection() {
for (DataConnectionAc dcac : mDataConnectionAsyncChannels.values()) {
- if (dcac.isInactiveSync()) {
+ if (dcac.isInactiveSync() && dataConnectionNotInUse(dcac)) {
log("findFreeDataConnection: found free GsmDataConnection");
return (GsmDataConnection) dcac.dataConnection;
}