Closed Bug 1059093 Opened 10 years ago Closed 10 years ago

[NFC] The sharable content cannot be shared after viewing the received file from notification

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ashiue, Assigned: gduan)

References

Details

Attachments

(2 files)

Attached file no_shrinking_UI.log
Gaia      6e804a42ab90f4251c7fe8c68731dc1c6abd8006
Gecko     https://hg.mozilla.org/mozilla-central/rev/0753f7b93ab7
BuildID   20140826181551
Version   34.0a1

This seems a side effect from bug 1033964.  
Please refer: http://youtu.be/q17VaGaUnwc 

STR:
1. Phone A receive an image via bluetooth
2. Phone A launch contact app and open a contact view which can share (or content of any shareable app)
3. Phone A open the image via notification
4. Phone A tap "<" button to close the image (current show the contact view open at step 2)
5. Tap two phones together

Expected result:
Shrinking UI show correctly and can be shared

Actual result:
No shrinking UI so that the contact cannot be shared unless (1) relaunch app or (2) let app running at background and then run at foreground again
[Blocking Requested - why for this release]:
blocking-b2g: --- → 2.1?
QA Whiteboard: [COM=NFC],
Assignee: nobody → gduan
After merging bug 1033964, the currentApp in shrinkUI would be updated by AppWindowManager.getActiveApp().

The interesting thing is , I also tried to below STR,
1. open contact app
2. open ui test/api/viewphoto and click view image
3. use edge gesture, swipe to contact app and click one of the contact
4. tap two phones together

We can found the shrinkingUI does tilt, but it try to share photo

I tried to get AppWindowManager.getActiveApp() in step 3, it returns me uitest.gaiamobile.org, which is not what I expect.
The issue I report in comment 2 is different issue with comment 0.

About comment 0,
I found when we close the image, system only receive activityterminated event, so the quick fix is add a listener for it and updateActiveApp in shrinking ui

About comment 2,
I found listening appopen is not correct, we should listen to appopened, then we can fix this pb.
Attached file PR to master
Hi Alive,
could you review this patch as the reason of comment 3?
Thanks.
Attachment #8480412 - Flags: review?(alive)
Comment on attachment 8480412 [details] [review]
PR to master

This is not scalable ...Let's not maintain the active app anymore.

Please: use a getter for this.current to get AppWindowManager.getActiveApp().getTopMostWindow() each time.
Attachment #8480412 - Flags: review?(alive)
Comment on attachment 8480412 [details] [review]
PR to master

Hi Alive,
You're right, I also think we should use a getter to always get topMostApp.
Could I have your feedback on this commit? I've tested it and it works.
Attachment #8480412 - Flags: feedback?(alive)
Comment on attachment 8480412 [details] [review]
PR to master

wfm
Attachment #8480412 - Flags: feedback?(alive) → feedback+
Comment on attachment 8480412 [details] [review]
PR to master

Hi Alive,
test updated, please kindly check it, thanks!
Attachment #8480412 - Flags: review?(alive)
Attachment #8480412 - Flags: review?(alive) → review+
Thanks,
merge to master: https://github.com/mozilla-b2g/gaia/commit/59bd6619d64979f32179732f6de83f9a4f611367
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Verified on
Gaia      fbb297c39aab5f17b179533d2a9a6c5166b2c197
Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/fb5e796da813
BuildID   20140902160204
Version   34.0a2
Status: RESOLVED → VERIFIED
blocking-b2g: 2.1? → ---
Depends on: 1079567
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: