Loading src/java/com/android/internal/telephony/dataconnection/DcSwitchStateMachine.java +11 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import com.android.internal.telephony.SubscriptionController; import android.os.AsyncResult; import android.os.Message; import android.telephony.Rlog; import android.telephony.ServiceState; public class DcSwitchStateMachine extends StateMachine { private static final boolean DBG = true; Loading Loading @@ -298,6 +299,16 @@ public class DcSwitchStateMachine extends StateMachine { } else { logd("EVENT_DATA_ALLOWED success"); mResponseMsg = null; /* If the data service state is IN_SERVICE then move to * ATTACHED state. */ int dataState = mPhone.getServiceState().getDataRegState(); if (dataState == ServiceState.STATE_IN_SERVICE) { logd("AttachingState: Already attached, move to ATTACHED state"); transitionTo(mAttachedState); } } } retVal = HANDLED; Loading src/java/com/android/internal/telephony/dataconnection/DctController.java +0 −34 Original line number Diff line number Diff line Loading @@ -388,44 +388,10 @@ public class DctController extends Handler { RequestInfo requestInfo = mRequestInfos.get(iterator.next()); if (getRequestPhoneId(requestInfo.request) == phoneId && !requestInfo.executed) { mDcSwitchAsyncChannel[phoneId].connect(requestInfo); Phone phone = mPhones[phoneId].getActivePhone(); if ((phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) && (activePhoneId == -1)) { /* Traditionally modem reports data registered on CDMA sub even when it is * non-dds because CDMA network does not have PS ATTACH/DETACH concept. * * So when CDMA sub becomes DDS from non-dds the state-machine is expacting * onDataConnectionAttach() call from serviceStateTracker. It would never * happen since cdma SST did not notice change in registration during DDS * switch. * * Hence we need to fake the ATTACH to move/progress DcSwitchStateMachine. */ logd("Active phone is CDMA, fake ATTACH"); mDcSwitchAsyncChannel[phoneId].notifyDataAttached(); } } } } else { Phone phone = mPhones[activePhoneId].getActivePhone(); mDcSwitchAsyncChannel[activePhoneId].disconnectAll(); if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) { /* Traditionally modem reports data registered on CDMA sub even when it is * non-dds because CDMA network does not have PS ATTACH/DETACH concept. * * So when CDMA sub becomes non-dds from dds the state-machine is expacting * onDataConnectionDetached() call from serviceStateTracker. It would never * happen since cdma SST did not notice change in registration during DDS * switch. * * Hence we need to fake the DETACH to move/progress DcSwitchStateMachine. */ logd("Active phone is CDMA, fake DETACH"); mDcSwitchAsyncChannel[activePhoneId].notifyDataDetached(); } } } Loading Loading
src/java/com/android/internal/telephony/dataconnection/DcSwitchStateMachine.java +11 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import com.android.internal.telephony.SubscriptionController; import android.os.AsyncResult; import android.os.Message; import android.telephony.Rlog; import android.telephony.ServiceState; public class DcSwitchStateMachine extends StateMachine { private static final boolean DBG = true; Loading Loading @@ -298,6 +299,16 @@ public class DcSwitchStateMachine extends StateMachine { } else { logd("EVENT_DATA_ALLOWED success"); mResponseMsg = null; /* If the data service state is IN_SERVICE then move to * ATTACHED state. */ int dataState = mPhone.getServiceState().getDataRegState(); if (dataState == ServiceState.STATE_IN_SERVICE) { logd("AttachingState: Already attached, move to ATTACHED state"); transitionTo(mAttachedState); } } } retVal = HANDLED; Loading
src/java/com/android/internal/telephony/dataconnection/DctController.java +0 −34 Original line number Diff line number Diff line Loading @@ -388,44 +388,10 @@ public class DctController extends Handler { RequestInfo requestInfo = mRequestInfos.get(iterator.next()); if (getRequestPhoneId(requestInfo.request) == phoneId && !requestInfo.executed) { mDcSwitchAsyncChannel[phoneId].connect(requestInfo); Phone phone = mPhones[phoneId].getActivePhone(); if ((phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) && (activePhoneId == -1)) { /* Traditionally modem reports data registered on CDMA sub even when it is * non-dds because CDMA network does not have PS ATTACH/DETACH concept. * * So when CDMA sub becomes DDS from non-dds the state-machine is expacting * onDataConnectionAttach() call from serviceStateTracker. It would never * happen since cdma SST did not notice change in registration during DDS * switch. * * Hence we need to fake the ATTACH to move/progress DcSwitchStateMachine. */ logd("Active phone is CDMA, fake ATTACH"); mDcSwitchAsyncChannel[phoneId].notifyDataAttached(); } } } } else { Phone phone = mPhones[activePhoneId].getActivePhone(); mDcSwitchAsyncChannel[activePhoneId].disconnectAll(); if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) { /* Traditionally modem reports data registered on CDMA sub even when it is * non-dds because CDMA network does not have PS ATTACH/DETACH concept. * * So when CDMA sub becomes non-dds from dds the state-machine is expacting * onDataConnectionDetached() call from serviceStateTracker. It would never * happen since cdma SST did not notice change in registration during DDS * switch. * * Hence we need to fake the DETACH to move/progress DcSwitchStateMachine. */ logd("Active phone is CDMA, fake DETACH"); mDcSwitchAsyncChannel[activePhoneId].notifyDataDetached(); } } } Loading