Restore ability of system to screenshot secure layers.

In previous iterations of the code the "secureLayerIsVisible" block
had a guard for "localProducer" which was set to true if the IGBP we
were screenshotting to was originally allocated by SurfaceFlinger. What
this means is that it came from a SurfaceControl, rather than just being
allocated on the client side. Note that the caller could still read the
Screenshot back out from the surface, so the old logic just ensured
you can't screenshot secure layers unless you have a SurfaceControl. Having
a SurfaceControl meant you had either the permission ACCESS_SURFACE_FLINGER,
were from AID_SYSTEM/AID_GRAPHICS, or had been granted a SurfaceControl. This
allowed the system server to screenshot secure layers for the screen rotation
animation. When switching to the GraphicBuffer based interface we eliminated
this permisivity. This CL reintroduces it in what is hopefully
a clearer way, by explicitly only granting the ability to system
components.

Bug: 70403018
Test: Manual
Change-Id: Icbc51e897f5d46838a68c1387e993b8e6a68cd1d
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 2477bdc..8030fbd 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -524,7 +524,7 @@
     status_t captureScreenImplLocked(const RenderArea& renderArea,
                                      TraverseLayersFunction traverseLayers,
                                      ANativeWindowBuffer* buffer, bool useIdentityTransform,
-                                     int* outSyncFd);
+                                     bool forSystem, int* outSyncFd);
     void traverseLayersInDisplay(const sp<const DisplayDevice>& display, int32_t minLayerZ,
                                  int32_t maxLayerZ, const LayerVector::Visitor& visitor);