Closed
Bug 879695
Opened 11 years ago
Closed 11 years ago
B2G RIL: Notify modem that the screen is off
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: gerard-majax, Assigned: gerard-majax)
References
Details
(Whiteboard: [fixed-in-birch])
Attachments
(1 file, 1 obsolete file)
3.45 KB,
patch
|
vicamo
:
review+
kanru
:
review+
|
Details | Diff | Splinter Review |
On Android devices, one can notice (adb logcat -b radio) that when you power off the screen, the event gets propagated to the modem so that it can enter in low power mode. One side effect of this is that Android apps can't get radio signal updates when the screen is off.
When checking this behavior on B2G, it's not the case. The RIL Worker has some setScreenState() method to notify the modem, defined in https://mxr.mozilla.org/mozilla-b2g18/source/dom/system/gonk/ril_worker.js#2460 but looking at the source shows it is never called.
I'd suspect we should notify our RIL code from https://mxr.mozilla.org/mozilla-b2g18/source/dom/power/PowerManager.cpp#147 that we are entering or leaving a screen state change, and thus notify the modem via setScreenState() from the RIL Worker.
Siddarth has raised this issue in Bug 843382, but seems not active for 2 months.
Comment 2•11 years ago
|
||
Oops, so let's go there for further discuss.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Comment 3•11 years ago
|
||
Bug 843382 is a confidential bug for some reason it shouldn't be. Sorry for the message spam, but I'm going to reverse the case here.
Status: RESOLVED → REOPENED
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
Resolution: DUPLICATE → ---
Comment 4•11 years ago
|
||
I think we can have a new observer event "screen-state-changed" in PowerManager and make RIL listen to it. The code to broadcast such event can be referenced in:
http://mxr.mozilla.org/mozilla-central/source/dom/time/TimeChangeObserver.cpp#60
http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/RadioInterfaceLayer.js#349
http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/RadioInterfaceLayer.js#1924
Updated•11 years ago
|
Summary: Notify modem that the screen is off → B2G RIL: Notify modem that the screen is off
Assignee | ||
Comment 6•11 years ago
|
||
This patch, on b2g18, with Nexus S:
I/power (11850): *** set_screen_state 0
I/Gecko (11850): -*- RadioInterfaceLayer: Received a screen-state-changed event: "off"
I/Gecko (11850): -*- RadioInterfaceLayer: setScreenState: "off"
I/Gecko (11850): RIL Worker: Received DOM message {"rilMessageType":"setScreenState","on":false}
I/Gecko (11850): RIL Worker: Will set RIL_REQUEST_SCREEN_STATE: {"rilMessageType":"setScreenState","on":false}
I/power (11850): *** set_screen_state 1
I/Gecko (11850): -*- RadioInterfaceLayer: Received a screen-state-changed event: "on"
I/Gecko (11850): -*- RadioInterfaceLayer: setScreenState: "on"
I/Gecko (11850): RIL Worker: Received DOM message {"rilMessageType":"setScreenState","on":true}
I/Gecko (11850): RIL Worker: Will set RIL_REQUEST_SCREEN_STATE: {"rilMessageType":"setScreenState","on":true}
I/power (11850): *** set_screen_state 0
I/Gecko (11850): -*- RadioInterfaceLayer: Received a screen-state-changed event: "off"
I/Gecko (11850): -*- RadioInterfaceLayer: setScreenState: "off"
I/Gecko (11850): RIL Worker: Received DOM message {"rilMessageType":"setScreenState","on":false}
I/Gecko (11850): RIL Worker: Will set RIL_REQUEST_SCREEN_STATE: {"rilMessageType":"setScreenState","on":false}
Attachment #758492 -
Flags: feedback?(vyang)
Attachment #758492 -
Flags: feedback?(kchen)
Updated•11 years ago
|
Attachment #758492 -
Flags: feedback?(kchen) → feedback+
Comment 7•11 years ago
|
||
Comment on attachment 758492 [details] [diff] [review]
Patch v1
Review of attachment 758492 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you for this quick patch :)
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +2044,5 @@
>
> + setScreenState: function setScreenState(state) {
> + debug("setScreenState: " + JSON.stringify(state));
> + this.worker.postMessage({rilMessageType: "setScreenState",
> + on: (state === "on")});
nit: please have:
this.worker.postMessage({
rilMessageType: "setScreenState",
on: (state === "on")
});
Attachment #758492 -
Flags: feedback?(vyang) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Thanks for your comments, here is a new patch that addresses the remarks.
Attachment #758492 -
Attachment is obsolete: true
Attachment #758678 -
Flags: review?(vyang)
Attachment #758678 -
Flags: review?(kchen)
Updated•11 years ago
|
Attachment #758678 -
Flags: review?(vyang) → review+
Comment 9•11 years ago
|
||
Comment on attachment 758678 [details] [diff] [review]
Patch v2
Review of attachment 758678 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #758678 -
Flags: review?(kchen) → review+
Comment 10•11 years ago
|
||
Assignee: nobody → lissyx+mozillians
Whiteboard: [fixed-in-birch]
Comment 11•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•