Bug 905107: Fix options in RIL.setScreenState, r=vicamo

The method RIL.setScreenState parses its arguments incorrectly. The
RIL worker methods usually receive an object that contain their
arguments, but setScreenState expects a boolean. Because objects are
interpreted as 'true', setScreenState always signals enabled screen
state to the RIL daemon.

This patch changes RIL.setScreenState to expect an object as its
argument and read the screen state from the object.
This commit is contained in:
Thomas Zimmermann 2013-10-08 16:43:07 +02:00
parent ae94c4f3f2
commit 9c99c5c991

View File

@ -1065,10 +1065,10 @@ let RIL = {
* @param on
* Boolean indicating whether the screen should be on or off.
*/
setScreenState: function setScreenState(on) {
setScreenState: function setScreenState(options) {
Buf.newParcel(REQUEST_SCREEN_STATE);
Buf.writeInt32(1);
Buf.writeInt32(on ? 1 : 0);
Buf.writeInt32(options.on ? 1 : 0);
Buf.sendParcel();
},