Loading src/java/com/android/internal/telephony/dataconnection/DataConnection.java +19 −32 Original line number Diff line number Diff line Loading @@ -1541,34 +1541,23 @@ public class DataConnection extends StateMachine { // verify and get updated information in case these things // are obsolete { ServiceState ss = mPhone.getServiceState(); final int networkType = ss.getDataNetworkType(); if (mNetworkInfo.getSubtype() != networkType) { log("DcActiveState with incorrect subtype (" + mNetworkInfo.getSubtype() + ", " + networkType + "), updating."); log("DcActiveState with incorrect subtype (" + mNetworkInfo.getSubtype() + ", " + networkType + "), updating."); } mNetworkInfo.setSubtype(networkType, TelephonyManager.getNetworkTypeName(networkType)); final boolean roaming = ss.getDataRoaming(); if (roaming != mNetworkInfo.isRoaming()) { log("DcActiveState with incorrect roaming (" + mNetworkInfo.isRoaming() + ", " + roaming +"), updating."); log("DcActiveState with incorrect roaming (" + mNetworkInfo.isRoaming() + ", " + roaming + "), updating."); } mNetworkInfo.setRoaming(roaming); } boolean createNetworkAgent = true; // If a disconnect is already pending, avoid notifying all of connected if (hasMessages(EVENT_DISCONNECT) || hasMessages(EVENT_DISCONNECT_ALL) || hasDeferredMessages(EVENT_DISCONNECT) || hasDeferredMessages(EVENT_DISCONNECT_ALL)) { log("DcActiveState: skipping notifyAllOfConnected()"); createNetworkAgent = false; } else { // If we were retrying there maybe more than one, otherwise they'll only be one. notifyAllOfConnected(Phone.REASON_CONNECTED); } mPhone.getCallTracker().registerForVoiceCallStarted(getHandler(), DataConnection.EVENT_DATA_CONNECTION_VOICE_CALL_STARTED, null); Loading @@ -1593,13 +1582,11 @@ public class DataConnection extends StateMachine { } misc.subscriberId = mPhone.getSubscriberId(); if (createNetworkAgent) { setNetworkRestriction(); mNetworkAgent = new DcNetworkAgent(getHandler().getLooper(), mPhone.getContext(), "DcNetworkAgent", mNetworkInfo, getNetworkCapabilities(), mLinkProperties, 50, misc); } } @Override public void exit() { Loading Loading
src/java/com/android/internal/telephony/dataconnection/DataConnection.java +19 −32 Original line number Diff line number Diff line Loading @@ -1541,34 +1541,23 @@ public class DataConnection extends StateMachine { // verify and get updated information in case these things // are obsolete { ServiceState ss = mPhone.getServiceState(); final int networkType = ss.getDataNetworkType(); if (mNetworkInfo.getSubtype() != networkType) { log("DcActiveState with incorrect subtype (" + mNetworkInfo.getSubtype() + ", " + networkType + "), updating."); log("DcActiveState with incorrect subtype (" + mNetworkInfo.getSubtype() + ", " + networkType + "), updating."); } mNetworkInfo.setSubtype(networkType, TelephonyManager.getNetworkTypeName(networkType)); final boolean roaming = ss.getDataRoaming(); if (roaming != mNetworkInfo.isRoaming()) { log("DcActiveState with incorrect roaming (" + mNetworkInfo.isRoaming() + ", " + roaming +"), updating."); log("DcActiveState with incorrect roaming (" + mNetworkInfo.isRoaming() + ", " + roaming + "), updating."); } mNetworkInfo.setRoaming(roaming); } boolean createNetworkAgent = true; // If a disconnect is already pending, avoid notifying all of connected if (hasMessages(EVENT_DISCONNECT) || hasMessages(EVENT_DISCONNECT_ALL) || hasDeferredMessages(EVENT_DISCONNECT) || hasDeferredMessages(EVENT_DISCONNECT_ALL)) { log("DcActiveState: skipping notifyAllOfConnected()"); createNetworkAgent = false; } else { // If we were retrying there maybe more than one, otherwise they'll only be one. notifyAllOfConnected(Phone.REASON_CONNECTED); } mPhone.getCallTracker().registerForVoiceCallStarted(getHandler(), DataConnection.EVENT_DATA_CONNECTION_VOICE_CALL_STARTED, null); Loading @@ -1593,13 +1582,11 @@ public class DataConnection extends StateMachine { } misc.subscriberId = mPhone.getSubscriberId(); if (createNetworkAgent) { setNetworkRestriction(); mNetworkAgent = new DcNetworkAgent(getHandler().getLooper(), mPhone.getContext(), "DcNetworkAgent", mNetworkInfo, getNetworkCapabilities(), mLinkProperties, 50, misc); } } @Override public void exit() { Loading