Dumping view capture directly to file instead of loading it
all in memory
This avoid OOM when processing large data
Bug: 241600398
Test: Verified on device
Change-Id: I76072d52e47bea3a2f9802ce3b23ddae58fe8d23
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 38b46b0..5ee9aa8 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3027,7 +3027,10 @@
writer.println(prefix + "\tmAppWidgetHost.isListening: " + mAppWidgetHost.isListening());
if (mViewCapture != null) {
- writer.println(prefix + "\tmViewCapture: " + mViewCapture.dumpToString());
+ writer.print(prefix + "\tmViewCapture: ");
+ writer.flush();
+ mViewCapture.dump(fd);
+ writer.println();
}
// Extra logging for general debugging