diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityTaskManagerService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index f55bcceeb8c7..703c6f18c721 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -5625,8 +5625,12 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { // We might change the visibilities here, so prepare an empty app transition which // might be overridden later if we actually change visibilities. - final DisplayWindowController dwc = mStackSupervisor.getActivityDisplay(displayId) - .getWindowContainerController(); + final ActivityDisplay activityDisplay = + mStackSupervisor.getActivityDisplay(displayId); + if (activityDisplay == null) { + return; + } + final DisplayWindowController dwc = activityDisplay.getWindowContainerController(); final boolean wasTransitionSet = dwc.getPendingAppTransition() != TRANSIT_NONE; if (!wasTransitionSet) { dwc.prepareAppTransition(TRANSIT_NONE, false /* alwaysKeepCurrent */); |