On Mon, Sep 8, 2014 at 1:34 PM, Jonas Sicking <[email protected]> wrote:
> Ok, sounds like we should do the following:
>
> 1. Introduce a *certified* API for controlling the LED. Draft below.
> 2. Let the system app use that API in order to set the LED color/blink
> pattern any time there's pending notifications.
> 3. Use the API to indicate battery status (low battery, very low
> battery, charging)
> 4. Add UI in the settings app for controlling notifications from apps.
> Including disabling notifications completely for an app, controlling
> if it shows up on the lock screen, LED color/pattern etc.
>
> The forth step should of course be done together with UX. And we don't
> need to do the fourth step right away but is something that can be
> added as time permits.

Seems I forgot to actually include an API proposal.

Something like:

dictionary LEDPatternItem {
  DOMString color; // empty string means "off"
  int duration; // milliseconds
}

interface LEDManager {
  readonly attribute string[] colors; // array of colors the hardware supports
  setPattern(sequence<LEDPatternItem> pattern);
}

One assumption here is that we can set a blinking pattern even though
the CPU is put to sleep. Is that generally the case? Or can you only
set a colored pattern? Or a pattern with driver/hardware defined time
slices?

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

Reply via email to