Closed Bug 961938 Opened 10 years ago Closed 10 years ago

[DSDS][MMS] Switching data confirmation message will pop up twice.

Categories

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

x86_64
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, b2g-v1.3 verified)

VERIFIED FIXED
1.3 C3/1.4 S3(31jan)
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- verified

People

(Reporter: echu, Assigned: steveck)

References

Details

(Whiteboard: dsdsrun1.3-2)

Attachments

(2 files)

When try to download MMS attachment of non-primary data call SIM, there will be a warning message pops up asking whether user want to switch data call or not, once confirm it, message will pop up again.

* Build Number  
Fugu
Gaia      ee25b0e45649d2955f340ce4f71ad55712dd0fab
Gecko     913cf2b92845441c9578787362ddad6f2ac15df6
BuildID   20140121095108
Version   28.0a2

* Reproduce Steps
1. Send a MMS to non-primary data call SIM.
2. Press download button of the message.
3. A confirmation message pops up, select yes.
4. the message in step 3 will pop up again.

* Expected Result
Confirmation window should only pop up once.

* Actual Result
Pop up twice.

* Occurrence rate
100%
Since we use settings the SIM outgoing data switch for and gecko side could only be notice the SIM changes asynchronously, gaia could only put the message retrieval to timeout to avoid the message retrieval calls earlier than gecko received the settings change. But it's not a robust way to solve this issue.

Hi Gene, it would be great if you could propose some solution gecko without significant changes. But I can put the message retrieval to timeout for quick fix first if the changes is complicate.
Assignee: nobody → schung
Flags: needinfo?(gene.lian)
Bug 961934 addresses a potential issue in Gecko. That is, if we cannot successfully switch the data connection, the prompt would keep popping up until succeed.

I think a long-term solution is need a onchange event at somewhere to reflect the data connection change. Hsin-yi, any thoughts?
No longer depends on: 961934
Flags: needinfo?(htsai)
Depends on: 961934
Flags: needinfo?(gene.lian)
(In reply to Gene Lian [:gene] (PTO Dec. 25 ~ Jan. 5) from comment #2)
> Bug 961934 addresses a potential issue in Gecko. That is, if we cannot
> successfully switch the data connection, the prompt would keep popping up
> until succeed.
> 
> I think a long-term solution is need a onchange event at somewhere to
> reflect the data connection change. Hsin-yi, any thoughts?

Yes, agree! We noticed this issue at bug 922584 comment#8. In the long term, we need a new API for managing connections. And the connection states should be exposed to it.
Flags: needinfo?(htsai)
See Also: → 922584
Hi Joe,
this issue could be reproduced every time. It's a annoying use experience but it won't break the functionality. We could propose a gaia workaround like comment 1 said for short term fixing if urgent, but having a new API support from gecko should be the robust solution for long term. Should we treat this issue as 1.3 block and apply the workaround for 1.3, or postpone it until gecko API landed?
Flags: needinfo?(jcheng)
let's triage this.
1.3?
blocking-b2g: --- → 1.3?
Flags: needinfo?(jcheng)
This seems the root cause of bug 961934 which is marked as 1.3+.
(In reply to Hsin-Yi Tsai  [:hsinyi] from comment #6)
> This seems the root cause of bug 961934 which is marked as 1.3+.

Gene/ Hsin-Yi
I will verify it again once bug 961934 landed, thanks!
Just had a sudden thought while discussing with Steve and Hsinyi. Since fugu has a limitation where only the primary sim for data can have data registration registered, gaia can use datachange event to know if the primary sim for data has been switched or not.

Steve, you can try to listen to mozMobileConnections[x].ondatachange [1], and check if mozMobileConnections[x].data.state [2] is 'registered' or not.
For other platforms, you might also check mozMobileConnections[x].data.state before retrieving, since data calls can only be established when data registration is registered.

Please let us know if you have any questions or concerns and thanks for the great help! We will try to work on bug 922584 faster.


[1] https://developer.mozilla.org/en-US/docs/Web/API/MozMobileConnection.ondatachange
[2] https://developer.mozilla.org/en-US/docs/Web/API/MozMobileConnectionInfo.state
1.3+
blocking-b2g: 1.3? → 1.3+
since 1.3+ is the highest priority now, set target milestone, please make the change if it doesn't work. thanks
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
Attached file Link to github
Hi Julien, here is the patch that listen to datachange event for retrieving the mms when target connection is resisted. Please feel free to provide any though about this solution.
Attachment #8365825 - Flags: review?(felash)
Comment on attachment 8365825 [details] [review]
Link to github

comments on github

I'd like another review before giving r+ but this looks good!
Attachment #8365825 - Flags: review?(felash)
Comment on attachment 8365825 [details] [review]
Link to github

I've update the patch base on your comments with some enhancement, thanks!
Attachment #8365825 - Flags: review?(felash)
Comment on attachment 8365825 [details] [review]
Link to github

unit tests issues, and I think the "switchSim" function should move to Settings.

So, still not r+ing, but I was very close. I think we can try to finish this before my day in San Francisco finishes, right ?
Attachment #8365825 - Flags: review?(felash)
Comment on attachment 8365825 [details] [review]
Link to github

Ah, it make sense to move sim switch to Settings. Thanks for the suggestion!
Attachment #8365825 - Flags: review?(felash)
Comment on attachment 8365825 [details] [review]
Link to github

r=me

I couldn't test on a DSDS device but receiving MMS still works fine in a single SIM device, so I'll trust you for DSDS. The code looks fine though.

This is probably a work around that works only for DSDS devices though, (setting a MMS service Id triggering the datachange event) so we'll need to revisit for DSDA.
Attachment #8365825 - Flags: review?(felash) → review+
master: 9497e89bbf6060d1a837a7ccbf396f8c359eb13b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I was not able to uplift this bug to v1.3.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1.3, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1.3
  git cherry-pick -x -m1 9497e89bbf6060d1a837a7ccbf396f8c359eb13b
  <RESOLVE MERGE CONFLICTS>
  git commit
Flags: needinfo?(schung)
will do the uplift
Flags: needinfo?(schung) → needinfo?(felash)
only jshint conflicts:

v1.3: 74e5cc9f4c239d35f984e3e960da81a3c7342e6a
Flags: needinfo?(felash)
Verified.

Fugu - 
Gaia      bb36b4164d3e51ca04b612e507e1178f80bf240d
Gecko     4227240a4d3e1e418ced160c2a48cb454d7b5645
BuildID   20140204104742
Version   28.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: