diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-06-24 13:46:13 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-06-24 18:16:48 -0700 |
commit | 8c84109b9fbbf473b225707a38261ff5f99d95fb (patch) | |
tree | 9796143a5fb2980d58612a247a737448a428f742 /core/java/android/view/WindowManagerGlobal.java | |
parent | 3af16b226b8467100091b4e02fc3e70a002d567e (diff) | |
download | frameworks_base-8c84109b9fbbf473b225707a38261ff5f99d95fb.zip frameworks_base-8c84109b9fbbf473b225707a38261ff5f99d95fb.tar.gz frameworks_base-8c84109b9fbbf473b225707a38261ff5f99d95fb.tar.bz2 |
Use FastPrintWriter... everywhere.
One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result. Now
you need to first flush the FastPrintWriter.
Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.
Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
Diffstat (limited to 'core/java/android/view/WindowManagerGlobal.java')
-rw-r--r-- | core/java/android/view/WindowManagerGlobal.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 7cda01c..0eb6d63 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -29,6 +29,7 @@ import android.util.AndroidRuntimeException; import android.util.ArraySet; import android.util.Log; import android.view.inputmethod.InputMethodManager; +import com.android.internal.util.FastPrintWriter; import java.io.FileDescriptor; import java.io.FileOutputStream; @@ -414,7 +415,7 @@ public final class WindowManagerGlobal { public void dumpGfxInfo(FileDescriptor fd) { FileOutputStream fout = new FileOutputStream(fd); - PrintWriter pw = new PrintWriter(fout); + PrintWriter pw = new FastPrintWriter(fout); try { synchronized (mLock) { final int count = mViews.size(); |