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

Commit 531b9037 authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Only move to pinned task if activity non finishing

When HIERARCHY_OP_TYPE_MOVE_PIP_ACTIVITY_TO_PINNED_TASK
is being applied upon request from Shell, we should make sure
the PiP activity is still non finishing one.

This is possible because while Shell is handling transition
request-start, Core is free to accept and process calls from the app,
such as the finishing of the activity that was requested to PiP earlier.

Bug: 433490150
FLAG: EXEMPT bugfix
Test: manually force-stop the activity while swiping-to-pip in ges-nav
Change-Id: I685142d14543780228ce05b65c9162f2cbd378f5
parent 758f4dc9
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -1439,9 +1439,8 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                            + " as there is no valid task provided");
                            + " as there is no valid task provided");
                    break;
                    break;
                }
                }
                ActivityRecord pipActivity = pipTaskFragment.getActivity(
                ActivityRecord pipActivity = pipTaskFragment.getTopNonFinishingActivity();
                        (activity) -> activity.pictureInPictureArgs != null);
                if (pipActivity == null || pipActivity.pictureInPictureArgs == null) {
                if (pipActivity == null) {
                    Slog.w(TAG, "Skip applying hierarchy operation " + hop
                    Slog.w(TAG, "Skip applying hierarchy operation " + hop
                            + " as the provided task has no PiP-able activity");
                            + " as the provided task has no PiP-able activity");
                    break;
                    break;