Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f0c5020 authored by David Lin's avatar David Lin Committed by Android (Google) Code Review
Browse files

Merge "Revert^2 "Use the latest temperature read as base for headroom calculation"" into 24D1-dev

parents 6a9f4051 0a4add42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1806,7 +1806,7 @@ public class ThermalManagerService extends SystemService {
                        continue;
                    }

                    float currentTemperature = samples.get(0).temperature;
                    float currentTemperature = samples.get(samples.size() - 1).temperature;

                    if (samples.size() < MINIMUM_SAMPLE_COUNT) {
                        // Don't try to forecast, just use the latest one we have
+1 −1
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ public class ThermalManagerServiceTest {

        // Add some time-series data
        for (int i = 1; i < 20; ++i) {
            samples.add(0, watcher.createSampleForTesting(1000 * i, 25.0f + 0.5f * i));
            samples.add(watcher.createSampleForTesting(1000 * i, 25.0f + 0.5f * i));
        }

        // Now the forecast should vary depending on how far ahead we are trying to predict