If thr change is not allowed, we will set the preference back to the
original value in the onerror function. Or if it is changed to other
values, the UI could still reflects the change as we will be notifiled by
the CLIR change event.
2014/5/2 下午11:29 於 "Jose Antonio Olivera Ortega" <notifications@github.com>
寫道：

> In apps/settings/js/call.js:
>
> > @@ -635,39 +635,24 @@ require([
> >        cs_enableTabOnCallWaitingItem(false);
> >        cs_enableTapOnCallForwardingItems(false);
> >
> > -      var req = _mobileConnection.getCallingLineIdRestriction();
>
>  If I understand this correctly, we set CLIR mode upon starting up the
> phone based on the user preference.
>
> This is correct.
>
> The user preference also gets updated when CLIR mode changes. Which means
> the user preference stored
> in the settings DB is the real value.
>
> Nope, the real value is the one coming from the network.
>
> I guess it should be okay to refresh the UI based on the users
>
> preference? Unless CLIR mode is able to be changed from the carrier side.
>
> The user can change the CLIR mode but this change might not be allowed for
> the ICC card in use. The carrier might not allow changing this
> supplementary service. This is the reason why current logic request the
> CLIR value right after the user changes the value in the UI.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mozilla-b2g/gaia/pull/18408/files#r12233673>
> .
>