Closed Bug 790999 Opened 13 years ago Closed 7 years ago

device sensors - on unsupported platforms - dispatch 'error' value

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: dougt, Unassigned)

Details

Spec says: If the implementation is unable to report the <a>current light level</a>, initialize the <code>value</code> attribute to positive Infinity, otherwise initialize the attribute to the <a>current device light</a>. We should make sure we are doing the right thing for device light and proximity
unassigning things that I am not working on.
Assignee: doug.turner → nobody
This bug looks invalid to me. The quote in the summary it out of context. The spec for device proximity and device light doesn't actually say what to do when the UA doesn't support the sensor. It only says to fire an event when the value changes, thus the only time we initialize the value to Infinity is when the sensor becomes unable to report the value after being able to do so. On our supported platforms I don't think that we are able to learn when the sensor is unable to report, so we never initialize the value to Infinity.
After looking around more, in the Sensor API from which the device light and proximity spec is derived, there is explicit instruction to not fire an event when the sensor is not supported: "If the UA does not support the sensor of interest then the event will not be fired." So there is probably some reasoning behind not having an event fire when sensor is unsupported.
FxOS/Gonk has been removed from the codebase. Mass-invalidating FxOS related Device Interface bugs to clean up the component. If I incorrectly invalidated something, please let me know.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Bulk correction of resolution of B2G bugs to INCOMPLETE.
Resolution: INVALID → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.