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

Commit 49129bcd authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Update non-inherited task surface crops during syncs" into main

parents 51dc2014 066b8a16
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -489,3 +489,13 @@ flag {
    description: "Use a fallback transition-player while sysui is starting or crashed."
    bug: "365884835"
}

flag {
    name: "update_task_crop_in_sync"
    namespace: "windowing_frontend"
    description: "Fixes a bug where we fail to update task crops during transitions"
    bug: "410684072"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
+7 −2
Original line number Diff line number Diff line
@@ -2426,14 +2426,19 @@ class Task extends TaskFragment {
    }

    void updateSurfaceSize(SurfaceControl.Transaction transaction) {
        if (mSurfaceControl == null || isOrganized()) {
        final boolean inSync = mSyncState != SYNC_STATE_NONE;
        if (mSurfaceControl == null
                // Organized tasks are controlled by shell, so only manipulate those surfaces
                // during syncs
                || (isOrganized() && (!Flags.updateTaskCropInSync() || !inSync))) {
            return;
        }

        // Apply crop to root tasks only and clear the crops of the descendant tasks.
        int width = 0;
        int height = 0;
        if (isRootTask() && !mTransitionController.mIsWaitingForDisplayEnabled) {
        if ((isRootTask() || (Flags.updateTaskCropInSync() && !fillsParentBounds()))
                && !mTransitionController.mIsWaitingForDisplayEnabled) {
            final Rect taskBounds = getBounds();
            width = taskBounds.width();
            height = taskBounds.height();