Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8225c852 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Improve "dumpsys activity lastanr-traces"."

parents 19bbcfff 685f7439
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12763,12 +12763,13 @@ public class ActivityManagerService extends IActivityManager.Stub
        final File[] files = new File(ANR_TRACE_DIR).listFiles();
        if (ArrayUtils.isEmpty(files)) {
            pw.println("  <no ANR has occurred since boot>");
            return;
        }
        // Find the latest file.
        File latest = null;
        for (File f : files) {
            if (latest == null || latest.getName().compareTo(f.getName()) < 0) {
            if ((latest == null) || (latest.lastModified() < f.lastModified())) {
                latest = f;
            }
        }