summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Tunstall <ptunstall@gmail.com>2012-05-17 16:25:38 +0100
committerPhil Tunstall <ptunstall@gmail.com>2012-05-19 12:48:50 +0100
commite54debb12ecdf92d12acab00a261c0c5a6ef1d64 (patch)
treedb725bfa622f915dd88835cb6fcceee1c794d513
parent7bfa58c3766f9ad88bf458fbf68deab5a2dd718b (diff)
downloadhardware_samsung-e54debb12ecdf92d12acab00a261c0c5a6ef1d64.zip
hardware_samsung-e54debb12ecdf92d12acab00a261c0c5a6ef1d64.tar.gz
hardware_samsung-e54debb12ecdf92d12acab00a261c0c5a6ef1d64.tar.bz2
liblights: Fix touch key lights coming on when screen brightness is adjusted
Only tested on GT-I9100 Change-Id: I2be3c5ce74799bea310a65bc75dd90985b9d17d6
-rw-r--r--exynos4/hal/liblights/lights.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/exynos4/hal/liblights/lights.c b/exynos4/hal/liblights/lights.c
index de70672..7cbe9d4 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;