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

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


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

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: alive, Assigned: alive)




(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;905116;homescreen-launcher?expand=1

Not really working now. Another -100 lines work of window manager.
WIP today

* Add homescreenWindow.
* Use render and view in homescreenWindow instead of appendFrame in WindowManager.
* Move sth. out of WM to BS
WIP today

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.
WIP today
* Combine HomescreenLauncher into HomescreenWindow class.

Nearly done!
WIP today

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]

Looks good except for the module + prototype pattern.
Attachment #797700 - Flags: review?(timdream) → review+
Comment on attachment 797700 [details]

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...

TrustedUI issues would be addressed in
Origin issues would be addressed in incoming followup.

\O/ WindowManager ~= 1700L now.
Closed: 10 years ago
Resolution: --- → FIXED
Resolution: FIXED → ---
I am working on adding unit tests. Come back soon.
Blocks: 915517

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.
Blocks: 916058
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.
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Hmm... This appears to break the trusted ui.  I've opened Bug 919833 to submit a patch.
Blocks: 919833
Backed out here:

This is a sad case where this was red on CI and was merged anyway... This breaks persona please make sure CI is 100% green prior to landing this or any other future work.
Resolution: FIXED → ---
Part 3: Fix TrustedUI + BrowserFrame + Test
Attachment #809647 - Flags: review?(timdream)
Comment on attachment 809647 [details]

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.
Squashing commits into one..
Blocks: 920944
Blocks: 921328
No longer blocks: task-manager
Alias: homescreen-window
Blocks: 939732
You need to log in before you can comment on or make changes to this bug.