summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/power/ThermalManagerService.java4
1 files changed, 2 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 6847a5c699ac..dc6b1644db4d 100644
--- a/services/core/java/com/android/server/power/ThermalManagerService.java
+++ b/services/core/java/com/android/server/power/ThermalManagerService.java
@@ -1628,9 +1628,9 @@ public class ThermalManagerService extends SystemService {
long mInactivityThresholdMillis = INACTIVITY_THRESHOLD_MILLIS;
void updateThresholds() {
- synchronized (mSamples) {
- List<TemperatureThreshold> thresholds =
+ List<TemperatureThreshold> thresholds =
mHalWrapper.getTemperatureThresholds(true, Temperature.TYPE_SKIN);
+ synchronized (mSamples) {
if (Flags.allowThermalHeadroomThresholds()) {
Arrays.fill(mHeadroomThresholds, Float.NaN);
}