Compressing view capture data and changing the format to avoid
storing duplicate strings Also starting the dump process early to avoid timeouts Bug: 242868825 Test: Verified on web-hv UI tool Change-Id: I9943e41426f820c9ab70d39b9f01896ed060cab4
This commit is contained in:
1 parent
1b3b71f2d7
commit
c9c81ef320
3 files changed
+101
-51
No files matched your search
@@ -1491,9 +1491,9 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
if (FeatureFlags.CONTINUOUS_VIEW_TREE_CAPTURE.get()) {
|
||||
View root = getDragLayer().getRootView();
|
||||
if (mViewCapture != null) {
|
||||
root.getViewTreeObserver().removeOnDrawListener(mViewCapture);
|
||||
mViewCapture.detach();
|
||||
}
|
||||
mViewCapture = new ViewCapture(root);
|
||||
mViewCapture = new ViewCapture(getWindow());
|
||||
mViewCapture.attach();
|
||||
}
|
||||
}
|
||||
@@ -1501,6 +1501,10 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
if (mViewCapture != null) {
|
||||
mViewCapture.detach();
|
||||
mViewCapture = null;
|
||||
}
|
||||
mOverlayManager.onDetachedFromWindow();
|
||||
closeContextMenu();
|
||||
}
|
||||
@@ -2981,6 +2985,7 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
*/
|
||||
@Override
|
||||
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
|
||||
SafeCloseable viewDump = mViewCapture == null ? null : mViewCapture.beginDump(writer, fd);
|
||||
super.dump(prefix, fd, writer, args);
|
||||
|
||||
if (args.length > 0 && TextUtils.equals(args[0], "--all")) {
|
||||
@@ -3015,19 +3020,16 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
writer.println(prefix + "\tmRotationHelper: " + mRotationHelper);
|
||||
writer.println(prefix + "\tmAppWidgetHost.isListening: " + mAppWidgetHost.isListening());
|
||||
|
||||
if (mViewCapture != null) {
|
||||
writer.print(prefix + "\tmViewCapture: ");
|
||||
writer.flush();
|
||||
mViewCapture.dump(fd);
|
||||
writer.println();
|
||||
}
|
||||
|
||||
// Extra logging for general debugging
|
||||
mDragLayer.dump(prefix, writer);
|
||||
mStateManager.dump(prefix, writer);
|
||||
mPopupDataProvider.dump(prefix, writer);
|
||||
mDeviceProfile.dump(this, prefix, writer);
|
||||
|
||||
if (viewDump != null) {
|
||||
viewDump.close();
|
||||
}
|
||||
|
||||
try {
|
||||
FileLog.flushAll(writer);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in new issue
Block a user