Commit 808cd092 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Handle malformed UTF-8 in logcat streams (#8864)

parent 031e042e
......@@ -603,8 +603,9 @@ class _AdbLogReader extends DeviceLogReader {
_timeOrigin = null;
runCommand(device.adbCommandForDevice(args)).then<Null>((Process process) {
_process = process;
_process.stdout.transform(UTF8.decoder).transform(const LineSplitter()).listen(_onLine);
_process.stderr.transform(UTF8.decoder).transform(const LineSplitter()).listen(_onLine);
final Utf8Decoder decoder = new Utf8Decoder(allowMalformed: true);
_process.stdout.transform(decoder).transform(const LineSplitter()).listen(_onLine);
_process.stderr.transform(decoder).transform(const LineSplitter()).listen(_onLine);
_process.exitCode.whenComplete(() {
if (_linesController.hasListener)
_linesController.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment