Closed Bug 1083053 Opened 10 years ago Closed 10 years ago

[Midori] The screenshot preview window still overlays an app when switching apps

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect, P2)

defect

Tracking

(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.0M verified, b2g-v2.1 verified, b2g-v2.2 verified)

VERIFIED FIXED
2.1 S8 (7Nov)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- verified
b2g-v2.0M --- verified
b2g-v2.1 --- verified
b2g-v2.2 --- verified

People

(Reporter: sync-1, Assigned: lchang)

References

Details

(Whiteboard: [Triage_EM_20])

Attachments

(3 files, 1 obsolete file)

FFOS: FFOS 2.0
 Mozilla Build ID: 20140916000205
 
 Created an attachment (id=972071)
 jrdlog
 
 DEFECT DESCRIPTION:
 Can not launch browser after preview screenshots from status bar
 
 REPRODUCING PROCEDURES:
 1.Launch browser->click the power key and home key at the same time
 2.Launch status bar->click the screenshots notification to preview the screenshots
 3.Click the home button->click the browser icon,it will auto switch to preview screenshots interface->KO
 
 
 Comments
 
 
 EXPECTED BEHAVIOR:
 KO:It should launch browser
 
 ASSOCIATE SPECIFICATION:
 
 TEST PLAN REFERENCE:
 
 TOOLS AND PLATFORMS USED:
 
 USER IMPACT:
 MID
 
 REPRODUCING RATE:
 5/5
 
 For FT PR, Please list reference mobile's behavior:
Attached file jrdlog
[Blocking Requested - why for this release]:
Flags: needinfo?(wehuang)
Hi Keven:

I guess this should be Gaia/Gecko's issue but not sure, would you help judge and assign proper team to look into? Thank you.
Flags: needinfo?(wehuang) → needinfo?(kkuo)
Hi! Evelyn,

Per discussion, please take a look. Thanks

--
Keven
Flags: needinfo?(kkuo) → needinfo?(ehung)
Seems a gaia window management issue. 
Luke, could you take a look? It's on v2.0. I guess we could reproduce it on Flame.
Flags: needinfo?(ehung) → needinfo?(lchang)
Yes, it can be reproduced on flame/master. Apart from browser, it happens on every apps. I'll take a look at it.
Assignee: nobody → lchang
Status: NEW → ASSIGNED
Flags: needinfo?(lchang)
Attached patch workaround patch (obsolete) — Splinter Review
We currently use the MozActivity to preview the screenshot by gallery app. By design is that the activity window belongs to the foreground app. That's why we see the screenshot again after relaunching the app if we don't close it in advance. To change this behavior is a big task which is too risky to land on v2.0 branch.

The attachment is a workaround that we close the preview window whenever its "visibilityState" is changed to "hidden". It, however, has a side effect that the preview window will be closed as well if we just want to turn the screen off.


Hi Wesly,

I'm not sure if it's able to fulfill the requirement. Could you help to confirm that? Thanks.
Flags: needinfo?(wehuang)
Dear Luke,

Whether can do different treatment according to parentapp,
if parentapp is app://system.gaiamobile.org/manifest.webapp,then it will be closed when the app is switched to background, else it will not be closed?
Or if active's parentapp is not foreground app, the active will be closed when the app is switched to background?
Thanks Luke, do you mean the patch can solve original issue, but will also close preview window after screen off, as a side effect? I feel compare with the original issue, this side effect is less trouble to user so it's a "good deal", but is there another way to solve issue w/o side effect?
Flags: needinfo?(wehuang) → needinfo?(lchang)
(In reply to Guoqiang.CHEN from comment #9)
> Or if active's parentapp is not foreground app, the active will be closed
> when the app is switched to background?

My patch is to ask the activity window to close itself because the system app currently doesn't know the purpose of each activity window. However, an activity window isn't able to know who is its caller and the caller's status.
(In reply to Luke Chang [:lchang] from comment #11)
> My patch is to ask the activity window to close itself because the system
> app currently doesn't know the purpose of each activity window.

That means I can't just force system app to close the activity window in certain cases because we don't know the activity window of gallery app is called by app or notification.

(In reply to Wesly Huang from comment #10)
> ..., but is there another way to solve issue w/o side effect?

A proper solution may need to change the behavior of mozActivity or use another mechanism to replace it. Either way is too risky, especially for v2.0.
Flags: needinfo?(lchang)
Thanks Luke, so per discussion, next steps are (pls feel free to correct)

1. confirm w/ partner if this "quick fix" w/ side effect is acceptable. (so far no better solution)

If yes for (1),
2. get gallery owner's review to decide if we can land it in master.
3. Triage it and get it to be a blocker for raising priority, also decide which branch(s) to land (depends on (2)).

Hi Chenguo:

No perfect solution here unfortunately, would you let us know if the proposed workaround in comment#7 works for you? Thanks.
Flags: needinfo?(Chenguoqiang)
Dear Wesly,

It works for me, thanks.
Flags: needinfo?(Chenguoqiang)
Thanks Chenguo!

@Luke: then per previous discussion next step is to discuss with gallery owner about the land target, would you help on that and let us know the result here, so we make proper decision in coming Triage? Thank you.
Flags: needinfo?(lchang)
Component: Gaia → Gaia::Gallery
Summary: [Midori][Browser]Can not launch browser after preview screenshots from status bar → [Midori] The screenshot preview window still overlays an app when switching apps
Attached file pull request to master
Hi David,

Could you please kindly take a look at this patch? It's a workaround because we need a quick fix on v2.0 for now. I'm not sure should it be also landed on master before we figure out a proper solution. If not, I'll recreate a pull request to v2.0 only. Thanks a lot.
Attachment #8508592 - Attachment is obsolete: true
Flags: needinfo?(lchang)
Attachment #8511833 - Flags: review?(dflanagan)
[Blocking Requested - why for this release]:
Partner's request.
blocking-b2g: --- → 2.0?
2.0 tag candidate for coming Triage.
Comment on attachment 8511833 [details] [review]
pull request to master

This patch looks good to me if you make the changes requested on github.

I'm okay landing it on master. Ideally there would be some better fix in the system app, though it is not clear to me what that fix is. Is there a followup bug that can be filed to address the underlying issue?
Attachment #8511833 - Flags: review?(dflanagan) → review+
Hi David,

Thanks for reviewing. I've addressed the comments.

For the followup issue, I'd like to file another bug and raise a discussion about the feasibility of using mozActivity with "disposition: window".
See Also: → 1090700
landed on master: https://github.com/mozilla-b2g/gaia/commit/5d0ffc09f69dd3efa6c2f4d220f61b681568b0ec
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Indeed huge user impact and patch already available, candidate to tag in coming 2.0 Triage.
Whiteboard: [Triage_EM_20]
[Tiage] tag for 2.0.
blocking-b2g: 2.0? → 2.0+
Comment on attachment 8511833 [details] [review]
pull request to master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): 2.0+ blocker.
[User impact] if declined: it confuses users that they may think the app can't be switch back from cards view.
[Testing completed]: yes.
[Risk to taking this patch] (and alternatives if risky): very low.
[String changes made]: N/A
Attachment #8511833 - Flags: approval-gaia-v2.0?
Presumably this needs to land on v2.1 as well? Please request approval for that as well if true :)
status-b2g-v2.1: --- → ?
Flags: needinfo?(lchang)
Target Milestone: --- → 2.1 S8 (7Nov)
Yes, it can be reproduced on v2.1, too.
Flags: needinfo?(lchang)
Comment on attachment 8511833 [details] [review]
pull request to master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): 2.0+ blocker.
[User impact] if declined: it confuses users that they may think the app can't be switch back from cards view.
[Testing completed]: yes.
[Risk to taking this patch] (and alternatives if risky): very low.
[String changes made]: N/A
Attachment #8511833 - Flags: approval-gaia-v2.1?
Attachment #8511833 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Attachment #8511833 - Flags: approval-gaia-v2.0? → approval-gaia-v2.0+
Verify passed, this issue can't be repro on Woodduck 2.0; Flame2.0&2.1&2.2
Attached: Verify_screenshot.mp4
Reproducing rate: 0/5

Woodduck build:
Gaia-Rev        cc690f8016b672475dc186bc7fd58aef45e684b7
Gecko-Rev       03d3ab62d5b07b915434f2d1d68495ad5915ecd2
Build-ID        20141118184148
Version         32.0

Flame 2.0 build:
Gaia-Rev        086a668942292168f312b3bb53e275fa0886fab1
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/a57b299c5cf2
Build-ID        20141117000200
Version         32.0

FLame 2.1 build:
Gaia-Rev        81160ad79e5b4c21967418dd63f1a1d08d77924e
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/3572aa3e6766
Build-ID        20141117001201
Version         34.0

FLame 2.2 build:
Gaia-Rev        ae3a84acaab80a5b35d5542d63e68462273c8a1b
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/2d0a51ef828d
Build-ID        20141117160200
Version         36.0a1
Status: RESOLVED → VERIFIED
Sorry to update the Flame build:
Flame 2.0 build:
Gaia-Rev        1ede2666f1e6c1b3fd3b282011caf0cbc59544b0
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/2bea026d4f86
Build-ID        20141118000207
Version         32.0

FLame 2.1 build:
Gaia-Rev        1b231b87aad384842dfc79614b2a9ca68a4b4ff3
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/95fbd7635152
Build-ID        20141118001204
Version         34.0

FLame 2.2 build:
Gaia-Rev        4aee256937afe9db2520752650685ba61ce6097d
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/084441e904d1
Build-ID        20141118144012
Version         36.0a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: