Permalink
Browse files

Fix automatic backlight brightness & notification LED

  • Loading branch information...
1 parent 372187a commit 4910649da859a853cc47950f09e668bde8d85414 @ius committed Oct 26, 2012
Showing with 61 additions and 0 deletions.
  1. +5 −0 init.cocktail.rc
  2. +56 −0 overlay/frameworks/base/core/res/res/values/config.xml
View
@@ -25,6 +25,11 @@ on emmc-fs
# torch
chown camera camera /sys/class/leds/SGM3140_torch_flash/mode
+ # notification led
+ chown system system /sys/class/leds/led_notification/mode
+ chown system system /sys/class/leds/led_notification/period
+ chown system system /sys/class/leds/led_notification/duty
+
# qmux stuff
mkdir /dev/socket/qmux_radio 0770 radio radio
chmod 2770 /dev/socket/qmux_radio
@@ -25,4 +25,60 @@
<!-- Enable electron beam screen-off animation -->
<bool name="config_animateScreenLights">false</bool>
+
+ <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
+ The N entries of this array define N + 1 zones as follows:
+
+ Zone 0: 0 <= LUX < array[0]
+ Zone 1: array[0] <= LUX < array[1]
+ ...
+ Zone N: array[N - 1] <= LUX < array[N]
+ Zone N + 1: array[N] <= LUX < infinity
+
+ Must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessLevels">
+ <item>21</item>
+ <item>81</item>
+ <item>181</item>
+ <item>601</item>
+ </integer-array>
+
+ <!-- Minimum screen brightness allowed by the power manager. -->
+ <integer name="config_screenBrightnessDim">20</integer>
+
+ <!-- Array of output values for LCD backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessLcdBacklightValues">
+ <item>50</item>
+ <item>90</item>
+ <item>145</item>
+ <item>195</item>
+ <item>230</item>
+ </integer-array>
+
+ <!-- Array of output values for button backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessButtonBacklightValues">
+ <item>255</item>
+ <item>255</item>
+ <item>255</item>
+ <item>255</item>
+ <item>255</item>
+ </integer-array>
+
+ <!-- Array of output values for keyboard backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessKeyboardBacklightValues">
+ <item>255</item>
+ <item>255</item>
+ <item>255</item>
+ <item>255</item>
+ <item>255</item>
+ </integer-array>
</resources>

0 comments on commit 4910649

Please sign in to comment.