diff options
| author | Patrick Tjin <pattjin@google.com> | 2016-05-18 08:55:33 -0700 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2016-05-18 08:55:33 -0700 |
| commit | 832c1ac26df209c536a74e0f15561e61f4828bef (patch) | |
| tree | 821cd2c15997fb539994f690f6f4aa5926205058 /liblight | |
| parent | 032efaf066431e93a36b42ee849ca00bc6defa6d (diff) | |
marlin: disable battery notification LED
Bug: 28771602
Change-Id: I28c97f6c6a162daddc4680332db608ce30ceaf2f
Diffstat (limited to 'liblight')
| -rw-r--r-- | liblight/lights.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/liblight/lights.c b/liblight/lights.c index 9308f44f..0b9b0daf 100644 --- a/liblight/lights.c +++ b/liblight/lights.c @@ -35,6 +35,11 @@ /******************************************************************************/ +/* + * Change this to 1 to support battery notifications via BatteryService + */ +#define LIGHTS_SUPPORT_BATTERY 0 + static pthread_once_t g_init = PTHREAD_ONCE_INIT; static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; static struct light_state_t g_notification; @@ -229,6 +234,7 @@ handle_speaker_battery_locked(struct light_device_t* dev) } } +#if LIGHTS_SUPPORT_BATTERY static int set_light_battery(struct light_device_t* dev, struct light_state_t const* state) @@ -239,6 +245,7 @@ set_light_battery(struct light_device_t* dev, pthread_mutex_unlock(&g_lock); return 0; } +#endif static int set_light_notifications(struct light_device_t* dev, @@ -306,8 +313,10 @@ static int open_lights(const struct hw_module_t* module, char const* name, if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) set_light = set_light_backlight; +#if LIGHTS_SUPPORT_BATTERY else if (0 == strcmp(LIGHT_ID_BATTERY, name)) set_light = set_light_battery; +#endif else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name)) set_light = set_light_notifications; else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) |
