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

Commit 76491088 authored by Suresh Koleti's avatar Suresh Koleti Committed by takeshi tanigawa
Browse files

IMS: Update default Wifi calling mode during power up

If user powered up with WFC editable SIM card and modify the
WFC preference, and rebooted the device with a non editable WFC
SIM card, then user will not have a choice to pickup the default
WFC mode.

To fix this issue, update default WFC mode during power up,
if WFC UI option is non editable for inserted SIM card.

Test: manual - Checked that WFC mode was changed to default with a non
editable WFC SIM card
Bug: 37621367

Change-Id: Ib47022e23fafc5ea1b4424605577cf11ed0a1b6b
parent be6cb67b
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -864,6 +864,18 @@ public class ImsManager {
        setWfcModeInternalForSlot(wfcMode);
    }

    /**
     * Changes the WFC mode to its default value for Carriers with non-editable WFC settings.
     */
    private void updateDefaultWfcMode() {
        if (DBG) log("updateDefaultWfcMode");
        if (!getBooleanCarrierConfigForSlot(
                CarrierConfigManager.KEY_EDITABLE_WFC_MODE_BOOL)) {
            setWfcModeForSlot(getIntCarrierConfigForSlot(
                    CarrierConfigManager.KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT));
        }
    }

    /**
     * Returns the user configuration of WFC preference setting
     *
@@ -1440,6 +1452,7 @@ public class ImsManager {
        boolean isNetworkRoaming = TelephonyManager.getDefault().isNetworkRoaming();
        boolean available = isWfcEnabledByPlatformForSlot();
        boolean enabled = isWfcEnabledByUserForSlot();
        updateDefaultWfcMode();
        int mode = getWfcModeForSlot(isNetworkRoaming);
        boolean roaming = isWfcRoamingEnabledByUserForSlot();
        boolean isFeatureOn = available && enabled;