Closed Bug 998914 Opened 10 years ago Closed 10 years ago

[Settings] Cannot preselect the APN correctly if there are several APNs with the same carrier name (follow-up bug 991628)

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S6 (25apr)
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: isabelrios, Assigned: jaoo)

Details

(Whiteboard: [cert])

Attachments

(3 files, 3 obsolete files)

Seen with 1.4 (04-21) buri build:
Gecko-3f64d65
Gaia-961f7d4

STR
Receive via OMA CP and store the same apn more than once (for example, three times)
Go to Settings-> Cellular & Data -> Data settings.
Select the third apn with the same name
Tap on Ok
Go back to Data settings

EXPECTED
The apn selected previously is kept as selected

ACTUAL
The apn selected previously is deselected and the first one with the same name is selected instead.
Assignee: nobody → josea.olivera
This is a cert blocker in 1.3.
blocking-b2g: --- → 1.3?
Summary: Follow up to bug 991628 [Settings][OMA CP] Not possible to select an APN received via OMA CP message if there is already one with the same name → [Settings] Cannot preselect the APN correctly if there are several APNs with the same carrier name (follow-up bug 991628)
Attached patch WIP (obsolete) — Splinter Review
blocking-b2g: 1.3? → 1.3+
Whiteboard: [cert]
Attached patch v1 (obsolete) — Splinter Review
Arthur, bug 991628 was filed because the user wasn't able to select an APN in case there were some of them with the same name in the list (the first APN in the list was always selected). We fixed that by assigning a hash code for each APN in the list so we were to able to switch between APNs. There was still an issue I didn't notice (my fault sorry) and this is what I fix here. Let me explain what is going on. We allowed the user to switch between APNs by using the hash code mention before but we didn't store the hash code for the APN selected. It causes we cannot (pre)select the APN selected by the user when she/he opens the APN list panel again. This patch stores the hash code so we can (pre)select the APN correctly.

I've added some unit test for the change.

Would you mind to review this work please? Thanks!
Attachment #8410139 - Attachment is obsolete: true
Attachment #8410361 - Flags: review?(arthur.chen)
Comment on attachment 8410361 [details] [diff] [review]
v1

The patch looks good to me. I've added some comments regarding the tests, please have a look, thanks!
Attachment #8410361 - Flags: review?(arthur.chen)
Attached patch v2 (obsolete) — Splinter Review
Arthur, thanks for the previous review. This version of the patch addresses the comment you made. Could you take a look a it again please? Thanks.
Attachment #8410361 - Attachment is obsolete: true
Attachment #8411642 - Flags: review?(arthur.chen)
Comment on attachment 8411642 [details] [diff] [review]
v2

r=me with the nits addressed, thanks!
Attachment #8411642 - Flags: review?(arthur.chen) → review+
Thanks for the reviews Arthur.

Travis goes green. Tests pass and everything seems to work correctly. Landed in Gaia master branch at https://github.com/mozilla-b2g/gaia/commit/88452273be2f912d250e661c29b5a7c1af7aa012
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S6 (25apr)
Attached patch v3 r=arthurccSplinter Review
This is the version we landed. Carrying out r=arthurcc.

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

This is the follow-up patch from bug 991628 we requested approval and merged in 1.3 branch a few days ago. Please, ping me if you need further information about why this follow-up is needed.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): DSDS stuff / bug 962453
[User impact] if declined: If there are some APNs with the same carrier name the user is not able to switch correctly between them. 
[Testing completed]: Yes, unit test added too.
[Risk to taking this patch] (and alternatives if risky): Low, in fact this is a corner case. I mean all the APN in the apn.json data base have different names. Only APNs set through OMA client provisioning (CP) could have the same carrier name for all of them and the carrier rarely sends this APNs to the device.
[String changes made]: No changes.
Attachment #8411642 - Attachment is obsolete: true
Attachment #8412453 - Flags: approval-gaia-v1.3?(fabrice)
Attachment #8412453 - Flags: approval-gaia-v1.3?(fabrice) → approval-gaia-v1.3+
Needs rebasing for v1.3 uplift.
Flags: needinfo?(josea.olivera)
Already checked on 1.3, this is working fine now.
Buri 1.3 04-30 build:
Gecko-a8664b5
Gaia-a8f5ca7

Thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: