Fix the issue in which lowbat popup cannot be launched
authorJae-young <jae-young@mylinux.(none)>
Tue, 9 Jul 2013 09:02:20 +0000 (18:02 +0900)
committerJae-young <jae-young@mylinux.(none)>
Tue, 9 Jul 2013 09:02:20 +0000 (18:02 +0900)
Signed-off-by: Jae-young <jae-young@mylinux.(none)>
ss_lowbat_handler.c

index 62d4499..be86840 100755 (executable)
@@ -247,12 +247,13 @@ static int lowbat_process(int bat_percent, void *ad)
                }
        }
 
-       if (new_bat_capacity == cur_bat_capacity)
-               return 0;
-
        PRT_TRACE("[BATMON] Unknown battery state cur:%d new:%d",cur_bat_state,new_bat_state);
        cur_bat_state = new_bat_state;
-       return -1;
+
+       if (new_bat_capacity != cur_bat_capacity)
+               return -1;
+
+       return 0;
 }
 
 static int lowbat_read()