google_battery: record previous health active time for ac pause
1. Make sure every HEALTH_ACTIVE keeping 3 mins to estimate right time
2. Prevent enter <--> leave pause too many times
Bug: 201745988
Signed-off-by: Jenny Ho <[email protected]>
Change-Id: Id8f9deb7ef34a11637a6d2b54a8ae6826d6402de
(cherry picked from commit a146f1708b7dc39c67bd133d75944c43c59698e7)
diff --git a/google_bms.h b/google_bms.h
index 0f6f68e..446bc80 100644
--- a/google_bms.h
+++ b/google_bms.h
@@ -282,6 +282,7 @@
enum chg_health_state rest_state;
int rest_cc_max;
int rest_fv_uv;
+ ktime_t active_time;
};
#define CHG_HEALTH_REST_IS_ACTIVE(rest) \