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

Commit 248b8fd7 authored by Pavel Zhamaitsiak's avatar Pavel Zhamaitsiak
Browse files

Update Wi-Fi Calling mode when WFC is enabled/disabled

Bug: 19644042
Change-Id: Ie9cfe8c7f416985e4f78d48159d83191a19ac599
parent 71099329
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ public class WifiCallingSettings extends SettingsPreferenceFragment

        int wfcMode = ImsManager.getWfcMode(context);
        mButtonWfcMode.setValue(Integer.toString(wfcMode));
        mButtonWfcMode.setSummary(getWfcModeSummary(context, ImsManager.getWfcMode(context)));
        mButtonWfcMode.setSummary(getWfcModeSummary(context, wfcMode));

        mButtonWfcRoam.setChecked(wfcEnabled
                && (wfcMode != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY)
@@ -165,9 +165,10 @@ public class WifiCallingSettings extends SettingsPreferenceFragment

        ImsManager.setWfcSetting(context, isChecked);

        int wfcMode = ImsManager.getWfcMode(context);
        mButtonWfcMode.setSummary(getWfcModeSummary(context, wfcMode));
        mButtonWfcMode.setEnabled(isChecked);
        boolean wfcHandoffEnabled = (ImsManager.getWfcMode(context)
                != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY);
        boolean wfcHandoffEnabled = (wfcMode != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY);
        mButtonWfcRoam.setEnabled(isChecked && wfcHandoffEnabled);
        mButtonWfcRoam.setChecked(isChecked && wfcHandoffEnabled
                && ImsManager.isWfcRoamingEnabledByUser(context));