文件:
vendor/marvell/dkb/lights/light.c
frameworks/base/services/jni/com_android_server_LightsService.cpp
frameworks/base/services/java/com/android/server/LightsService.java
frameworks/base/services/jni/com_android_server_LightsService.cpp通过jni提供了给上层的接口。
现在可以在这里操作:
36 LIGHT_INDEX_BACKLIGHT = 0,
37 LIGHT_INDEX_KEYBOARD = 1,
38 LIGHT_INDEX_BUTTONS = 2,
39 LIGHT_INDEX_BATTERY = 3,
40 LIGHT_INDEX_NOTIFICATIONS = 4,
41 LIGHT_INDEX_ATTENTION = 5,
42 LIGHT_INDEX_BLUETOOTH = 6,
43 LIGHT_INDEX_WIFI = 7,
android的背光的做法是比较常见的HAL。(即使用HAL_MODULE_INFO_SYM/hw_module_methods_t)
HAL主要提供set_light的实现。
devices->lights[light]->set_light(devices->lights[light], &state);
marvell的light的HAL实现在:
vendor/marvell/dkb/lights