Permalink
Browse files

vision: Make button backlights dimmable (part 2)

Modifies liblights to pass through the brightness level specified by the framework, and sets the default custom settings to yield the same result as the original settings.

Change-Id: I51a54c1f20bd14524a9f2068c5f11792dc36ad21
  • Loading branch information...
1 parent 80d682a commit 7693309caab812fb593bf336f24314acc02d0ee2 @pao pao committed with cyanogen Nov 26, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 liblights/lights.c
  2. +4 −4 overlay/frameworks/base/core/res/res/values/config.xml
View
@@ -357,7 +357,7 @@ set_light_buttons(struct light_device_t* dev,
int on = is_lit(state);
pthread_mutex_lock(&g_lock);
g_buttons = on;
- err = write_int(&leds[BUTTONS_LED].brightness, on?255:0);
+ err = write_int(&leds[BUTTONS_LED].brightness, state->color&0xff);
pthread_mutex_unlock(&g_lock);
return err;
}
@@ -71,10 +71,10 @@
than the size of the config_autoBrightnessLevels array.
-->
<integer-array name="config_autoBrightnessButtonBacklightValues">
- <item>255</item>
- <item>255</item>
- <item>255</item>
- <item>255</item>
+ <item>30</item>
+ <item>30</item>
+ <item>30</item>
+ <item>30</item>
<item>0</item>
<item>0</item>
<item>0</item>

0 comments on commit 7693309

Please sign in to comment.