Closed
Bug 668271
Opened 13 years ago
Closed 13 years ago
Identify being an Android app in the background with being minimized
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 679923
People
(Reporter: azakai, Unassigned)
References
Details
(Keywords: mobile, perf)
Bug 648045 will throttle timers in minimized windows on desktop. It would be nice if when Fennec is in the background on Android, it would count as 'minimized', so that we would get that stuff working automatically, and other stuff as well.
We currently have some low-memory notifications on background on Android, I believe - perhaps that could be hooked in a similar way (that is, to being minimized).
Not sure what we need to hook up to what here.
Comment 1•13 years ago
|
||
It looks like we fire an internal nsSizeModeEvent on size mode changes. See http://mxr.mozilla.org/mozilla-central/source/xpfe/appshell/src/nsWebShellWindow.cpp#361
Can fennec do that when backgrounded?
We'd still need a way to communicate that to the JS. I'm thinking an event fired at the window. Then the JS would need to do something with it.
Reporter | ||
Comment 2•13 years ago
|
||
I just noticed that when I run the benchmark in bug 633627, it pauses completely when I alt-tab to another window (I can tell since I have printouts to a console). It resumes when I return. I assume this is a feature of mozRequestAnimationFrame. It doesn't work on Fennec on desktop (and I assume not on Android).
This isn't identical to the original issue in this bug, but very closely related.
Comment 3•13 years ago
|
||
For what it's worth, that's the approach I'm going to take in bug 648045: fire a sizemodechange event and have the JS check the windowState on the window.
Comment 4•13 years ago
|
||
> it pauses completely when I alt-tab to another window
That's.... odd. mozRequestAnimationFrame in a background _tab_ is throttled (exponential backoff, not paused), but Alt-Tab should not affect that.
Updated•13 years ago
|
Updated•13 years ago
|
Reporter | ||
Comment 5•13 years ago
|
||
(In reply to comment #4)
> > it pauses completely when I alt-tab to another window
>
> That's.... odd. mozRequestAnimationFrame in a background _tab_ is throttled
> (exponential backoff, not paused), but Alt-Tab should not affect that.
My mistake, it was something in the test code that did that.
Comment 6•13 years ago
|
||
I think the goals of this bug are accomplished by the patches in bug 679923. Resolving as duplicate. Please re-open if I am wrong.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Comment 7•13 years ago
|
||
I think you're wrong. This is not propagating the active state to the content process docshell; it needs to do that.
Comment 8•13 years ago
|
||
Er, nevermind. It's sending messages and such... Something is still broken, though.
You need to log in
before you can comment on or make changes to this bug.
Description
•