SF: Layer children should call parents' onFirstRef

Classes which inherit indirectly from Layer and which override
onFirstRef need to also call their parents' onFirstRef to ensure that
Layer is initialized correctly.

Bug: 111854867
Test: atest UiAutomationTest#testWindowContentFrameStats
Change-Id: I5ceb531a5d59587ab489342d0b19a42c1a286402
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp
index 0913de4..80f741b 100644
--- a/services/surfaceflinger/BufferQueueLayer.cpp
+++ b/services/surfaceflinger/BufferQueueLayer.cpp
@@ -424,6 +424,8 @@
 // -----------------------------------------------------------------------
 
 void BufferQueueLayer::onFirstRef() {
+    BufferLayer::onFirstRef();
+
     // Creates a custom BufferQueue for SurfaceFlingerConsumer to use
     sp<IGraphicBufferProducer> producer;
     sp<IGraphicBufferConsumer> consumer;