mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
liblight: remove button light.
The file /sys/class/leds/button-backlight/brightness isn't created/exposed by the kernel. Bug: 36097008 Test: LightHidlTest.TestSupported now passes. Change-Id: If2e036cfa9fdb36596bc0820480072fde7591112
This commit is contained in:
@@ -62,9 +62,6 @@ char const*const LCD_FILE
|
||||
char const*const PERSISTENCE_FILE
|
||||
= "/sys/class/leds/lcd-backlight/low_persistence";
|
||||
|
||||
char const*const BUTTON_FILE
|
||||
= "/sys/class/leds/button-backlight/brightness";
|
||||
|
||||
char const*const RED_BLINK_FILE
|
||||
= "/sys/class/leds/red/blink";
|
||||
|
||||
@@ -313,20 +310,6 @@ set_light_attention(struct light_device_t* dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
set_light_buttons(struct light_device_t* dev,
|
||||
struct light_state_t const* state)
|
||||
{
|
||||
int err = 0;
|
||||
if(!dev) {
|
||||
return -1;
|
||||
}
|
||||
pthread_mutex_lock(&g_lock);
|
||||
err = write_int(BUTTON_FILE, state->color & 0xFF);
|
||||
pthread_mutex_unlock(&g_lock);
|
||||
return err;
|
||||
}
|
||||
|
||||
/** Close the lights device */
|
||||
static int
|
||||
close_lights(struct light_device_t *dev)
|
||||
@@ -359,8 +342,6 @@ static int open_lights(const struct hw_module_t* module, char const* name,
|
||||
#endif
|
||||
else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name))
|
||||
set_light = set_light_notifications;
|
||||
else if (0 == strcmp(LIGHT_ID_BUTTONS, name))
|
||||
set_light = set_light_buttons;
|
||||
else if (0 == strcmp(LIGHT_ID_ATTENTION, name))
|
||||
set_light = set_light_attention;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user