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

Commit 1847c4b6 authored by Rakesh Pallerla's avatar Rakesh Pallerla Committed by Linux Build Service Account
Browse files

Set Network Selection Mode to Automatic after flex mapping.

Set the Network Selection Mode to Automatic on all subs
after flex mapping because if network selection mode is
manual on any of the sub it will be in Limited service after
flex mapping...

Change-Id: Ica0d71e154963a08702c3d62c869b7efd1d5e25e
CRs-Fixed: 726384
parent 02ef7b57
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -298,7 +298,7 @@ public class ModemBindingPolicyHandler extends Handler {
    private void handleModemRatCapsAvailable() {
        mModemRatCapabilitiesAvailable = true;
        //Initialization sequence: Need to send Bind request always, so override is true.
        updateStackBindingIfRequired(true);
        if (SUCCESS == updateStackBindingIfRequired(true)) mIsSetPrefNwModeInProgress = true;
    }

    private void syncCurrentStackInfo() {
@@ -307,7 +307,7 @@ public class ModemBindingPolicyHandler extends Handler {
            mCurrentStackId[i] = mModemStackController.getCurrentStackIdForPhoneId(i);
            mModemCapInfo[mCurrentStackId[i]] = mModemStackController.getModemRatCapsForPhoneId(i);
            //reset Preferred to current.
            mPreferredStackId[i] = mCurrentStackId[i];
            mPreferredStackId[i] = (mCurrentStackId[i] >= 0) ? mCurrentStackId[i] : i;
        }
    }

+30 −9
Original line number Diff line number Diff line
@@ -488,10 +488,17 @@ public class ModemStackController extends Handler {
                sendResponseToTarget(mUpdateStackMsg, RILConstants.SUCCESS);
                mUpdateStackMsg = null;
            }
            updateNetworkSelectionMode();
            notifyStackReady();
        }
    }

    private void updateNetworkSelectionMode() {
        for (int i = 0; i < mNumPhones; i++) {
            mCi[i].setNetworkSelectionModeAutomatic(null);
        }
    }

    private void triggerUnBindingOnAllSubs() {
        resetSubStates();
        for (int i = 0; i < mNumPhones; i++) {
@@ -645,7 +652,7 @@ public class ModemStackController extends Handler {
    }

    public int updateStackBinding(int[] prefStackIds, boolean isBootUp, Message msg) {
        boolean isUpdateNotRequired = true;
        boolean isUpdateRequired = false;
        boolean callInProgress = isAnyCallsInProgress();

        if (mNumPhones == 1) {
@@ -659,11 +666,20 @@ public class ModemStackController extends Handler {
                    + mIsStackReady + ". So EXITING!!!");
            return FAILURE;
        }
        mIsStackReady = false;
        for (int i = 0; i < mNumPhones; i++) {
            mPreferredStackId[i] = prefStackIds[i];
        }

        for (int i = 0; i < mNumPhones; i++) {
            if (mPreferredStackId[i] != mCurrentStackId[i]) {
                //if preferred stackId is different from current, bindupdate is required.
                isUpdateRequired = true;
                break;
            }
        }

        if (isUpdateRequired) {
            mIsStackReady = false;
            //Store the msg object , so that result of updateStackbinding can be sent later.
            mUpdateStackMsg = msg;
            //Get Stored prefNwMode for all the subs and send request to RIL after update binding.
@@ -673,6 +689,11 @@ public class ModemStackController extends Handler {
            } else {
                triggerDeactivationOnAllSubs();
            }
        } else {
            //incase of bootup if cross binding is not required send stack ready notification.
            if (isBootUp) notifyStackReady();
            return FAILURE;
        }
        return SUCCESS;
    }