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

Commit 6371f345 authored by Jayachandran C's avatar Jayachandran C
Browse files

Use Phone.getState() to check for active call to skip data stall recovery

The existing flag mInVoiceCall in DcTracker has instance of CS calls
only and it works for specific use cases. However for skipping data
stall we would need to check any type of calls to avoid call drops.

Bug: 141207103
Test: Manually verified by making VoLTE call
      atest frameworks/opt/telephony/tests/telephonytests/
Change-Id: I5e28ddce41ff0597e7d650b53cae2762c99bc8b3
parent 6b3d35d4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4712,7 +4712,8 @@ public class DcTracker extends Handler {
            }

            // Skip recovery if it can cause a call to drop
            if (mInVoiceCall && getRecoveryAction() > RECOVERY_ACTION_CLEANUP) {
            if (mPhone.getState() != PhoneConstants.State.IDLE
                    && getRecoveryAction() > RECOVERY_ACTION_CLEANUP) {
                if (VDBG_STALL) log("skip data stall recovery as there is an active call");
                return false;
            }
+2 −0
Original line number Diff line number Diff line
@@ -1622,6 +1622,7 @@ public class DcTrackerTest extends TelephonyTest {
                Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS, 100);
        Settings.System.putInt(resolver, "radio.data.stall.recovery.action", 2);
        doReturn(new SignalStrength()).when(mPhone).getSignalStrength();
        doReturn(PhoneConstants.State.IDLE).when(mPhone).getState();

        mBundle.putStringArray(CarrierConfigManager.KEY_CARRIER_METERED_APN_TYPES_STRINGS,
                new String[]{PhoneConstants.APN_TYPE_DEFAULT, PhoneConstants.APN_TYPE_MMS});
@@ -1654,6 +1655,7 @@ public class DcTrackerTest extends TelephonyTest {
                Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS, 100);
        Settings.System.putInt(resolver, "radio.data.stall.recovery.action", 3);
        doReturn(new SignalStrength()).when(mPhone).getSignalStrength();
        doReturn(PhoneConstants.State.IDLE).when(mPhone).getState();

        mBundle.putStringArray(CarrierConfigManager.KEY_CARRIER_METERED_APN_TYPES_STRINGS,
                new String[]{PhoneConstants.APN_TYPE_DEFAULT, PhoneConstants.APN_TYPE_MMS});