[battery] Still some questions on battery status

I'm going through the latest revision of the battery status spec, and still
have a couple of questions on the use of the various event attributes.

1. What event(s) is(are) dispatched when the device is unplugged while, say,
the battery is at full capacity?
The last dispatched event before the device was unplugged would have been
{isPlugged=true; level=100; status=ok}. Now that the device is unplugged,
obviously isPlugged is changed to false, so at least the batterystatus event
needs to be dispatched. But what would be the value of the status attribute
in the event? 
The definition of the status attribute says that it
	[[ Represents how much of the internal power source remains, scaled
from critical to ok. ]]
Based on this alone, it seems that the status should be "ok". However,
	[[ The definitions of critical, low, and ok mirror the definitions
of batterycritical, batterylow and batteryok events respectively ]]
Further down in the definition for the batteryok event, the event is to be
dispatched when
	[[ isPlugged changes its value to true ]]
>From this, the status could not be "ok". What then should be the value of
status?

2. Regarding isPlugged, the current prose is
 [[ Represents whether the device is plugged in. If the device is plugged in
and its battery is being charged or is at its full capacity, then isPlugged
must be set to true, otherwise false. ]]
What would be the value of isPlugged if an implementation is only able to
determine whether the device is (literally) plugged in, but could not
determine the power level or status (i.e. it would set level=null and
status=null)? Should it be true or false?

Regards, Cathy.

Received on Wednesday, 7 September 2011 19:48:04 UTC