Merge "Check if sensor is accessible on flush" into rvc-dev am: 9aacd0cffd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/12091816

Change-Id: I7efa988c3c6d7f01d9d50918553ac83d2e7bc8b3
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 07690cb..0ac3d32 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2121,7 +2121,8 @@
         mTimeStats->incrementCompositionStrategyChanges();
     }
 
-    mVSyncModulator->onRefreshed(mHadClientComposition);
+    // TODO: b/160583065 Enable skip validation when SF caches all client composition layers
+    mVSyncModulator->onRefreshed(mHadClientComposition || mReusedClientComposition);
 
     mLayersWithQueuedFrames.clear();
     if (mVisibleRegionsDirty) {