diff options
author | Michael Wright <michaelwr@google.com> | 2013-11-01 12:42:49 -0700 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2013-11-01 12:42:49 -0700 |
commit | 5f48dc7409669c78ad923b370c885e1d01919cfb (patch) | |
tree | 068ed9a78f5a0af9d29dab9dd775baecf1cbd107 | |
parent | c779c01eccd22550e3440953530442772792e6c1 (diff) | |
download | frameworks_base-5f48dc7409669c78ad923b370c885e1d01919cfb.zip frameworks_base-5f48dc7409669c78ad923b370c885e1d01919cfb.tar.gz frameworks_base-5f48dc7409669c78ad923b370c885e1d01919cfb.tar.bz2 |
Only call dump when a ViewRoot actually exists
Bug: 11446494
Change-Id: I47e35d7b4d49d6893ba0c9f8ad05b31f91be85d2
-rw-r--r-- | core/java/android/app/Activity.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 193724d..d6db8c2 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -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); } |