Add VrFlinger dumpsys to SurfaceFlinger

When we do dumpsys SurfaceFlinger, we get no information about the
layers/what is composed when the device is in VR mode.

Bug: 63113212
Test:
VrFlinger state:
Application Surfaces:
Surface 0: surface_id=11 process_id=5550 user_id=10104 visible=1
z_order=0 queue_ids=29,37
Surface 1: surface_id=13 process_id=5035 user_id=10130 visible=1
z_order=0 queue_ids=53,65

Direct Surfaces:
Surface 0: surface_id=8 process_id=5563 user_id=10104 visible=1
z_order=0 queue_ids=17

Display metrics:     1440x2880 537.882x537.882 dpi @ 60 Hz
Post thread resumed: 1
Active layers:       1

Layer 0: type=Device surface_id=8 buffer_id=19

Hardware Composer Debug Info:
-------------------------------
HWC2 display_id: 0
layer:   30 z: 0 compositon: Device/Device alpha: 255 format:
RGBA_8888_UBWC dataspace:0x00000000 transform: 0/0/0 buffer_id:
0x70b4877500
color modes supported: 0 7 9 current mode: 7
current transform:
  1.08  -0.02  -0.02   0.00
  -0.07   1.03  -0.07   0.00
  -0.01  -0.01   1.09   0.00
  0.00   0.00   0.00   1.00
-------------------------------

This section doesn't appear when the device is not in VR mode.

Change-Id: I2961a05fc3ea303e070be08de355fb6e56c3d0db
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 8192968..d128a06 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3770,6 +3770,15 @@
      */
     const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
     alloc.dump(result);
+
+    /*
+     * Dump VrFlinger state if in use.
+     */
+    if (mVrFlingerRequestsDisplay && mVrFlinger) {
+        result.append("VrFlinger state:\n");
+        result.append(mVrFlinger->Dump().c_str());
+        result.append("\n");
+    }
 }
 
 const Vector< sp<Layer> >&