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

Commit 7c447498 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "LocalLog: add overloaded dump and reverseDump methods."

parents 3649374e d7be4c70
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.util;

import android.annotation.UnsupportedAppUsage;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.time.LocalDateTime;
@@ -55,6 +56,10 @@ public final class LocalLog {

    @UnsupportedAppUsage
    public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        dump(pw);
    }

    public synchronized void dump(PrintWriter pw) {
        Iterator<String> itr = mLog.iterator();
        while (itr.hasNext()) {
            pw.println(itr.next());
@@ -62,6 +67,10 @@ public final class LocalLog {
    }

    public synchronized void reverseDump(FileDescriptor fd, PrintWriter pw, String[] args) {
        reverseDump(pw);
    }

    public synchronized void reverseDump(PrintWriter pw) {
        Iterator<String> itr = mLog.descendingIterator();
        while (itr.hasNext()) {
            pw.println(itr.next());
@@ -75,10 +84,16 @@ public final class LocalLog {
        }
        @UnsupportedAppUsage
        public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            mLog.dump(fd, pw, args);
            mLog.dump(pw);
        }
        public void dump(PrintWriter pw) {
            mLog.dump(pw);
        }
        public void reverseDump(FileDescriptor fd, PrintWriter pw, String[] args) {
            mLog.reverseDump(fd, pw, args);
            mLog.reverseDump(pw);
        }
        public void reverseDump(PrintWriter pw) {
            mLog.reverseDump(pw);
        }
    }