Closed Bug 883298 Opened 11 years ago Closed 11 years ago

[FTU] Check whether there is no need to retrieve the APN settings from the apn.json database

Categories

(Firefox OS Graveyard :: Gaia::First Time Experience, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaoo, Assigned: jaoo)

Details

Attachments

(1 file, 1 obsolete file)

The FTU app is retrieving the APN settings from the apn.json database directly. There might be no need to retrieve them from there since the preferred APN settings are already stored into the setting database. Remember the operator variant logic retrieves the APN settings from the apn.json database and store them into the settings database on boot. This bug is for checking if that is possible since there might be race-condition issues.
Assignee: nobody → josea.olivera
Attached patch v1 (obsolete) — Splinter Review
Just a clean up in the FTU app about the old APN settings architecture. Ken, your feedback is really appreciate!, Fernando, could you take a look please? Thanks!
Attachment #801624 - Flags: review?(fernando.campo)
Attachment #801624 - Flags: feedback?(kchang)
Comment on attachment 801624 [details] [diff] [review]
v1

Review of attachment 801624 [details] [diff] [review]:
-----------------------------------------------------------------

Just couple of style nits, but seems nice to me. Only tested it on normal conditions, I'm not sure how to provoke the apn not to be loaded at first.

::: apps/communications/ftu/js/data_mobile.js
@@ +51,5 @@
> +    // enabling data calls.
> +    var _self = this;
> +    function ensureAPNSettings() {
> +      var req = _self.settings.createLock().get('ril.data.apnSettings');
> +      req.onsuccess = function() {

nit: better if function is not anonymous

@@ +55,5 @@
> +      req.onsuccess = function() {
> +        var apnSettings = req.result['ril.data.apnSettings'];
> +        if (apnSettings) {
> +          if (callback) {
> +            callback();

nit: if (apnSettings && callback)
Attachment #801624 - Flags: review?(fernando.campo) → review+
Attached patch v2Splinter Review
Fix unit test failures. Fernando, would you review this patch again please? Thanks.
Attachment #801624 - Attachment is obsolete: true
Attachment #801624 - Flags: feedback?(kchang)
Attachment #803116 - Flags: review?(fernando.campo)
Comment on attachment 803116 [details] [diff] [review]
v2

Travis failing but not related to the changes.

Thanks for your work!
Attachment #803116 - Flags: review?(fernando.campo) → review+
https://github.com/mozilla-b2g/gaia/commit/da4cb0c60f61e112c4299444d4846485499721a4
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Backed out because either this or bug 912904 was causing Gaia UI Test failures.
https://github.com/mozilla-b2g/gaia/commit/70800e30b4e8f1162d32bcff4228216b524ffee2

https://tbpl.mozilla.org/php/getParsedLog.php?id=27715778&tree=B2g-Inbound
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://github.com/mozilla-b2g/gaia/commit/4b14d71cfbafa1bdd3ae0766b5d2f5c7a36810dc

Landed again after checking the failure is not related to the changes. Sorry for the noise.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: