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

Commit 610c1403 authored by Jayachandran C's avatar Jayachandran C Committed by Jayachandran Chinnakkannu
Browse files

Skip data stall recovery during voice call

This CL also sets the last recovery time early to avoid race issues

Bug: 141207103
Bug: 155098126
Test: atest frameworks/opt/telephony/tests/telephonytests/
Change-Id: Icf0bb52ccf174b1e791f358d1ab3d94d696b2711
parent 6e186232
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -4758,11 +4758,20 @@ public class DcTracker extends Handler {
                return false;
            }

            // Skip recovery if it can cause a call to drop
            if (mInVoiceCall && getRecoveryAction() > RECOVERY_ACTION_CLEANUP) {
                if (VDBG_STALL) log("skip data stall recovery as there is an active call");
                return false;
            }

            // Allow recovery if data is expected to work
            return mAttached.get() && isDataAllowed(null);
        }

        private void triggerRecovery() {
            // Updating the recovery start time early to avoid race when
            // the message is being processed in the Queue
            mTimeLastRecoveryStartMs = SystemClock.elapsedRealtime();
            sendMessage(obtainMessage(DctConstants.EVENT_DO_RECOVERY));
        }

@@ -4812,7 +4821,6 @@ public class DcTracker extends Handler {
                            + recoveryAction);
                }
                mSentSinceLastRecv = 0;
                mTimeLastRecoveryStartMs = SystemClock.elapsedRealtime();
            }
        }