Clean up FrameTimestamp log messages.

Test: Log message changes only. Existing tests pass.

Change-Id: I032c76393a4949b291c3a650279367caf05a775c
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index a854aec..8a6ec3c 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -82,7 +82,7 @@
         mCurrentOpacity(true),
         mBufferLatched(false),
         mCurrentFrameNumber(0),
-        mPreviousFrameNumber(-1U),
+        mPreviousFrameNumber(0),
         mRefreshPending(false),
         mFrameLatencyNeeded(false),
         mFiltering(false),
@@ -1903,8 +1903,10 @@
         Mutex::Autolock lock(mFrameEventHistoryMutex);
         mFrameEventHistory.addPostComposition(mCurrentFrameNumber,
                 glDoneFence, presentFence, compositorTiming);
-        mFrameEventHistory.addRetire(mPreviousFrameNumber,
-                retireFence);
+        if (mPreviousFrameNumber != 0) {
+            mFrameEventHistory.addRetire(mPreviousFrameNumber,
+                    retireFence);
+        }
     }
 
     // Update mFrameTracker.
@@ -1948,8 +1950,10 @@
     mReleaseTimeline.push(releaseFenceTime);
 
     Mutex::Autolock lock(mFrameEventHistoryMutex);
-    mFrameEventHistory.addRelease(
-            mPreviousFrameNumber, dequeueReadyTime, std::move(releaseFenceTime));
+    if (mPreviousFrameNumber != 0) {
+        mFrameEventHistory.addRelease(mPreviousFrameNumber,
+                dequeueReadyTime, std::move(releaseFenceTime));
+    }
 }
 #endif
 
@@ -2135,8 +2139,10 @@
         auto releaseFenceTime = std::make_shared<FenceTime>(
                 mSurfaceFlingerConsumer->getPrevFinalReleaseFence());
         mReleaseTimeline.push(releaseFenceTime);
-        mFrameEventHistory.addRelease(
-                mPreviousFrameNumber, latchTime, std::move(releaseFenceTime));
+        if (mPreviousFrameNumber != 0) {
+            mFrameEventHistory.addRelease(mPreviousFrameNumber,
+                    latchTime, std::move(releaseFenceTime));
+        }
 #endif
     }