Closed
Bug 1129841
Opened 10 years ago
Closed 10 years ago
setNFCFocus(false) won't be called when the app goes to the background
Categories
(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)
Tracking
(blocking-b2g:2.2+, b2g-v2.2 fixed, b2g-master fixed)
People
(Reporter: allstars.chh, Assigned: alive)
References
Details
Attachments
(1 file)
46 bytes,
text/x-github-pull-request
|
etienne
:
review+
allstars.chh
:
feedback+
bajaj
:
approval-gaia-v2.2+
|
Details | Review |
+++ This bug was initially created as a clone of Bug #1125023 +++
STR:
1. Enable NFC
2. Launch NFC API Tests -> NFC Read Tag
3. Press Home key to Homescreen
4. Tab an NFC Tag containing URL.
Expected Result:
System app launches Browser showing the URL contained in the tag.
Actual Result:
Nothing happened, launch the app NFC API Tests again, found the content of result is shown in the app.
When the app goes to the background, I observed that setNFCFocus(false) won't be called on the Browser Element of the the NFC API test app, which should be wrong since the app is in foreground now.
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Yoshi Huang[:allstars.chh] from comment #0)
> +++ This bug was initially created as a clone of Bug #1125023 +++
>
> STR:
> 1. Enable NFC
> 2. Launch NFC API Tests -> NFC Read Tag
> 3. Press Home key to Homescreen
> 4. Tab an NFC Tag containing URL.
>
> Expected Result:
> System app launches Browser showing the URL contained in the tag.
>
> Actual Result:
> Nothing happened, launch the app NFC API Tests again, found the content of
> result is shown in the app.
>
> When the app goes to the background, I observed that setNFCFocus(false)
> won't be called on the Browser Element of the the NFC API test app, which
> should be wrong since the app is in foreground now.
^^^^^^^^^^^^^^^^
I mean 'since the app is in the *background* now'
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → alive
Flags: needinfo?(alive)
Assignee | ||
Comment 5•10 years ago
|
||
Is this really a bug? Don't we setNFCFocus(true) to homescreen app while pressing home button? Why is it necessary to setNFCFocus(false) to closing app?
Flags: needinfo?(dlee)
Reporter | ||
Comment 6•10 years ago
|
||
I didn't see setNFCFocus(true) for Homescreen when normal app goes to background.
Flags: needinfo?(dlee)
Comment 7•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8562135 -
Flags: review?(etienne)
Attachment #8562135 -
Flags: feedback?(allstars.chh)
Comment 8•10 years ago
|
||
Hi Alive,
One question, now gecko make an assumption that when GAIA change focus app to another app(ex, App A to App B),
GAIA will always call App A's setNFCFocus(false) before calling App B's setNFCFocus(true).
Can we make this assumption ? or it is possible that GAIA will call
1.A.setNFCFocus(true)
2.B.setNFCFocus(true)
without calling A.setNFCFocus(false)
Flags: needinfo?(alive)
Comment 9•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
lgtm
Attachment #8562135 -
Flags: review?(etienne) → review+
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Dimi Lee[:dimi][:dlee] from comment #8)
> Hi Alive,
> One question, now gecko make an assumption that when GAIA change focus app
> to another app(ex, App A to App B),
> GAIA will always call App A's setNFCFocus(false) before calling App B's
> setNFCFocus(true).
>
> Can we make this assumption ? or it is possible that GAIA will call
> 1.A.setNFCFocus(true)
> 2.B.setNFCFocus(true)
> without calling A.setNFCFocus(false)
No, we didn't do this I think. What we do is just trying to tell you when to unfocus the current focused app or focus a new one when there is.
setNFCFocus(true) to A then setNFCFocus(true) to B is possible with setNFCFocus(false) to A happens before/after or even not called.
Flags: needinfo?(alive)
Assignee | ||
Comment 11•10 years ago
|
||
(In reply to Alive Kuo@Paris~2/17 [:alive][NEEDINFO!] from comment #10)
> (In reply to Dimi Lee[:dimi][:dlee] from comment #8)
> > Hi Alive,
> > One question, now gecko make an assumption that when GAIA change focus app
> > to another app(ex, App A to App B),
> > GAIA will always call App A's setNFCFocus(false) before calling App B's
> > setNFCFocus(true).
> >
> > Can we make this assumption ? or it is possible that GAIA will call
> > 1.A.setNFCFocus(true)
> > 2.B.setNFCFocus(true)
> > without calling A.setNFCFocus(false)
>
> No, we didn't do this I think. What we do is just trying to tell you when to
> unfocus the current focused app or focus a new one when there is.
> setNFCFocus(true) to A then setNFCFocus(true) to B is possible with
> setNFCFocus(false) to A happens before/after or even not called.
More accurately:
* When an app is setNFCFocus(true): it should be the top most frame at the moment; for gecko that means it should keep this one as focused no matter the previously focused is null or another one.
* When an app is setNFCFocus(false): it should not get focus at the moment; for gecko that means it should forget it as the focused frame.
Comment 12•10 years ago
|
||
(In reply to Alive Kuo@Paris~2/17 [:alive][NEEDINFO!] from comment #11)
> (In reply to Alive Kuo@Paris~2/17 [:alive][NEEDINFO!] from comment #10)
> > (In reply to Dimi Lee[:dimi][:dlee] from comment #8)
> > > Hi Alive,
> > > One question, now gecko make an assumption that when GAIA change focus app
> > > to another app(ex, App A to App B),
> > > GAIA will always call App A's setNFCFocus(false) before calling App B's
> > > setNFCFocus(true).
> > >
> > > Can we make this assumption ? or it is possible that GAIA will call
> > > 1.A.setNFCFocus(true)
> > > 2.B.setNFCFocus(true)
> > > without calling A.setNFCFocus(false)
> >
> > No, we didn't do this I think. What we do is just trying to tell you when to
> > unfocus the current focused app or focus a new one when there is.
> > setNFCFocus(true) to A then setNFCFocus(true) to B is possible with
> > setNFCFocus(false) to A happens before/after or even not called.
>
> More accurately:
> * When an app is setNFCFocus(true): it should be the top most frame at the
> moment; for gecko that means it should keep this one as focused no matter
> the previously focused is null or another one.
> * When an app is setNFCFocus(false): it should not get focus at the moment;
> for gecko that means it should forget it as the focused frame.
Thanks for the information, I have created bug 1131964 for that.
Assignee | ||
Comment 13•10 years ago
|
||
Try is green; waiting your guys' confirm to land this.
Comment 14•10 years ago
|
||
Hi Alive,
When App A launched, and press home key. It will call setNFCFocus(false) to App A, but it won't call setNFCFocus(true) to homescreen. Is this expected behavior ?
Reporter | ||
Comment 15•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
Although this PR fixes this bug, but Bug 1125023 will be back again.
Also I didn't see any log for calling setNFCFocus(true) on Homescreen app.
Attachment #8562135 -
Flags: feedback?(allstars.chh) → feedback-
Assignee | ||
Comment 16•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
Let's see if this works
Attachment #8562135 -
Flags: feedback- → feedback?(allstars.chh)
Reporter | ||
Comment 17•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
Happy Chinese New Year \O/
Attachment #8562135 -
Flags: feedback?(allstars.chh) → feedback+
Assignee | ||
Comment 18•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
Re-request review because I changed the logic to prevent regression bug 1125023 - it's because setVisible(false) is called when ShrinkingUI is started. I think this way makes more sense because shouldFocus covers the case of this one and we will not focus something that is not loaded yet according to current app transition controller behavior.
Attachment #8562135 -
Flags: review+ → review?(etienne)
Comment 19•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
(In reply to Alive Kuo@Paris~2/17 [:alive][NEEDINFO!] from comment #18)
> I think this way makes more sense because shouldFocus covers the
> case of this one and we will not focus something that is not loaded yet
> according to current app transition controller behavior.
yep :)
Attachment #8562135 -
Flags: review?(etienne) → review+
Assignee | ||
Comment 20•10 years ago
|
||
Assignee | ||
Comment 21•10 years ago
|
||
Comment on attachment 8562135 [details] [review]
[PullReq] alivedise:bugzilla/1129841_master/setNFCFocus-on-setVisible to mozilla-b2g:master
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): regression of bug 1125023
[User impact] if declined: NFC cannot be used
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): riskless
[String changes made]: No
Attachment #8562135 -
Flags: approval-gaia-v2.2?
Updated•10 years ago
|
Attachment #8562135 -
Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
Comment 22•10 years ago
|
||
status-b2g-v2.2:
--- → fixed
Target Milestone: --- → 2.2 S7 (6mar)
You need to log in
before you can comment on or make changes to this bug.
Description
•