logd: regression in handling watermark boundary.

(cherry pick from commit a354d42ec18f59a466b7ac57e456b1860e9e4f85)

Deal with a regression introduced in commit
da1b4a18bbb3867ff71ff2b998b7d579e3ab2462 (logd: drop mSequence from
LogBufferElement) where log_time was compared against nsec() time
miscalculating the watermark boundary.  When dealing with logcat
-t/-T, or any tail reading, add a margin to prune to back off by a
period of 3 seconds (pruneMargin).

Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I72ea858e4e7b5fa91741ea84c40d2e7c3c4aa031
2 files changed
tree: 276304ba371cfcb1175772dd665f1e3ea790e2de
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/