Closed Bug 895714 Opened 12 years ago Closed 9 years ago

Need a way to mute apps when screen is off

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1100822
1.1 QE5

People

(Reporter: leo.bugzilla.gaia, Assigned: alive, NeedInfo)

References

Details

(Whiteboard: [LeoVB+])

Depending on some operator's spec, apps should be muted when screen is off. Currently (based on v1-train), apps playing sound are not muted when screen is off. And this is on purpose. (by 828283 patch) Leo is looking for a way to mute apps when screen is off, to reduce CPU drain. The apps playing sound in background, such as Music and Radio app, are exceptions. They should continue playing sounds even when screen is off, just like how they continue playing sounds when home button is pressed and their visibility is moved away.
I have run some tests and by reverting the following commit does what we want. https://github.com/mozilla-b2g/gaia/commit/ef33fd3d3741adb6cc4a28d8b5a26099b7fc6c88 which is function overlayEventHandler(evt) { ... case 'mozChromeEvent': if (isRunningFirstRunApp) return; ... } However, I'm not sure what isRunningFirstRunApp means..
blocking-b2g: --- → leo+
Flags: needinfo?(alive)
Hi Alive, By looking at the window_manager.js history, it appears that you are the one who added the isRunningFirstRunApp check. https://github.com/mozilla-b2g/gaia/commit/ee55b12d8bf8fcfc49f271e7f4a1086f47eeea96 However, in your comment before you mentioned that you don't know what this code means. https://bugzilla.mozilla.org/show_bug.cgi?id=828283#c110
See Also: → 828283
Severity: normal → blocker
Target Milestone: --- → 1.1 QE5
Uh, I mean I don't know why you paste the code...
Flags: needinfo?(alive)
Assignee: nobody → alive
We need clear spec in order not to cause regression. The requester of 828283 is also coming from a parter, it's not our original design. Now we have totally two different opinions...
Flags: needinfo?(firefox-os)
(In reply to Leo from comment #1) > I have run some tests and by reverting the following commit does what we > want. > https://github.com/mozilla-b2g/gaia/commit/ > ef33fd3d3741adb6cc4a28d8b5a26099b7fc6c88 > which is > > function overlayEventHandler(evt) { > ... > case 'mozChromeEvent': > if (isRunningFirstRunApp) > return; > ... > } > > However, I'm not sure what isRunningFirstRunApp means.. Anyway I'm going to remove this, this is irrelevant to this issue.
(In reply to Leo from comment #1) > I have run some tests and by reverting the following commit does what we > want. > https://github.com/mozilla-b2g/gaia/commit/ > ef33fd3d3741adb6cc4a28d8b5a26099b7fc6c88 > which is > > function overlayEventHandler(evt) { > ... > case 'mozChromeEvent': > if (isRunningFirstRunApp) > return; > ... > } > > However, I'm not sure what isRunningFirstRunApp means.. I believe what you want is to remove gaia part in bug 828283 Remove the mozChromeEvent from overlay events. Remove the mozChromeEvent part from ovelayEventHandler. ...if this is tolerable.
(In reply to Alive Kuo [:alive] from comment #4) > We need clear spec in order not to cause regression. > The requester of 828283 is also coming from a parter, it's not our original > design. > > Now we have totally two different opinions... Right, they are two different opinions. That's why we are looking for a way to apply only in our git repo.
(In reply to Alive Kuo [:alive] from comment #3) > Uh, I mean I don't know why you paste the code... I don't know what isRunningFirstRunApp is. But somehow, putting isRunningFirstRunApp check back in muted the sound when screen is off. I wanted to check with you if this was okay. Anyways this is bad, I don't even know what isRunningFirstRunApp is. Let me try your suggestion, which is to remove the mozChromeEvent from overlay events, ovelayEventHandler. Thank you.
(In reply to hanj.kim25 from comment #8) > (In reply to Alive Kuo [:alive] from comment #3) > > Uh, I mean I don't know why you paste the code... > > I don't know what isRunningFirstRunApp is. But somehow, putting > isRunningFirstRunApp check back in muted the sound when screen is off. I > wanted to check with you if this was okay. Anyways this is bad, I don't even > know what isRunningFirstRunApp is. > > Let me try your suggestion, which is to remove the mozChromeEvent from > overlay events, ovelayEventHandler. > > Thank you. It's unchanged old variable for FTU. The same as 'FtuLauncher.isRunning()'. I just correct it on v1-train.
(In reply to Alive Kuo [:alive] from comment #9) Oh.. I get it now. I was wondering where isRunningFirstRunApp is from. I guess, the reason why adding isRunningFirstRunApp check worked was because of its 'undefined variable' error or warning. and then the ovelayEventHandler didn't proceed anymore. :) Thanks and you can close this bug, since we have what we need now.
I'm clear the leo+ flag but leave this opened.
blocking-b2g: leo+ → ---
Whiteboard: [LeoVB+]
I think this bug is fixed. Is it? can we close it?
Flags: needinfo?(alwu)
I think the system app can decide whether mutes the app when its visibility changes. Close this bug because we already done it in bug1100822.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(alwu)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.