From d2a1e125e9c72f4c0c7df0bc4e1cef2fb0b77472 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 2 Feb 2017 12:48:53 -0800 Subject: [PATCH] Do not print logs whose timestamp is equal to the last timestamp seen (#7827) If the tool is started immediately after a previous run of the tool, then the most recent log timestamp may come from the previous run's logs. The new instance of the tool should not print those logs. This was happening during runs of the microbenchmark script. --- packages/flutter_tools/lib/src/android/android_device.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index aef15f8edc..3d96dbebcb 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -628,7 +628,7 @@ class _AdbLogReader extends DeviceLogReader { if (_timeOrigin != null) { final String timestamp = timeMatch.group(0); DateTime time = _adbTimestampToDateTime(timestamp); - if (time.isBefore(_timeOrigin)) { + if (!time.isAfter(_timeOrigin)) { // Ignore log messages before the origin. return; }