Closed Bug 1068104 Opened 10 years ago Closed 10 years ago

Wake up the screen when all calls are ended

Categories

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

defect
Not set
normal

Tracking

(b2g-v2.2 fixed)

RESOLVED FIXED
2.1 S8 (7Nov)
Tracking Status
b2g-v2.2 --- fixed

People

(Reporter: drs, Assigned: drs)

References

Details

(Whiteboard: [planned-sprint c=1][in-sprint=v2.1-S6])

Attachments

(2 files)

Currently, the screen is only woken up when a call comes. It appears (though this is liable to be incorrect) that the flow for this is:
get a call -> open attnwindow -> signal system attnwindow handler -> turn screen on -> callscreen app shown -> callscreen app acquires screen lock

The "turn screen on" step happens here:
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/screen_manager.js#L206

We should add hooks here for callschanged event to turn on the screen:
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/screen_manager.js#L268
Assignee: nobody → thills
Whiteboard: [planned-sprint] → [planned-sprint][in-sprint=v2.1-S5]
Target Milestone: 2.1 S5 (26sep) → 2.1 S6 (10oct)
Whiteboard: [planned-sprint][in-sprint=v2.1-S5] → [planned-sprint c=3][in-sprint=v2.1-S5]
Assignee: thills → drs+bugzilla
Status: NEW → ASSIGNED
Summary: Wake up the screen when a call is ended → Wake up the screen when all calls are ended
PR: https://github.com/mozilla-b2g/gaia/pull/24856

It turns out this was really simple.

There is one potential point of contention: I'm not sure if it's a valid assumption that `calls.length === 0` means that all calls have ended. Is it possible that we get a 'callschanged' while `calls.length === 0` both before and after the event? I might just be paranoid here.
Attachment #8500728 - Flags: review?(etienne)
Also on the PR as a separate commit.
Attachment #8500729 - Flags: review?(etienne)
Comment on attachment 8500728 [details] [diff] [review]
Wake up the screen when all calls are ended.

Review of attachment 8500728 [details] [diff] [review]:
-----------------------------------------------------------------

that was easy :)
Attachment #8500728 - Flags: review?(etienne) → review+
Comment on attachment 8500729 [details] [diff] [review]
Get jslint passing for affected files.

Review of attachment 8500729 [details] [diff] [review]:
-----------------------------------------------------------------

thanks for splitting. made things much clearer.
Attachment #8500729 - Flags: review?(etienne) → review+
(In reply to Doug Sherk (:drs) from comment #1)
> There is one potential point of contention: I'm not sure if it's a valid
> assumption that `calls.length === 0` means that all calls have ended. Is it
> possible that we get a 'callschanged' while `calls.length === 0` both before
> and after the event? I might just be paranoid here.

As long as we have the conferenceGroup check I'm pretty sure we're safe.
https://github.com/mozilla-b2g/gaia/commit/9d95fa88a643159eb12891f3a572bd170911da2a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Reverted in https://github.com/mozilla-b2g/gaia/commit/256f2c8c5dbfa5b410859a6fef4801c414a0ea34 for causing bug 1081068. We're going to re-land this once bug 1081811 lands, which should prevent bug 1081068 from happening again.
Status: RESOLVED → REOPENED
Depends on: 1081811
Resolution: FIXED → ---
Whiteboard: [planned-sprint c=3][in-sprint=v2.1-S5] → [planned-sprint c=1][in-sprint=v2.1-S6]
Target Milestone: 2.1 S6 (10oct) → 2.1 S7 (24Oct)
https://github.com/mozilla-b2g/gaia/commit/d893a9b971a0f3ee48e5a57dca516837d92cf52b

Re-landed now that bug 1081811 is fixed. I dogfooded this for a few hours and the screen didn't randomly turn on at all.

Johan, I'd like you to be aware of this. To save you from reading this thread: when this bug originally landed, the screen would turn on at fairly random times. Now that bug 1081811 is fixed, it shouldn't do that anymore. If anyone reports any bugs that sound similar to this, please let me know. Thanks!
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Flags: needinfo?(jlorenzo)
Resolution: --- → FIXED
Target Milestone: 2.1 S7 (24Oct) → 2.1 S8 (7Nov)
Acknowledged. I'll keep in mind that bug for the next weeks.
Flags: needinfo?(jlorenzo)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: