Closed Bug 1095325 Opened 10 years ago Closed 10 years ago

[Stingray] system cannot open activity for home after we kill the home app and restart home app

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: johnhu, Assigned: johnhu)

References

Details

(Whiteboard: [ft:conndevices])

Attachments

(1 file)

smart-system has _activeApp = null when we use make install-gaia to reinstall the smart-home app. That makes us unable to send an activity when smart-home is shown.
Attached file patch for this bug
Hi Rex,

Please review this patch.

The root cause of this bug is:
1. homescreen_window.js calls restart while browserclose or browsererror event got.[1]
2. restart calls kill function[2]
3. kill function sends terminated event[3]
4. app_window_manager reset _activeApp to null[4]
5. restart only fire "opened" event when it calls open[5] <== in this case, the HomescreenWindow is not registered to AppWindowManager._apps['...']

[1] https://github.com/mozilla-b2g/gaia/blob/master/tv_apps/smart-system/js/homescreen_window.js#L135
[2] https://github.com/mozilla-b2g/gaia/blob/master/tv_apps/smart-system/js/homescreen_window.js#L148
[3] https://github.com/mozilla-b2g/gaia/blob/master/tv_apps/smart-system/js/app_window.js#L444
[4] https://github.com/mozilla-b2g/gaia/blob/master/tv_apps/smart-system/js/app_window_manager.js#L415-L417
[5] https://github.com/mozilla-b2g/gaia/blob/master/tv_apps/smart-system/js/homescreen_window.js#L158
Attachment #8518696 - Flags: review?(rexboy)
Comment on attachment 8518696 [details] [review]
patch for this bug

Looks good to me.
Thanks for the quick fix!
Attachment #8518696 - Flags: review?(rexboy) → review+
I just made a try and seems it don't actually solve the problem :-/

Nothing is sent to smart-home after sending activity. I wonder if it's just a Gecko issue.
I'll try to trace it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: