SF: update mTimestamps with the newest hwvsync timestamp

When a HWvsync timestamp is dropped since it doesn't match the cadence
of the previous ones, it may still be valid (especially when the older
ones are outdated). In that case update mKnownTimestamp with the new
timestamp.

Bug: 190422841
Test: Tap infrequently in TouchLatency and observe systraces
Change-Id: I10ec8dc1781c891ca280deb2e74bf6e17ce797c5
diff --git a/services/surfaceflinger/Scheduler/VSyncPredictor.cpp b/services/surfaceflinger/Scheduler/VSyncPredictor.cpp
index 028f7a6..329e4a0 100644
--- a/services/surfaceflinger/Scheduler/VSyncPredictor.cpp
+++ b/services/surfaceflinger/Scheduler/VSyncPredictor.cpp
@@ -86,6 +86,9 @@
         // in the learning phase we should just clear all timestamps and start
         // over.
         if (mTimestamps.size() < kMinimumSamplesForPrediction) {
+            // Add the timestamp to mTimestamps before clearing it so we could
+            // update mKnownTimestamp based on the new timestamp.
+            mTimestamps.push_back(timestamp);
             clearTimestamps();
         } else if (!mTimestamps.empty()) {
             mKnownTimestamp =