Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48a27a48 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Hold on data-stall recovery logic during voice call on other sub."

parents d59ccc02 a771289f
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import com.android.internal.telephony.EventLogTags;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneBase;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.UiccController;
import com.android.internal.util.AsyncChannel;
@@ -1575,7 +1576,7 @@ public abstract class DcTrackerBase extends Handler {
            mSentSinceLastRecv = 0;
            putRecoveryAction(RecoveryAction.GET_DATA_CALL_LIST);
        } else if (sent > 0 && received == 0) {
            if (mPhone.getState() == PhoneConstants.State.IDLE) {
            if (isPhoneStateIdle()) {
                mSentSinceLastRecv += sent;
            } else {
                mSentSinceLastRecv = 0;
@@ -1593,6 +1594,17 @@ public abstract class DcTrackerBase extends Handler {
        }
    }

    private boolean isPhoneStateIdle() {
        for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++ ) {
            Phone phone = PhoneFactory.getPhone(i);
            if (phone != null && phone.getState() != PhoneConstants.State.IDLE) {
                log("isPhoneStateIdle: Voice call active on sub: " + i);
                return false;
            }
        }
        return true;
    }

    protected void onDataStallAlarm(int tag) {
        if (mDataStallAlarmTag != tag) {
            if (DBG) {