summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2013-11-01 20:11:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-01 20:11:48 +0000
commit4846a93b55d7c8bf1af78cbeb3389801cff28e99 (patch)
treea0cb68f029422bbe88ecbb9c24570c75d6fec43f
parent17d28ca3d76e943e30bdaafb98596cf35bb45087 (diff)
parent5f48dc7409669c78ad923b370c885e1d01919cfb (diff)
downloadframeworks_base-4846a93b55d7c8bf1af78cbeb3389801cff28e99.zip
frameworks_base-4846a93b55d7c8bf1af78cbeb3389801cff28e99.tar.gz
frameworks_base-4846a93b55d7c8bf1af78cbeb3389801cff28e99.tar.bz2
Merge "Only call dump when a ViewRoot actually exists" into klp-dev
-rw-r--r--core/java/android/app/Activity.java6
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);
}