Check ADPF SF flag in PowerAdvisor only after boot is completed

Bug: 334974544
Test: atest libcompositionengine_test PowerAdvisorTest
Change-Id: I3523b8af04a1e9354e8212addf1c826dbe37a35b
diff --git a/services/surfaceflinger/CompositionEngine/src/Display.cpp b/services/surfaceflinger/CompositionEngine/src/Display.cpp
index 3d35704..c18be7a 100644
--- a/services/surfaceflinger/CompositionEngine/src/Display.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Display.cpp
@@ -412,6 +412,10 @@
     return mPowerAdvisor != nullptr && mPowerAdvisor->usePowerHintSession();
 }
 
+bool Display::isPowerHintSessionGpuReportingEnabled() {
+    return mPowerAdvisor != nullptr && mPowerAdvisor->supportsGpuReporting();
+}
+
 // For ADPF GPU v0 this is expected to set start time to when the GPU commands are submitted with
 // fence returned, i.e. when RenderEngine flushes the commands and returns the draw fence.
 void Display::setHintSessionGpuStart(TimePoint startTime) {
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index 1f01b57..84f3f25 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -1214,7 +1214,7 @@
     if (!optReadyFence) {
         return;
     }
-    if (isPowerHintSessionEnabled() && !FlagManager::getInstance().adpf_gpu_sf()) {
+    if (isPowerHintSessionEnabled() && !isPowerHintSessionGpuReportingEnabled()) {
         // get fence end time to know when gpu is complete in display
         setHintSessionGpuFence(
                 std::make_unique<FenceTime>(sp<Fence>::make(dup(optReadyFence->get()))));
@@ -1363,7 +1363,7 @@
         if (fence != Fence::NO_FENCE && fence->isValid() &&
             !outputCompositionState.reusedClientComposition) {
             setHintSessionRequiresRenderEngine(true);
-            if (FlagManager::getInstance().adpf_gpu_sf()) {
+            if (isPowerHintSessionGpuReportingEnabled()) {
                 // the order of the two calls here matters as we should check if the previously
                 // tracked fence has signaled first and archive the previous start time
                 setHintSessionGpuStart(TimePoint::now());
@@ -1563,6 +1563,10 @@
     return false;
 }
 
+bool Output::isPowerHintSessionGpuReportingEnabled() {
+    return false;
+}
+
 void Output::presentFrameAndReleaseLayers() {
     ATRACE_FORMAT("%s for %s", __func__, mNamePlusId.c_str());
     ALOGV(__FUNCTION__);