Closed Bug 1028502 Opened 10 years ago Closed 10 years ago

Retain Add Contact activity in Multi-Tasking Scenarios

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
2.1 S5 (26sep)
tracking-b2g backlog

People

(Reporter: rmacdonald, Assigned: arcturus)

Details

When attempting to add a contact from dialer or from email, the add contact dialog immediately disappears (without saving) if the app is moved to the background. This applies in task switching and edge swipe scenarios.

Steps to reproduce

Email:
Create new message
Tap on add contact
Return to the home screen and relaunch email

Actual Behaviour
Upon return to email or dialer, the add contact activity is gone and any information is lost.

Expected Behaviour
Retain the add contact activity  

Dialer:
Enter a phone number in the dialer
Tap on add as contact button
Tap on add new contact
Return to the home screen and relaunch email
Flagging Alive and Etienne for assignments and recommendations. Thanks!
Flags: needinfo?(etienne)
Flags: needinfo?(alive)
Because of bug https://bugzilla.mozilla.org/show_bug.cgi?id=931339 we cannot have the two 'same' activity instances at the same time. For example, if email is adding contact, and the user swipes to the dialer to add another contact, the second contact activity will get no system message.

Before gecko fix the problem, we could try to keep the activity alive until:
#1 A timer goes by.
#2 There's a new activityrequest which is not related to the previous background activity.

We need to be careful here because #2 may not be easy to find.
Assignee: nobody → alive
Flags: needinfo?(alive)
Might be a long-standing issue, but adding qawanted to check.
Keywords: qawanted
BTW, contact activity seems to close itself when it goes to background.
So this involves not only system app fix.
Moving this part to the contacts app, since the main issue is [1].
I think we should not do that for inline activities.

[1]https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contacts/js/contacts.js#L833
Component: Gaia::System::Window Mgmt → Gaia::Contacts
Flags: needinfo?(etienne)
QA Contact: jsmith
We added that ages ago cause we were having a problem with the keyboard, but taking a look now it doesn't look like a good decision.

Happy to disable in contacts, but first would like to check we won't have any regression.
QA Contact: ddixon
This issue DOES reproduce on Flame 2.0, Flame 2.1, Flame 1.4, Buri 2.1, Buri 1.4, Buri 1.3, Open_C 2.1, Open_C 1.4

Results listed here were all found using the following STR from comment 0: 

Dialer:
Enter a phone number in the dialer
Tap on add as contact button
Tap on add new contact
Return to the home screen and relaunch email

Actual Results: Upon return to email or dialer, the add contact activity is gone and any information is lost.

This issue DOES reproduce in ALL of the following: 

Environmental Variables: 
Device: Flame 2.0
Build ID: 20140624093150
Gaia: 7260d58fb2b4665ebe614f94d822b8407bd95f58
Gecko: 23457787dfa1
Version: 32.0a2 (2.0)
Firmware Version: v122

Environmental Variables: 
Device: Flame Master
Build ID: 20140624090716
Gaia: 2944695a89c3281d49dbe5ff9c0cd26c8318e2ba
Gecko: 215b93e07e1d
Version: 33.0a1 (Master)
Firmware Version: v122

Environmental Variables:
Device: Flame 1.4
Build ID: 20140610034016
Gaia: c39db439202b29897bee9896bc789e6782809f3a
Gecko: edd648be2b07
Version: 30.0 (1.4)
Firmware Version: v122

Environmental Variables:
Device: Buri Master
Build ID: 20140624090716
Gaia: 2944695a89c3281d49dbe5ff9c0cd26c8318e2ba
Gecko: 215b93e07e1d
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg

Environmental Variables:
Device: Buri 1.4
Build ID: 20140610034016
Gaia: c39db439202b29897bee9896bc789e6782809f3a
Gecko: edd648be2b07
Version: 30.0 (1.4)
Firmware Version: v1.2device.cfg

Environmental Variables:
Device: Buri 1.3
Build ID: 20140502004836
Gaia: 667539f1ed4becc45b182a5f1046221d3eeb9e7c
Gecko: 084f8c2adae5
Version: 28.0 (1.3)
Firmware Version: v1.2device.cfg

Environmental Variables:
Device: Open_C Master
Build ID: 20140624090716
Gaia: 2944695a89c3281d49dbe5ff9c0cd26c8318e2ba
Gecko: 215b93e07e1d
Version: 33.0a1 (Master)
Firmware Version: P821A10V1.0.0B06_LOG_DL

Environmental Variables:
Device: Open_C 1.4
Build ID: 20140610034016
Gaia: c39db439202b29897bee9896bc789e6782809f3a
Gecko: edd648be2b07
Version: 30.0 (1.4)
Firmware Version: P821A10V1.0.0B06_LOG_DL
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Keywords: qawanted
issue is not a regression
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
blocking-b2g: 2.0? → backlog
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Blocks: 1028800
Alive: are you still working on the fix described in comment #2?

This bug is confusing because it seems to be about a trivial fix to the Contacts app. In fact, though, the key thing is a non-trivial but very important fix to the window management code.  

Do we need a new bug to separate the simple contacts fix from the hard window manager fix?

Gallery bug 1028800 is blocked on the window manager fix, and Punam has marked this bug as the one that blocks hers.
Flags: needinfo?(alive)
(In reply to David Flanagan [:djf] from comment #10)
> Alive: are you still working on the fix described in comment #2?
> 
> This bug is confusing because it seems to be about a trivial fix to the
> Contacts app. In fact, though, the key thing is a non-trivial but very
> important fix to the window management code.  
> 
> Do we need a new bug to separate the simple contacts fix from the hard
> window manager fix?
> 
> Gallery bug 1028800 is blocked on the window manager fix, and Punam has
> marked this bug as the one that blocks hers.

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1008928 long time ago to fix it in gaia side but not actively on it and UX filed this bug. I tended to dupe it to this bug but in the long run this becomes a contact bug, so I filed bug 1032068 again in system app.

I dare not to say when it will be completed but it's in my queue after I finish my blocker.
Flags: needinfo?(alive)
No longer blocks: 1028800
The system part fix is merged. The fix in contact side is pretty easy now. Francisco, maybe you are interested to take by comment 7.
Assignee: alive → nobody
Flags: needinfo?(francisco)
Hi Alive,

I'll be in PTO since tomorrow, but will schedule this for next sprints.

Thanks a lot
Flags: needinfo?(francisco)
Target Milestone: --- → 2.1 S3 (29aug)
Assignee: nobody → francisco
Target Milestone: 2.1 S3 (29aug) → 2.1 S4 (12sep)
Target Milestone: 2.1 S4 (12sep) → 2.1 S5 (26sep)
Not closing as duplicated, but this fix:

https://github.com/mozilla-b2g/gaia/commit/b6a0b13dc9863d2c2c5e756d5a863d5d3b345b89

Solves the same problem since we removed the activity cancelation based on contact app going to background.

\o/
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.