Add plumbing for dumping database info using dumpsys.
Change-Id: I51b0364c3d3d41aa38a759fbce48e625fff1b2dd
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 9e88bc6..bac3c6c 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -65,6 +65,7 @@
import android.util.EventLog;
import android.util.Log;
import android.util.LogPrinter;
+import android.util.PrintWriterPrinter;
import android.util.Slog;
import android.view.Display;
import android.view.HardwareRenderer;
@@ -1039,6 +1040,14 @@
WindowManagerImpl.getDefault().dumpGfxInfo(fd);
}
+ @Override
+ public void dumpDbInfo(FileDescriptor fd, String[] args) {
+ PrintWriter pw = new PrintWriter(new FileOutputStream(fd));
+ PrintWriterPrinter printer = new PrintWriterPrinter(pw);
+ SQLiteDebug.dump(printer, args);
+ pw.flush();
+ }
+
private void printRow(PrintWriter pw, String format, Object...objs) {
pw.println(String.format(format, objs));
}