Merge "LocalLog: add overloaded dump and reverseDump methods."
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package android.util;
|
package android.util;
|
||||||
|
|
||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -55,6 +56,10 @@ public final class LocalLog {
|
|||||||
|
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
|
dump(pw);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void dump(PrintWriter pw) {
|
||||||
Iterator<String> itr = mLog.iterator();
|
Iterator<String> itr = mLog.iterator();
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
pw.println(itr.next());
|
pw.println(itr.next());
|
||||||
@@ -62,6 +67,10 @@ public final class LocalLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void reverseDump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
public synchronized void reverseDump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
|
reverseDump(pw);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void reverseDump(PrintWriter pw) {
|
||||||
Iterator<String> itr = mLog.descendingIterator();
|
Iterator<String> itr = mLog.descendingIterator();
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
pw.println(itr.next());
|
pw.println(itr.next());
|
||||||
@@ -75,10 +84,16 @@ public final class LocalLog {
|
|||||||
}
|
}
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
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) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user