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

Commit 440ee1da authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add more logging around switchMultiSimConfig for better debugging"

parents ce24b25c 6d0f4a06
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -162,12 +162,14 @@ public class PhoneConfigurationManager {
     * @param numOfSims number of active sims we want to switch to
     * @param numOfSims number of active sims we want to switch to
     */
     */
    public void switchMultiSimConfig(int numOfSims) {
    public void switchMultiSimConfig(int numOfSims) {
        log("switchMultiSimConfig: with numOfSims = " + numOfSims);
        if (getStaticPhoneCapability().logicalModemList.size() < numOfSims) {
        if (getStaticPhoneCapability().logicalModemList.size() < numOfSims) {
            log("switchMultiSimConfig: Phone is not capable of enabling "
            log("switchMultiSimConfig: Phone is not capable of enabling "
                    + numOfSims + " sims, exiting!");
                    + numOfSims + " sims, exiting!");
            return;
            return;
        }
        }
        if (getNumOfActiveSims() != numOfSims) {
        if (getPhoneCount() != numOfSims) {
            log("switchMultiSimConfig: sending the request for switching");
            Message callback = Message.obtain(
            Message callback = Message.obtain(
                    mHandler, EVENT_SWITCH_DSDS_CONFIG_DONE, numOfSims, 0 /**dummy arg*/);
                    mHandler, EVENT_SWITCH_DSDS_CONFIG_DONE, numOfSims, 0 /**dummy arg*/);
            mRadioConfig.setModemsConfig(numOfSims, callback);
            mRadioConfig.setModemsConfig(numOfSims, callback);
@@ -206,6 +208,7 @@ public class PhoneConfigurationManager {
    public boolean isRebootRequiredForModemConfigChange() {
    public boolean isRebootRequiredForModemConfigChange() {
        String rebootRequired = SystemProperties.get(
        String rebootRequired = SystemProperties.get(
                TelephonyProperties.PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE);
                TelephonyProperties.PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE);
        log("isRebootRequiredForModemConfigChange: isRebootRequired = " + rebootRequired);
        return !rebootRequired.equals("false");
        return !rebootRequired.equals("false");
    }
    }


@@ -234,6 +237,9 @@ public class PhoneConfigurationManager {
                    + finalMultiSimConfig);
                    + finalMultiSimConfig);
            PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
            PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
            pm.reboot("Switching to " + finalMultiSimConfig);
            pm.reboot("Switching to " + finalMultiSimConfig);
        } else {
            log("setMultiSimProperties: Rebooting is not required to switch multi-sim config to "
                    + finalMultiSimConfig);
        }
        }
    }
    }


+1 −1
Original line number Original line Diff line number Diff line
@@ -419,7 +419,7 @@ public class RadioConfig extends Handler {


            if (DBG) {
            if (DBG) {
                logd(rr.serialString() + "> " + requestToString(rr.mRequest)
                logd(rr.serialString() + "> " + requestToString(rr.mRequest)
                        + "numOfLiveModems = " + numOfLiveModems);
                        + ", numOfLiveModems = " + numOfLiveModems);
            }
            }


            try {
            try {