SF: Reset the active display on hotplug reconnect
Reconnecting the active display only called resetPhaseConfiguration, but
actually involves an active display change.
Bug: 255635821
Flag: EXEMPT bugfix
Test: Hotplug reconnect on ATV
Change-Id: I580d330196133a72ef6c833d93375b2d3f3ee78b
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index b8c69a0..dfb4e4f 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3838,11 +3838,8 @@
setPowerModeInternal(display, hal::PowerMode::ON);
}
- // TODO(b/175678251) Call a listener instead.
- if (currentState.physical->hwcDisplayId == getHwComposer().getPrimaryHwcDisplayId()) {
- const Fps refreshRate =
- mDisplayModeController.getActiveMode(display->getPhysicalId()).fps;
- mScheduler->resetPhaseConfiguration(refreshRate);
+ if (display->getPhysicalId() == mActiveDisplayId) {
+ onActiveDisplayChangedLocked(nullptr, *display);
}
}
return;