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

Commit 30cfbec7 authored by Manjunatha Prabhu's avatar Manjunatha Prabhu Committed by Gerrit - the friendly Code Review server
Browse files

Settings: SMS provisioning changes

- Enable or Disable WiFi Calling preference in response to
  provisioning message sent by operator.
- Added flag to control the feature.

Change-Id: I0c6304c3f854e925a551e775ba05d1087e40bb20
CRs-Fixed: 1080231
parent 1d5becb3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -92,4 +92,7 @@
    <bool name="config_hotspot_need_show_activated_dialog">false</bool>
    <bool name="config_keep_hotspot_on_10mins_default">false</bool>
    <bool name="hotspot_show_alert_for_open_security">false</bool>

    <!--Config to enable/disable Wi-Fi Calling based on provisioning sms  -->
    <bool name="config_provision_wificalling_pref">false</bool>
</resources>
+12 −0
Original line number Diff line number Diff line
@@ -125,9 +125,11 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
    private UserManager mUm;

    boolean mIsNetworkSettingsAvailable = false;
    boolean mProvisioningVWiFiEnabled  = false;

    private static final int MANAGE_MOBILE_PLAN_DIALOG_ID = 1;
    private static final String SAVED_MANAGE_MOBILE_PLAN_MSG = "mManageMobilePlanMessage";
    private final String KEY = "persist.sys.provisioning";

    private Preference mButtonWfc;
    private boolean mEnhancedWFCSettingsEnabled = false;
@@ -430,6 +432,16 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
            });
        } else {
            mButtonWfc = (PreferenceScreen) findPreference(KEY_WFC_SETTINGS);
            mProvisioningVWiFiEnabled = this.getResources().
                    getBoolean(R.bool.config_provision_wificalling_pref);
                if (mProvisioningVWiFiEnabled) {
                    String value = SystemProperties.get(KEY,"false");
                    if (!Boolean.parseBoolean(value)) {
                        final Context context = getActivity();
                        ImsManager.setWfcSetting(context, false);
                    }
                    mButtonWfc.setEnabled(Boolean.parseBoolean(value));
                }
            removePreference(KEY_WFC_ENHANCED_SETTINGS);
        }