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

Commit e6c9f81e authored by Maryam Dehaini's avatar Maryam Dehaini
Browse files

Allow pinned activities to enter fullscreen using the api

Currently, the api assumes that the request is coming from the top most
focused activity. However, it may come from a pinned task, and, in that
case, that would not be true. This change removes that assumption by
passing in the task the activity is in rather than passing in the top
focused task.

Bug: 315352482
Test: Test using multiwindow fullscreen api test app (ag/20460053)
Change-Id: I86a9d7f3a8bebb8585f28343ab8623bce1bdaf4f
parent 1ecc9b91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3061,7 +3061,7 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * Request to put the freeform activity into fullscreen. The requester has to be the top-most
     * Request to put the activity into fullscreen. The requester must be pinned or the top-most
     * activity of the focused display which can be verified using
     * {@link #onTopResumedActivityChanged(boolean)}. The request should also be a response to a
     * user input. When getting fullscreen and receiving corresponding
+5 −4
Original line number Diff line number Diff line
@@ -1166,11 +1166,12 @@ class ActivityClientController extends IActivityClientController.Stub {
            transition.abort();
            return;
        }
        transition.collect(topFocusedRootTask);
        executeMultiWindowFullscreenRequest(fullscreenRequest, topFocusedRootTask);
        r.mTransitionController.requestStartTransition(transition, topFocusedRootTask,
        final Task requestingTask = r.getTask();
        transition.collect(requestingTask);
        executeMultiWindowFullscreenRequest(fullscreenRequest, requestingTask);
        r.mTransitionController.requestStartTransition(transition, requestingTask,
                null /* remoteTransition */, null /* displayChange */);
        transition.setReady(topFocusedRootTask, true);
        transition.setReady(requestingTask, true);
    }

    private static void reportMultiwindowFullscreenRequestValidatingResult(IRemoteCallback callback,