SF: Extract processHotplug from configureLocked
As a precondition, assert that disconnected displays are known, i.e. a
display token exists.
Bug: 241285876
Test: libsurfaceflinger_unittest
Change-Id: I42e183390d29a8fe9b2cd4837a94843efb2e1d2c
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index bbe1589..2b230b3 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -915,6 +915,11 @@
bool configureLocked() REQUIRES(mStateLock) REQUIRES(kMainThreadContext)
EXCLUDES(mHotplugMutex);
+ // Returns a string describing the hotplug, or nullptr if it was rejected.
+ const char* processHotplug(PhysicalDisplayId, hal::HWDisplayId, bool connected,
+ DisplayIdentificationInfo&&) REQUIRES(mStateLock)
+ REQUIRES(kMainThreadContext);
+
sp<DisplayDevice> setupNewDisplayDeviceInternal(
const wp<IBinder>& displayToken,
std::shared_ptr<compositionengine::Display> compositionDisplay,