Handle return value 0 from android_logger_list_read

This fixes the bug that sometimes statsd is running at 99% cpu.
Connection to logd can be reset for various reasons, and android_logger_list_read
will return 0 when that happens. We didn't handle 0 before, and that leads to reading
empty logs and processing them in a infinite loop.

Bug: 71833883
Test: manual test by killing logd, forcing return 0.
Change-Id: I5a9c89fc58959d6593028a14f70a8fe8d10b40f1
1 file changed