summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author h00013079 <huangdezhi@hihonor.com> 2024-08-27 21:41:38 +0800
committer h00013079 <huangdezhi@hihonor.com> 2024-08-27 21:41:38 +0800
commitb5aebd01a43b8d1a38bb20b5e7efbe263afdef5f (patch)
treed4d9b3de54a27e930d94f1ecadfbc54d074b4266
parentf740e50a2b02a197a9a56285ef66163e7169a066 (diff)
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
-rw-r--r--services/core/java/com/android/server/power/ThermalManagerService.java3
1 files changed, 1 insertions, 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);