Closed Bug 1023338 Opened 6 years ago Closed 6 years ago

[WAP Push][CP] If a second configuration message is received with the same apn name than a previous stored one, it is not selected by default (follow-up bug 1015875)

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.0 S5 (4july)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: isabelrios, Assigned: albert)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached image 2014-06-10-11-26-39.png
Buri 2.0 build (06/10):

Gecko-c146f3f
Gaia-3b2ae74

STR
-Receive a OMA CP message, process it.
-Go to Settings -> Cellular & Data -> Data settings and check that the APN received has been selected by default
-Receive the another OMA CP message with the same configuration, same APN name
-Go to Settings -> Cellular & Data -> Data settings and check that the APN received has been selected by default

EXPECTED
The lastest APN received is the one selected by default

ACTUAL
If an APN just received has the same name than an APN already stored, it will never be selected by default when is received

Please see screenshot attached. The second APN listed with Telefonica 1 name was received the latest, but it is not selected by default as there was already one Telefonica 1 APN stored.
Oh, really bad. This was fixed in bug 998914. In bug 1015875 we set the APN received through the OMA CP message in the 'ril.data.apnSettings' setting without taking care of other APNs with the same name could be already stored in the 'ril.data.cp.apns'. We will take care of that in this bug as a follow-up bug of bug 1015875. We just need to add the 'hashCode' property to the APNs being received through the OMA CP messages. That way the last APN received will be the one selected in the APN panels in the setting app.
See Also: → 1015875
Summary: [WAP Push][CP] If a second configuration message is received with the same apn name than a previous stored one, it is not selected by default → [WAP Push][CP] If a second configuration message is received with the same apn name than a previous stored one, it is not selected by default (follow-up bug 1015875)
blocking as the bug this is related was a cert blocker. Adding qawanted to check 1.4.
blocking-b2g: 2.0? → 2.0+
Keywords: qawanted, regression
Assignee: nobody → acperez
Target Milestone: --- → 2.0 S5 (4july)
Attached file Patch
Added an id to external APNs coming from wappush, so instead of having same name/carrier each one can be identified.
Attachment #8446669 - Flags: review?(josea.olivera)
Comment on attachment 8446669 [details]
Patch

Looks promising, specially because it solves the issue with a few changes. Sadly the issue raised in this bug cannot be caught in the WAP PUSH app tests as it store the APN and that's it. We could add a simple test in the settings app in which we test the APN pre-selection works as expected even with the id APN property added in this patch for every APN installed through the WAP PUSH app.
Attachment #8446669 - Flags: review?(josea.olivera) → feedback+
Comment on attachment 8446669 [details]
Patch

Added requested tests.
Attachment #8446669 - Flags: review?(josea.olivera)
Comment on attachment 8446669 [details]
Patch

(In reply to Albert [:albert] from comment #5)
> Comment on attachment 8446669 [details]
> Patch
> 
> Added requested tests.

Great, I've tested this on a device receiving OMA CP message from a real server and seems to work fine a nothing is broken taking this patch. Tests pass so we are ready to go. Before landing this I'd like to request Isabel a quick test from her side.

Albert, you could land this when Isabel give us the ok.

Thanks for taking care of it
Attachment #8446669 - Flags: review?(josea.olivera) → review+
Flags: needinfo?(isabelrios)
Just checked the patch on master and it seems to be working fine.
Good work! Thank you!
Flags: needinfo?(isabelrios)
Master: https://github.com/mozilla-b2g/gaia/commit/5406c1c0118819628d1deb9b58f9e9ae364b4825
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Keywords: qawanted
Bug tested by Juanjo, user can see correct behavior in:

https://www.dropbox.com/s/kksner4u0zkvo71/MOV_0095.mp4

Flame
2.1
Gecko-329b2e4
Gaia-da11dba

2.0
Gecko-329b2e4
Gaia-da11dba
You need to log in before you can comment on or make changes to this bug.