Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +2 −1 Original line number Diff line number Diff line Loading @@ -1548,6 +1548,7 @@ public class ServiceStateTracker extends Handler { if (mPendingRadioPowerOffAfterDataOff) { if (DBG) log("EVENT_ALL_DATA_DISCONNECTED, turn radio off now."); hangupAndPowerOff(); mPendingRadioPowerOffAfterDataOffTag += 1; mPendingRadioPowerOffAfterDataOff = false; } else { log("EVENT_ALL_DATA_DISCONNECTED is stale"); Loading Loading @@ -5098,8 +5099,8 @@ public class ServiceStateTracker extends Handler { synchronized(this) { if (mPendingRadioPowerOffAfterDataOff) { if (DBG) log("Process pending request to turn radio off."); mPendingRadioPowerOffAfterDataOffTag += 1; hangupAndPowerOff(); mPendingRadioPowerOffAfterDataOffTag += 1; mPendingRadioPowerOffAfterDataOff = false; return true; } Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +15 −32 Original line number Diff line number Diff line Loading @@ -658,8 +658,6 @@ public class DcTracker extends Handler { private SparseArray<ApnContext> mApnContextsByType = new SparseArray<ApnContext>(); private int mDisconnectPendingCount = 0; private ArrayList<DataProfile> mLastDataProfileList = new ArrayList<>(); /** RAT name ===> (downstream, upstream) bandwidth values from carrier config. */ Loading Loading @@ -1735,9 +1733,7 @@ public class DcTracker extends Handler { // TODO: Do we need mRequestedApnType? mRequestedApnType = ApnSetting.TYPE_DEFAULT; log("cleanUpAllConnectionsInternal: mDisconnectPendingCount = " + mDisconnectPendingCount); if (detach && mDisconnectPendingCount == 0) { if (areAllDataDisconnected()) { notifyAllDataDisconnected(); } Loading Loading @@ -1837,7 +1833,6 @@ public class DcTracker extends Handler { } apnContext.setState(DctConstants.State.DISCONNECTING); mDisconnectPendingCount++; } } else { // apn is connected but no reference to the data connection. Loading Loading @@ -3296,10 +3291,9 @@ public class DcTracker extends Handler { private void onDisconnectDone(ApnContext apnContext) { if(DBG) log("onDisconnectDone: EVENT_DISCONNECT_DONE apnContext=" + apnContext); apnContext.setState(DctConstants.State.IDLE); // if all data connection are gone, check whether Airplane mode request was // pending. if (areAllDataDisconnected()) { if (mPhone.getServiceStateTracker().processPendingRadioPowerOffAfterDataOff()) { // If all data connection are gone, check whether Airplane mode request was pending. if (areAllDataDisconnected() && mPhone.getServiceStateTracker().processPendingRadioPowerOffAfterDataOff()) { if (DBG) log("onDisconnectDone: radio will be turned off, no retries"); // Radio will be turned off. No need to retry data setup apnContext.setApnSetting(null); Loading @@ -3307,16 +3301,9 @@ public class DcTracker extends Handler { // Need to notify disconnect as well, in the case of switching Airplane mode. // Otherwise, it would cause 30s delayed to turn on Airplane mode. if (mDisconnectPendingCount > 0) { mDisconnectPendingCount--; } if (mDisconnectPendingCount == 0) { notifyAllDataDisconnected(); } return; } } // If APN is still enabled, try to bring it back up automatically if (mAttached.get() && apnContext.isReady() && retryAfterDisconnected(apnContext)) { // Wait a bit before trying the next APN, so that Loading Loading @@ -3356,10 +3343,7 @@ public class DcTracker extends Handler { } } if (mDisconnectPendingCount > 0) mDisconnectPendingCount--; if (mDisconnectPendingCount == 0) { if (areAllDataDisconnected()) { apnContext.setConcurrentVoiceAndDataAllowed( mPhone.getServiceStateTracker().isConcurrentVoiceAndDataAllowed()); notifyAllDataDisconnected(); Loading Loading @@ -3412,7 +3396,7 @@ public class DcTracker extends Handler { public boolean areAllDataDisconnected() { for (DataConnection dc : mDataConnections.values()) { if (!dc.isInactive()) { if (DBG) log("areAllDataDisconnected false due to DC: " + dc); if (DBG) log("areAllDataDisconnected false due to DC: " + dc.getName()); return false; } } Loading Loading @@ -4785,8 +4769,7 @@ public class DcTracker extends Handler { mRequestedApnType = ApnSetting.TYPE_DEFAULT; if (DBG) log("mDisconnectPendingCount = " + mDisconnectPendingCount); if (detach && mDisconnectPendingCount == 0) { if (areAllDataDisconnected()) { notifyAllDataDisconnected(); } } Loading Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +2 −1 Original line number Diff line number Diff line Loading @@ -1548,6 +1548,7 @@ public class ServiceStateTracker extends Handler { if (mPendingRadioPowerOffAfterDataOff) { if (DBG) log("EVENT_ALL_DATA_DISCONNECTED, turn radio off now."); hangupAndPowerOff(); mPendingRadioPowerOffAfterDataOffTag += 1; mPendingRadioPowerOffAfterDataOff = false; } else { log("EVENT_ALL_DATA_DISCONNECTED is stale"); Loading Loading @@ -5098,8 +5099,8 @@ public class ServiceStateTracker extends Handler { synchronized(this) { if (mPendingRadioPowerOffAfterDataOff) { if (DBG) log("Process pending request to turn radio off."); mPendingRadioPowerOffAfterDataOffTag += 1; hangupAndPowerOff(); mPendingRadioPowerOffAfterDataOffTag += 1; mPendingRadioPowerOffAfterDataOff = false; return true; } Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +15 −32 Original line number Diff line number Diff line Loading @@ -658,8 +658,6 @@ public class DcTracker extends Handler { private SparseArray<ApnContext> mApnContextsByType = new SparseArray<ApnContext>(); private int mDisconnectPendingCount = 0; private ArrayList<DataProfile> mLastDataProfileList = new ArrayList<>(); /** RAT name ===> (downstream, upstream) bandwidth values from carrier config. */ Loading Loading @@ -1735,9 +1733,7 @@ public class DcTracker extends Handler { // TODO: Do we need mRequestedApnType? mRequestedApnType = ApnSetting.TYPE_DEFAULT; log("cleanUpAllConnectionsInternal: mDisconnectPendingCount = " + mDisconnectPendingCount); if (detach && mDisconnectPendingCount == 0) { if (areAllDataDisconnected()) { notifyAllDataDisconnected(); } Loading Loading @@ -1837,7 +1833,6 @@ public class DcTracker extends Handler { } apnContext.setState(DctConstants.State.DISCONNECTING); mDisconnectPendingCount++; } } else { // apn is connected but no reference to the data connection. Loading Loading @@ -3296,10 +3291,9 @@ public class DcTracker extends Handler { private void onDisconnectDone(ApnContext apnContext) { if(DBG) log("onDisconnectDone: EVENT_DISCONNECT_DONE apnContext=" + apnContext); apnContext.setState(DctConstants.State.IDLE); // if all data connection are gone, check whether Airplane mode request was // pending. if (areAllDataDisconnected()) { if (mPhone.getServiceStateTracker().processPendingRadioPowerOffAfterDataOff()) { // If all data connection are gone, check whether Airplane mode request was pending. if (areAllDataDisconnected() && mPhone.getServiceStateTracker().processPendingRadioPowerOffAfterDataOff()) { if (DBG) log("onDisconnectDone: radio will be turned off, no retries"); // Radio will be turned off. No need to retry data setup apnContext.setApnSetting(null); Loading @@ -3307,16 +3301,9 @@ public class DcTracker extends Handler { // Need to notify disconnect as well, in the case of switching Airplane mode. // Otherwise, it would cause 30s delayed to turn on Airplane mode. if (mDisconnectPendingCount > 0) { mDisconnectPendingCount--; } if (mDisconnectPendingCount == 0) { notifyAllDataDisconnected(); } return; } } // If APN is still enabled, try to bring it back up automatically if (mAttached.get() && apnContext.isReady() && retryAfterDisconnected(apnContext)) { // Wait a bit before trying the next APN, so that Loading Loading @@ -3356,10 +3343,7 @@ public class DcTracker extends Handler { } } if (mDisconnectPendingCount > 0) mDisconnectPendingCount--; if (mDisconnectPendingCount == 0) { if (areAllDataDisconnected()) { apnContext.setConcurrentVoiceAndDataAllowed( mPhone.getServiceStateTracker().isConcurrentVoiceAndDataAllowed()); notifyAllDataDisconnected(); Loading Loading @@ -3412,7 +3396,7 @@ public class DcTracker extends Handler { public boolean areAllDataDisconnected() { for (DataConnection dc : mDataConnections.values()) { if (!dc.isInactive()) { if (DBG) log("areAllDataDisconnected false due to DC: " + dc); if (DBG) log("areAllDataDisconnected false due to DC: " + dc.getName()); return false; } } Loading Loading @@ -4785,8 +4769,7 @@ public class DcTracker extends Handler { mRequestedApnType = ApnSetting.TYPE_DEFAULT; if (DBG) log("mDisconnectPendingCount = " + mDisconnectPendingCount); if (detach && mDisconnectPendingCount == 0) { if (areAllDataDisconnected()) { notifyAllDataDisconnected(); } } Loading