forked from firka/flutter
Handle case where lastLogcatTimestamp is null (#45937)
This commit is contained in:
@@ -1009,7 +1009,13 @@ class _AdbLogReader extends DeviceLogReader {
|
||||
void _start() {
|
||||
final String lastTimestamp = device.lastLogcatTimestamp;
|
||||
// Start the adb logcat process and filter the most recent logs since `lastTimestamp`.
|
||||
final List<String> args = <String>['logcat', '-v', 'time', '-T', lastTimestamp];
|
||||
final List<String> args = <String>[
|
||||
'logcat',
|
||||
'-v',
|
||||
'time',
|
||||
'-T',
|
||||
lastTimestamp ?? '', // Empty `-T` means the timestamp of the logcat command invocation.
|
||||
];
|
||||
processUtils.start(device.adbCommandForDevice(args)).then<void>((Process process) {
|
||||
_process = process;
|
||||
// We expect logcat streams to occasionally contain invalid utf-8,
|
||||
|
||||
Reference in New Issue
Block a user