RE: no longer possible to detect battery presence? RE: Battery API in Last Call

>> If you have a full battery and disconnect your power source,  the spec says to
>report that the battery is charging --  even though it really is discharging.
>
>That is a bug in the specs and should be raised separately.

The bug in the spec that makes it so it says charging when it is actually discharging, also seems to makes it so you can also always determine when a battery is in use. (either charging or discharging.

Current text for charging attribute: "The attribute must be set to false if the battery is discharging, and set to true, if the battery is charging, full, the implementation is unable to report the state, or there is no battery attached to the system, or otherwise.
No exceptions."

Suggested text for charging attribute: "The attribute must be set to false if the battery is discharging, and set to true if the battery is charging.  Otherwise, the attribute is set to true if the battery is neither charging nor discharging or If the implementation is unable to report the state or there is no battery attached to the system. No exceptions."


>-----Original Message-----
>From: Mounir Lamouri [mailto:mounir@lamouri.fr]
>Sent: Friday, December 02, 2011 5:33 AM
>To: Carr, Wayne
>Cc: olli@pettay.fi; Dominique Hazael-Massieux; public-device-apis@w3.org;
>public-device-status@w3.org
>Subject: Re: no longer possible to detect battery presence? RE: Battery API in Last
>Call
>
>On 12/02/2011 01:10 AM, Carr, Wayne wrote:
>> You can tell now whether there is a battery or not except when the battery is
>full.  So there is just a window when you don't know - when apps are told they are
>charging when they actually are discharging.  So I don't think it has anything to do
>with privacy.
>
>The fact that it's not possible to differentiate a full battery charging and no
>battery helps for privacy because it makes fingerprinting harder.
>In addition, it makes sure that users using desktops will end up in the code path
>made for fully charged devices.
>
>You seem to complain because the API doesn't let the webapp know if there is a
>battery or not in the device but do you actually need that?
>If yes, I would be interested in the use case. While discussing this, the only use
>case that was mentioned was a system UI for the battery which is a tiny use case
>that could be fulfilled with another API or a future version of the API (very likely
>requiring permissions).
>
>> If you have a full battery and disconnect your power source,  the spec says to
>report that the battery is charging --  even though it really is discharging.
>
>That is a bug in the specs and should be raised separately.
>
>Thanks,
>--
>Mounir

Received on Friday, 2 December 2011 18:16:00 UTC