Loading src/java/com/android/internal/telephony/dataconnection/DataConnection.java +11 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,11 @@ public class DataConnection extends StateMachine { int mTag; public int mCid; /** * Indicate this data connection has been transferred to the other transport type during * IWLAN and WWAN handover. */ private boolean mHasTransferred; private final Map<ApnContext, ConnectionParams> mApnContexts = new ConcurrentHashMap<>(); PendingIntent mReconnectIntent = null; Loading Loading @@ -366,6 +371,10 @@ public class DataConnection extends StateMachine { return getCurrentState() == mActivatingState; } boolean hasBeenTransferred() { return mHasTransferred; } int getCid() { return mCid; } Loading Loading @@ -1706,6 +1715,7 @@ public class DataConnection extends StateMachine { mApnSetting != null ? (long) mApnSetting.getApnTypeBitmask() : 0L, mApnSetting != null ? mApnSetting.canHandleType(ApnSetting.TYPE_DEFAULT) : false); mHasTransferred = false; } @Override public boolean processMessage(Message msg) { Loading Loading @@ -2882,6 +2892,7 @@ public class DataConnection extends StateMachine { public DcNetworkAgent transferNetworkAgent(DataConnection dataConnection, @TransportType int transportType) { mNetworkAgent.acquireOwnership(dataConnection, transportType); this.mHasTransferred = true; return mNetworkAgent; } Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +11 −3 Original line number Diff line number Diff line Loading @@ -2919,9 +2919,17 @@ public class DcTracker extends Handler { private void onDisconnectDone(ApnContext apnContext) { if(DBG) log("onDisconnectDone: EVENT_DISCONNECT_DONE apnContext=" + apnContext); apnContext.setState(DctConstants.State.IDLE); mPhone.notifyDataConnection(apnContext.getApnType()); final DataConnection dc = apnContext.getDataConnection(); // when data connection is gone and not for handover, notify all apn types which // this data connection can handle. Note, this might not work if one apn type served for // multiple data connection. if (dc != null && dc.isInactive() && !dc.hasBeenTransferred()) { String[] types = ApnSetting.getApnTypesStringFromBitmask( apnContext.getApnSetting().getApnTypeBitmask()).split(","); for (String type : types) { mPhone.notifyDataConnection(type); } } // if all data connection are gone, check whether Airplane mode request was // pending. if (isDisconnected()) { Loading Loading
src/java/com/android/internal/telephony/dataconnection/DataConnection.java +11 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,11 @@ public class DataConnection extends StateMachine { int mTag; public int mCid; /** * Indicate this data connection has been transferred to the other transport type during * IWLAN and WWAN handover. */ private boolean mHasTransferred; private final Map<ApnContext, ConnectionParams> mApnContexts = new ConcurrentHashMap<>(); PendingIntent mReconnectIntent = null; Loading Loading @@ -366,6 +371,10 @@ public class DataConnection extends StateMachine { return getCurrentState() == mActivatingState; } boolean hasBeenTransferred() { return mHasTransferred; } int getCid() { return mCid; } Loading Loading @@ -1706,6 +1715,7 @@ public class DataConnection extends StateMachine { mApnSetting != null ? (long) mApnSetting.getApnTypeBitmask() : 0L, mApnSetting != null ? mApnSetting.canHandleType(ApnSetting.TYPE_DEFAULT) : false); mHasTransferred = false; } @Override public boolean processMessage(Message msg) { Loading Loading @@ -2882,6 +2892,7 @@ public class DataConnection extends StateMachine { public DcNetworkAgent transferNetworkAgent(DataConnection dataConnection, @TransportType int transportType) { mNetworkAgent.acquireOwnership(dataConnection, transportType); this.mHasTransferred = true; return mNetworkAgent; } Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +11 −3 Original line number Diff line number Diff line Loading @@ -2919,9 +2919,17 @@ public class DcTracker extends Handler { private void onDisconnectDone(ApnContext apnContext) { if(DBG) log("onDisconnectDone: EVENT_DISCONNECT_DONE apnContext=" + apnContext); apnContext.setState(DctConstants.State.IDLE); mPhone.notifyDataConnection(apnContext.getApnType()); final DataConnection dc = apnContext.getDataConnection(); // when data connection is gone and not for handover, notify all apn types which // this data connection can handle. Note, this might not work if one apn type served for // multiple data connection. if (dc != null && dc.isInactive() && !dc.hasBeenTransferred()) { String[] types = ApnSetting.getApnTypesStringFromBitmask( apnContext.getApnSetting().getApnTypeBitmask()).split(","); for (String type : types) { mPhone.notifyDataConnection(type); } } // if all data connection are gone, check whether Airplane mode request was // pending. if (isDisconnected()) { Loading