mozilla-b2g/gaia — pull request #7203 by crh0716 (2012-12-27 08:43:00+00:00)
Title: Bug 823506 - Use dialogs for call forwarding

To use dialogs for call forwarding, we need to make sure that all related settings exist in mozSettings because the openDialog function gives values to inputs in the dialogs using mozSettings values.
One more thing is that querying call forwarding options multiple times in a short period leads query error very easily. Some mechanisms were added to avoid the problem.

The new init process was changed as the following:
- Get call forwarding options from gMobileConnection.
- Set corresponding values to mozSettings based on the options.
- Update entries based on the options.
- Add observers for monitoring mozSettings changes.

I separated the UI updating code from the original getCallForwardingOption function for better reusing.