Current Android code for backlight adjustment do not work properly for
systems other than G1. This is mainly because:

1) The corresponding sysfs file changed. In "mydroid/hardware/
libhardware/power/power.c", LCD_BACKLIGHT is hard coded to "/sys/class/
leds/lcd-backlight/brightness". While it should be "/sys/class/
backlight/eeepc/backlight/brightness" for Eee PC.

2) The backlight range is assumed to be from 0 - 255 as in "mydroid/
packages/apps/Settings/src/com/android/settings/
BrightnessPreference.java". While it should be from 0 - 7 for Eee PC.

For 1), we can use a property to set the value for the LCD_BACKLIGHT,
instead of hard code it.
For 2), we can check sysfs file "max_brightness" to get the max
backlight level.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to