Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24f7a03d authored by Louis Chang's avatar Louis Chang
Browse files

Prevents NPE after stack got removed from display

Application crashed and the top activity was immediately
finished after paused timeout. If there was no activities
left in stack, it would be removed from display and updated
the display id to invalid. Therefore, the system crashed
in accessing a null ActivityDisplay object.

Bug: 120667451
Test: existing test pass

Change-Id: Ica978faf4233d8e6a709fa92f87d850f6ab8e061
parent c9c6a91e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1797,7 +1797,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
        // focus). Also if there is an active pinned stack - we always want to notify it about
        // task stack changes, because its positioning may depend on it.
        if (mStackSupervisor.mAppVisibilitiesChangedSinceLastPause
                || getDisplay().hasPinnedStack()) {
                || (getDisplay() != null && getDisplay().hasPinnedStack())) {
            mService.getTaskChangeNotificationController().notifyTaskStackChanged();
            mStackSupervisor.mAppVisibilitiesChangedSinceLastPause = false;
        }