W3C home > Mailing lists > Public > public-device-apis@w3.org > June 2014

[battery] proposed additional edit for attribute defaults

From: Frederick Hirsch <w3c@fjhirsch.com>
Date: Thu, 19 Jun 2014 14:52:57 -0400
Cc: Frederick Hirsch <w3c@fjhirsch.com>, W3C Device APIs WG <public-device-apis@w3.org>, "timvolodine@google.com" <timvolodine@google.com>, Mounir Lamouri <mounir@lamouri.fr>, "cathy.chan@nokia.com" <cathy.chan@nokia.com>
Message-Id: <20BAC2BF-4FEA-49EA-9D3D-EAF775E49FF9@fjhirsch.com>
To: "Kostiainen, Anssi" <anssi.kostiainen@intel.com>
Anssi

Thank you for updating the section on Multiple Batteries based on my proposal and also for adding the paragraph in section 6 outlining the model for using battery full as a default.

I suggest changing the last sentence of the 2nd paragraph in section 6 [1] from 

[[

This prevents leaking of information that could be used to fingerprint a user and allow web developers to use the same code path for handling battery full and battery status unknown cases.

]]


to

[[

The reason for using full battery defaults for unknown attribute values is that this will not cause applications to degrade performance or functionality by default if information is not available. It also reduces the potential for fingerprinting.

]]

I think this might better capture the rationale.

Thanks


regards, Frederick

Frederick Hirsch, Nokia 
(sent not as chair)
@fjhirsch

[1] https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html#batterymanager-interface

On Jun 16, 2014, at 7:26 AM, Kostiainen, Anssi <anssi.kostiainen@intel.com> wrote:

> On 11 Jun 2014, at 18:07, Frederick Hirsch <w3c@fjhirsch.com> wrote:
> 
> [...]
> 
>> I must admit I’m confused - why is it correct to have the default attribute values emulate a fully charged battery? Shouldn’t the default values be ‘unknown’ until the state of the battery is determined and the values can be properly initialized?  I believe this requires more than a note, instead a new 2nd paragraph explanation in section 6 of this model.
> 
> Added a more elaborate clarification and dropped the note (it is incorporated in the new section):
> 
> https://dvcs.w3.org/hg/dap/rev/4c334400e0aa
> 
>> I think Tim is correct, the section on multiple batteries (section 6.1) makes a number of assumptions on whether batteries charge/discharge in serial or parallel so the language and rules may not be correct in all implementations.  I suggest we make some of the language non-normative as I propose here (without the formatting):
>> 
>> [[
>> 
>> If a hosting device contains more than one battery, BatteryManager SHOULD expose an unified view of the batteries.
>> 
>> The charging attribute MUST be set to true if at least one battery's charging state as described above is true. Otherwise, it MUST be set to false.
>> 
>> The Level attribute can be set to the sum of the levels of batteries of same capacity, or the weighted average of the battery level attributes for batteries of different capacities.
>> 
>> Depending on whether multiple batteries charge in parallel or serially, the chargingTime attribute can be set to the maximum or sum of the individual battery charging time, respectively.
>> 
>> The disChargingTime attribute can be set to the sum or weighted average  of the individual battery dischargingTime, depending on whether they discharge serially or in parallel respectively.
>> 
>> ]]
> 
> Thanks for the suggested changes, updated the spec accordingly:
> 
> https://dvcs.w3.org/hg/dap/rev/8a9320b0e7d1
> 
>> Have all of Tim’s other comments (e.g with respect to calling updateTimer been addressed - I think so)
> 
> I’ll handle Tim’s other comments separately.
> 
> Thanks,
> 
> -Anssi
Received on Thursday, 19 June 2014 18:55:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:03 UTC