Le 08/09/2014 22:02, Fabrice Desré a écrit :
> On 09/08/2014 12:19 PM, Alexandre Lissy wrote:
>> Le 08/09/2014 10:05, Jonas Sicking a écrit :
>>> I think we should do a few things here:
>>>
>>> 1. Introduce a privileged API for controlling the LED.
>>> 2. Let the system app use that API in order to blink the LED whenever
>>> a notification is rendered.
>>> 3. Use the API to indicate battery status (low battery, very low
>>> battery, charging)
>>> 4. Possibly enable apps to specify an LED pattern when creating 
>>> notifications.
>>>
>>
>> Yep, however, the Flame currently does not have a LED that we could use
>> that easily. There is the charger led, but it's not really intended for
>> this, mostly because as far as I could test hacking in sysfs, any change
>> would work but get overwritten after a couple of seconds.
> 
> There's a proper HAL api to control the lights. It's probably overriding
> your hacks as soon as possible ;)
> 
> See
> http://androidxref.com/4.4.4_r1/xref/hardware/libhardware/include/hardware/lights.h

So Fabrice, I did some experiments with your PoC and my Desire Z, it's
getting to somewhere :).

We could already easily benefit from the battery/notification light id.
We could also probably leverage the flash exposed in this very same API:
for example, blink the LED in battery mode when you are reaching
critical level.

> 
>       Fabrice
> 

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to