AidlComposer: read flag to determine number of readers

Follow-on to I28169352933dcc76ab9778a5a14a191867ea42f7. While that CL
doesn't (or at least shouldn't) change any user visible behavior,
it does slightly change the implementation. This CL makes it so that
the implementation only changes if the trunk stable flag (or debug
sysprop) is set.

Bug: 259132483
Bug: 284156408
Test: manual
Change-Id: I1ba3b4909129aba14036cfd34a5c3126b2483228
diff --git a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
index 62701f3..cc2f6c7 100644
--- a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
@@ -1575,6 +1575,7 @@
 }
 
 bool AidlComposer::hasMultiThreadedPresentSupport(Display display) {
+    if (!FlagManager::getInstance().multithreaded_present()) return false;
     const auto displayId = translate<int64_t>(display);
     std::vector<AidlDisplayCapability> capabilities;
     const auto status = mAidlComposerClient->getDisplayCapabilities(displayId, &capabilities);