Merge "Always set phase offsets in setRefreshRateTo."
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index cf8cd7c..33455b9 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1457,12 +1457,13 @@
         return;
     }
 
+    mPhaseOffsets->setRefreshRateType(refreshRate);
+
     const auto display = getDisplayDeviceLocked(displayToken);
     if (desiredConfigId == display->getActiveConfig()) {
         return;
     }
 
-    mPhaseOffsets->setRefreshRateType(refreshRate);
     setDesiredActiveConfig({refreshRate, desiredConfigId, getInternalDisplayTokenLocked(), event});
 }