From b5aebd01a43b8d1a38bb20b5e7efbe263afdef5f Mon Sep 17 00:00:00 2001 From: h00013079 Date: Tue, 27 Aug 2024 21:41:38 +0800 Subject: Fix CtsOsTestCases.android.os.cts.PowerManager_ThermalTest#testGetThermalHeadroomThresholds errors ThermalManagerService service updateThresholds function, when initializing HeadroomThresholds, do mask processing for SEVERE. Cause GetThermalHeadroomThresholds interface return value NAN in SEVERE patients, so testGetThermalHeadroomThresholds CTS case fails. The patch in updateThresholds function delete "shielding SEVERE logic", making testGetThermalHeadroomThresholds CTS test pass Bug:361828367 Change-Id: Idb2241ae39a5aa262fb6221a3fbb08771be5387a Signed-off-by: huangdezhi@hihonor.com --- services/core/java/com/android/server/power/ThermalManagerService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/power/ThermalManagerService.java b/services/core/java/com/android/server/power/ThermalManagerService.java index 24d7acd772c1..226e5fe3a6b6 100644 --- a/services/core/java/com/android/server/power/ThermalManagerService.java +++ b/services/core/java/com/android/server/power/ThermalManagerService.java @@ -1609,8 +1609,7 @@ public class ThermalManagerService extends SystemService { if (Flags.allowThermalHeadroomThresholds()) { for (int severity = ThrottlingSeverity.LIGHT; severity <= ThrottlingSeverity.SHUTDOWN; severity++) { - if (severity != ThrottlingSeverity.SEVERE - && threshold.hotThrottlingThresholds.length > severity) { + if (threshold.hotThrottlingThresholds.length > severity) { updateHeadroomThreshold(severity, threshold.hotThrottlingThresholds[severity], severeThreshold); -- cgit v1.2.3-59-g8ed1b