Only call dump when a ViewRoot actually exists
Bug: 11446494 Change-Id: I47e35d7b4d49d6893ba0c9f8ad05b31f91be85d2
This commit is contained in:
@@ -4857,7 +4857,11 @@ public class Activity extends ContextThemeWrapper
|
||||
|
||||
mFragments.dump(prefix, fd, writer, args);
|
||||
|
||||
getWindow().getDecorView().getViewRootImpl().dump(prefix, fd, writer, args);
|
||||
if (getWindow() != null &&
|
||||
getWindow().peekDecorView() != null &&
|
||||
getWindow().peekDecorView().getViewRootImpl() != null) {
|
||||
getWindow().peekDecorView().getViewRootImpl().dump(prefix, fd, writer, args);
|
||||
}
|
||||
|
||||
mHandler.getLooper().dump(new PrintWriterPrinter(writer), prefix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user