Fix unexpected FrameEvents on BufferQueue reconnect
Helps reduce the number of ALOGE's being hit
when switching between apps.
* Notify Layer when the Producer disconnects.
* Avoid sending event deltas from a previous connection.
* Avoid releasing a frame more than once.
Test: adb shell /data/nativetest/libgui_test/libgui_test
--gtest_filter=*GetFrameTimestamps*
Change-Id: I64f314be72ddb154b584d726ac382cd468e345bf
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 8227dae..d979a41 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -446,6 +446,7 @@
std::vector<OccupancyTracker::Segment> getOccupancyHistory(bool forceFlush);
+ void onDisconnect();
void addAndGetFrameTimestamps(const NewFrameEventsEntry* newEntry,
FrameEventHistoryDelta* outDelta);