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

Commit 11cb63b1 authored by Sandeep Gutta's avatar Sandeep Gutta
Browse files

MSIM: Fix flex map related issues

1. Send FINISH with failure status if any of the
   START request fails.

2. When set radio cap request timeout happens, to cleanup
   ongoing transcation ProxyController sends FINISH with
   failure status, while sending FINISH reuqests it
   generates a new session id, but the generated new
   session id is not updated in global variable and because
   of that the FINISH response is ignored.
   To fix this update the generated new session id in
   global variable and reset the RAF status counter to 0.

3. While sending FINISH pass new RAF/modem Uuid
   if overall request is success.

Test: performed flex map sanity
Bug: 28382997
Change-Id: Ibc8f5ed14616b4c5fe5694fe2717ce75704e4bf8
parent f6800ef3
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -339,7 +339,10 @@ public class ProxyController {
    private void onStartRadioCapabilityResponse(Message msg) {
        synchronized (mSetRadioAccessFamilyStatus) {
            AsyncResult ar = (AsyncResult)msg.obj;
            if (ar.exception != null) {
            // Abort here only in Single SIM case, in Multi SIM cases
            // send FINISH with failure so that below layers can re-bind
            // old logical modems.
            if ((TelephonyManager.getDefault().getPhoneCount() == 1) && (ar.exception != null)) {
                // just abort now.  They didn't take our start so we don't have to revert
                logd("onStartRadioCapabilityResponse got exception=" + ar.exception);
                mRadioCapabilitySessionId = mUniqueIdGenerator.getAndIncrement();
@@ -505,10 +508,14 @@ public class ProxyController {

            // Increment the sessionId as we are completing the transaction below
            // so we don't want it completed when the FINISH phase is done.
            int uniqueDifferentId = mUniqueIdGenerator.getAndIncrement();
            mRadioCapabilitySessionId = mUniqueIdGenerator.getAndIncrement();

            // Reset the status counter as existing session failed
            mRadioAccessFamilyStatusCounter = 0;

            // send FINISH request with fail status and then uniqueDifferentId
            mTransactionFailed = true;
            issueFinish(uniqueDifferentId);
            issueFinish(mRadioCapabilitySessionId);
        }
    }

@@ -523,8 +530,10 @@ public class ProxyController {
                        i,
                        sessionId,
                        RadioCapability.RC_PHASE_FINISH,
                        mOldRadioAccessFamily[i],
                        mCurrentLogicalModemIds[i],
                        (mTransactionFailed ? mOldRadioAccessFamily[i] :
                        mNewRadioAccessFamily[i]),
                        (mTransactionFailed ? mCurrentLogicalModemIds[i] :
                        mNewLogicalModemIds[i]),
                        (mTransactionFailed ? RadioCapability.RC_STATUS_FAIL :
                        RadioCapability.RC_STATUS_SUCCESS),
                        EVENT_FINISH_RC_RESPONSE);