Added ability to capture secure layers in captureLayers

Bug: 156890155
Test: Maximize secure freeform window
Test: ScreenCaptureTest
Change-Id: I05fdd145ece6840192895822cf1a8ee34cf7871b
diff --git a/services/surfaceflinger/DisplayRenderArea.cpp b/services/surfaceflinger/DisplayRenderArea.cpp
index bcebf23..4bae669 100644
--- a/services/surfaceflinger/DisplayRenderArea.cpp
+++ b/services/surfaceflinger/DisplayRenderArea.cpp
@@ -85,10 +85,9 @@
                                      ui::Size reqSize, ui::Dataspace reqDataSpace,
                                      RotationFlags rotation, bool allowSecureLayers)
       : RenderArea(reqSize, CaptureFill::OPAQUE, reqDataSpace, display->getViewport(),
-                   applyDeviceOrientation(rotation, *display)),
+                   allowSecureLayers, applyDeviceOrientation(rotation, *display)),
         mDisplay(std::move(display)),
-        mSourceCrop(sourceCrop),
-        mAllowSecureLayers(allowSecureLayers) {}
+        mSourceCrop(sourceCrop) {}
 
 const ui::Transform& DisplayRenderArea::getTransform() const {
     return mTransform;