充电相关文件目录 alps\vendor\mediatek\proprietary\external\charger\
充电控制函数:charging_control.cpp
// total_time : ms
// interval : ms
static void draw_with_interval(void (*func)(int, int), int bc, int total_time_msec, int interval_msec)
{
struct timeval start;
int resume_started = 0, backlight_started = 0, cnt = 0;
int fd_fb = -1, err = 0;
char filename[32] = {0};
gettimeofday(&start, NULL);
while((!time_exceed(start, total_time_msec)) && (common_flag == false))
{
// check if need to draw animation before performing drawing
if (!is_charging_source_available())
return;
if (!resume_started) {
resume_started = 1;
request_suspend(false);
/* make fb unblank */
snprintf(filename, sizeof(filename), "/dev/graphics/fb0");
fd_fb = open(filename, O_RDWR);
if (fd_fb < 0) {
KPOC_LOGI("Failed to open