google_battery: reinforce the usage of TEMP-DEFEND dry run

Bug: 175172404
Test: check VoltageTierStats when dry run and healthd log
Signed-off-by: Jenny Ho <[email protected]>
Change-Id: Iec75af8fd99ea68bc695be59c6b5af9edbb6b4a2
Signed-off-by: Ken Tsou <[email protected]>
(cherry picked from commit 569f577feee969df9dda638288070e7d8a5dfd6f)
diff --git a/google_battery.c b/google_battery.c
index 264e192..001599a 100644
--- a/google_battery.c
+++ b/google_battery.c
@@ -4719,7 +4719,11 @@
 
 	/* health */
 	case POWER_SUPPLY_PROP_HEALTH:
-		if (batt_drv->batt_health != POWER_SUPPLY_HEALTH_UNKNOWN) {
+		if (batt_drv->batt_health == POWER_SUPPLY_HEALTH_OVERHEAT &&
+		    gbms_temp_defend_dry_run(false, false)) {
+			val->intval = POWER_SUPPLY_HEALTH_GOOD;
+		} else if (batt_drv->batt_health !=
+			   POWER_SUPPLY_HEALTH_UNKNOWN) {
 			val->intval = batt_drv->batt_health;
 		} else if (!batt_drv->fg_psy) {
 			val->intval = POWER_SUPPLY_HEALTH_UNKNOWN;