am 4d9261fa
: Merge "Use dataConnectionNotInUse to decide if a DC is free." into honeycomb-LTE
* commit '4d9261fad3e3bdfa056f377c10f2af0a6db62542': Use dataConnectionNotInUse to decide if a DC is free.
This commit is contained in:
@ -846,9 +846,16 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user