From e54debb12ecdf92d12acab00a261c0c5a6ef1d64 Mon Sep 17 00:00:00 2001 From: Phil Tunstall Date: Thu, 17 May 2012 16:25:38 +0100 Subject: [PATCH] liblights: Fix touch key lights coming on when screen brightness is adjusted Only tested on GT-I9100 Change-Id: I2be3c5ce74799bea310a65bc75dd90985b9d17d6 --- exynos4/hal/liblights/lights.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/exynos4/hal/liblights/lights.c b/exynos4/hal/liblights/lights.c index de706726..7cbe9d45 100644 --- a/exynos4/hal/liblights/lights.c +++ b/exynos4/hal/liblights/lights.c @@ -148,12 +148,14 @@ set_light_buttons(struct light_device_t* dev, #ifdef EXYNOS4210_TABLET return 0; #else + + load_settings(); + int err = 0; - int on = is_lit(state); pthread_mutex_lock(&g_lock); - LOGD("set_light_button on=%d\n", on ? 1 : 0); - err = write_int(BUTTON_FILE, on ? 1:0); + LOGD("set_light_button on=%d\n", g_enable_touchlight ? 1 : 0); + err = write_int(BUTTON_FILE, g_enable_touchlight ? 1 : 0); pthread_mutex_unlock(&g_lock); return err;