SF: Obey active display's RefreshRateConfigs

When a display becomes active, apply its RefreshRateConfigs' policy,
as it may have changed while the display was inactive.

When booting while folded, DisplayManager first sends DisplayModeSpecs
for each display, and then powers on the outer display. Before this CL,
the outer display would become the new active display, but its
DisplayManagerPolicy would never be applied.

This backport also includes I63d21c2216a3ab864b040bdb2c9e8fba0768b66a
for expanded unit tests.

Bug: 250421145
Test: Force 120 Hz, and reboot while folded.
Test: SetPowerModeInternalTest.activeDisplay{Boot,Single,Dual}
Change-Id: I15e0f5a280e62baf6d4e6ea2748d95342e79ac44
Merged-In: I15e0f5a280e62baf6d4e6ea2748d95342e79ac44
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 9e0cee8..64c0ae9 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -735,6 +735,8 @@
             const std::optional<scheduler::RefreshRateConfigs::Policy>& policy, bool overridePolicy)
             EXCLUDES(mStateLock);
 
+    status_t applyRefreshRateConfigsPolicy(const sp<DisplayDevice>&) REQUIRES(mStateLock);
+
     void commitTransactions() EXCLUDES(mStateLock);
     void commitTransactionsLocked(uint32_t transactionFlags) REQUIRES(mStateLock);
     void doCommitTransactions() REQUIRES(mStateLock);