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

Commit fb64dbe4 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Abort transition for invisible background launch

In case there won't be any operation to resume top activity to
invoke transition#setReady.

Bug: 370682768
Bug: 372405077
Flag: EXEMPT bugfix
Test: Start a new task with ActivityOptions#setAvoidMoveToFront.
      There won't be transition timeout.
Change-Id: I703534666727bb6c720cb3e099bc42722dcc6b16
parent 8ac5a154
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1760,6 +1760,13 @@ class ActivityStarter {
            startedActivityRootTask.setAlwaysOnTop(true);
        }

        if (isIndependentLaunch && !mDoResume && avoidMoveToFront() && !mTransientLaunch
                && !started.shouldBeVisible(true /* ignoringKeyguard */)) {
            Slog.i(TAG, "Abort " + transition + " of invisible launch " + started);
            transition.abort();
            return startedActivityRootTask;
        }

        // If there is no state change (e.g. a resumed activity is reparented to top of
        // another display) to trigger a visibility/configuration checking, we have to
        // update the configuration for changing to different display.