Call Layer::getLayerDebugInfo from the main thread

Fixes an issue where drawing state could be accessed from a binder
thread. The function also mixed current state with drawing state
incorrectly. The function now only retrieves drawing state.

Bug: 150226608
Test: Steps in bug doesn't repro
Test: atest sffakehwc_test
Change-Id: I5537c53e8214e2785473839d71fd483d1a3219b6
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 113b035..f5be8a8 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -466,7 +466,7 @@
                                 HdrCapabilities* outCapabilities) const override;
     status_t enableVSyncInjections(bool enable) override;
     status_t injectVSync(nsecs_t when) override;
-    status_t getLayerDebugInfo(std::vector<LayerDebugInfo>* outLayers) const override;
+    status_t getLayerDebugInfo(std::vector<LayerDebugInfo>* outLayers) override;
     status_t getColorManagement(bool* outGetColorManagement) const override;
     status_t getCompositionPreference(ui::Dataspace* outDataspace, ui::PixelFormat* outPixelFormat,
                                       ui::Dataspace* outWideColorGamutDataspace,