Closed Bug 905116 (homescreen-window) Opened 6 years ago Closed 6 years ago

[Window Management] Move homescreen life cycle management out of window manager

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alive, Assigned: alive)

References

Details

Attachments

(3 files)

Homescreen app's life cycle is irrelevant to manage other windows.
This bug's target is to move nearly all homescreen specific code out of window manager, just like FTU Launcher, and then the following step would be to implement HomescreenWindow(inherited from revised appWindow class).
Depends on: 898330
Homescreen Launcher WIP
https://github.com/alivedise/gaia/compare/bugzilla;905116;homescreen-launcher?expand=1

Not really working now. Another -100 lines work of window manager.
WIP today
https://github.com/alivedise/gaia/commit/081cd6081050bab3a89276a5dd9447ba3159647d

* Add homescreenWindow.
* Use render and view in homescreenWindow instead of appendFrame in WindowManager.
* Move sth. out of WM to BS
WIP today
https://github.com/alivedise/gaia/commit/940d6705fe1a2d42fdb61e1f786e0d826ac54b48

Still have some coding style issues but it works now.
WIP today
Try to move more homescreen specific logic from WM into HW.
Implement simple transition state machine control in HW.
*NOT TESTED YET*

https://github.com/alivedise/gaia/commit/2f12fcabaed7e6460fdc3fc92374c05e8dcf4614
WIP today
https://github.com/alivedise/gaia/commit/1573a41a39c122aa71c0d76b6ff4a1ec7a9dd1d3
* Combine HomescreenLauncher into HomescreenWindow class.

Nearly done!
WIP today
https://github.com/alivedise/gaia/commit/61796de1947c05d9a54d9befe21898a8a74d57e8

Test done
Known issue: Closing Window has some latency.
Patch v1:
* Introduce HomescreenWindow(HW when mentioned below) class inherited AppWindow
* Remove as most as possible Homescreen specific value from WindowManager(WM when mentioned below)
* Move something into Bootstrap(BS when mentioned below) from WM

Todo in next followup:
* Clean BS, too.
* Clean HW constructor dirties and use the same mechanism into AppWindow.
Attachment #797700 - Flags: review?(timdream)
Comment on attachment 797700 [details]
https://github.com/mozilla-b2g/gaia/pull/11854

Looks good except for the module + prototype pattern.
Attachment #797700 - Flags: review?(timdream) → review+
Comment on attachment 797700 [details]
https://github.com/mozilla-b2g/gaia/pull/11854

Add part 2: HomescreenLauncher.
I'll squash into one commits after getting r+.
Attachment #797700 - Flags: review?(timdream)
Attachment #797700 - Flags: review?(timdream) → review+
Happy conflicting...
master
https://github.com/mozilla-b2g/gaia/commit/3384ddd62af4d16d02180a0d51629ec637f483e1


TrustedUI issues would be addressed in https://bugzilla.mozilla.org/show_bug.cgi?id=911880
Origin issues would be addressed in incoming followup.


\O/ WindowManager ~= 1700L now.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Backouted
https://github.com/mozilla-b2g/gaia/commit/1c704fa7e4925568131e033bfcbde04b83d653ac
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I am working on adding unit tests. Come back soon.
https://github.com/mozilla-b2g/gaia/pull/12086/files

I found that warm boot of app transition takes more time now.
It's the gap between visibility->true to next paint event. I still don't know why now, will track in another bug.
Short term solution is cancel the next paint handler right away.
Part 2: Add unit tests and quick fix app opening delay.
Attachment #804375 - Flags: review?(timdream)
Something weird found: quickly tapping HW home button during app is opening does show empty wallpaper. Investigating.
(In reply to Alive Kuo [:alive] from comment #19)
> Something weird found: quickly tapping HW home button during app is opening
> does show empty wallpaper. Investigating.

Fixed, the fix is pretty simple: just modify the policy of transition states. Unit test fixed as well.
https://github.com/mozilla-b2g/gaia/commit/3408cc3f6b190c8cd31832fbb8cd2ae571041f29
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Hmm... This appears to break the trusted ui.  I've opened Bug 919833 to submit a patch.
Backed out here: https://github.com/mozilla-b2g/gaia/commit/e9effbe9997713eaa35b21c0c0cf47bff1e97440

This is a sad case where this was red on CI https://travis-ci.org/mozilla-b2g/gaia/jobs/11681343#L1335 and was merged anyway... This breaks persona please make sure CI is 100% green prior to landing this or any other future work.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Part 3: Fix TrustedUI + BrowserFrame + Test
Attachment #809647 - Flags: review?(timdream)
Comment on attachment 809647 [details]
https://github.com/mozilla-b2g/gaia/pull/12414

Sorry for not paying attention to the test failure.
Attachment #809647 - Flags: review?(timdream) → review+
Travis is green now, I'm going to merge again and cross finger.
https://travis-ci.org/mozilla-b2g/gaia/builds/11763620
Squashing commits into one..
No longer blocks: task-manager
Alias: homescreen-window
You need to log in before you can comment on or make changes to this bug.