From 311ecba9818a6b09a0061a3f3fae84043f333f40 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 27 Apr 2016 12:59:45 -0700 Subject: [PATCH] Fix crash when docking. ViewRootImpl may be null at this point if we didn't preserve. Sorry about the churn. Bug: 28413589 Change-Id: Iebfd819490252b52332d94ccefbddfae160087cf --- core/java/android/app/ActivityThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 0764ff41efaf3..f7c0b4c32bc90 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -3479,7 +3479,9 @@ public final class ActivityThread { // the decor view we have to notify the view root that the // callbacks may have changed. ViewRootImpl impl = decor.getViewRootImpl(); - impl.notifyChildRebuilt(); + if (impl != null) { + impl.notifyChildRebuilt(); + } } if (a.mVisibleFromClient && !a.mWindowAdded) { a.mWindowAdded = true;