Gaia/Settings/docs/Operator Settings

From MozillaWiki
< Gaia‎ | Settings‎ | docs
Jump to: navigation, search


The panel is used to configure settings regarding making connection to the operators. Each setting is being managed by a separate module.

Preferred Network Type

The available settings of each device are determined by the capability of the device. For all devices users are allowed to select the network types they would like to connect. For example if the network type is set to "gsm", the device is limited to connect to a gsm network. If it is set to "wcdma/gsm-auto", the device can connect to 3G or 2G networks depending on the conditions.

There are various combination of possible network types. To display user friendly descriptions for each network type, for each combination we create a map from network types to strings. For example, on devices that support only GSM, the type "wcdma/gsm-auto" is displayed as "Auto". But on devices that support both GSM and LTE, the same type is displayed as "Auto (2G/3G)". The mapping is done in "SupportedNetworkTypeHelper"(js/supported_network_type_helper.js).

After the user select a network type, we use a gecko API to set the selected one. Note that gecko does not keep record of the setting across reboot, so we keep the setting under "" and set it in system app upon starting up.

Roaming Preference

Roaming preference is only available on CDMA devices.


Operator selection is only available on GSM devices. Users are allowed to select an operator they would like to connect with or simply enable automatic selection.

To provide better user experience, users can toggle the check box for automatic selection at anytime even when the device is searching for operators or connecting to one of them. However, toggling the setting and searching can block each other. When the device is searching but the user does not want to wait and would like to switch back to automatic selection, we need to "queue" the action of enabling automatic selection.

"MobileConnectionWrapper"(js/panels/operator_settings/models/mobile_connection_wrapper.js) keeps track the state of a mobile connection object so others can do actions at the right timing. "AutoSelectionModel"(js/panels/operator_settings/models/auto_selection_model.js) can then know the state of the mobile connection object and does the user request later when the object becomes idle.