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

Commit a49e0954 authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Fix checking crop region for home/recents" into rvc-dev am: 81fa33a7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11886045

Change-Id: I93c45bfbe992b04565f336e4cd0a9ba15d90d3fe
parents 6cd9cfd3 81fa33a7
Loading
Loading
Loading
Loading
+11 −3
Original line number Original line Diff line number Diff line
@@ -2927,9 +2927,17 @@ class Task extends WindowContainer<WindowContainer> {
        // Don't crop HOME/RECENTS windows to stack bounds. This is because in split-screen
        // Don't crop HOME/RECENTS windows to stack bounds. This is because in split-screen
        // they extend past their stack and sysui uses the stack surface to control cropping.
        // they extend past their stack and sysui uses the stack surface to control cropping.
        // TODO(b/158242495): get rid of this when drag/drop can use surface bounds.
        // TODO(b/158242495): get rid of this when drag/drop can use surface bounds.
        final boolean isTopHomeOrRecents = (isActivityTypeHome() || isActivityTypeRecents())
        if (isActivityTypeHome() || isActivityTypeRecents()) {
                && getRootTask().getTopMostTask() == this;
            // Make sure this is the top-most non-organizer root task (if not top-most, it means
        return isResizeable() && !isTopHomeOrRecents;
            // another translucent task could be above this, so this needs to stay cropped.
            final Task rootTask = getRootTask();
            final Task topNonOrgTask =
                    rootTask.mCreatedByOrganizer ? rootTask.getTopMostTask() : rootTask;
            if (isDescendantOf(topNonOrgTask)) {
                return false;
            }
        }
        return isResizeable();
    }
    }


    /**
    /**
+1 −0
Original line number Original line Diff line number Diff line
@@ -3416,6 +3416,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    private void setTouchableRegionCropIfNeeded(InputWindowHandle handle) {
    private void setTouchableRegionCropIfNeeded(InputWindowHandle handle) {
        final Task task = getTask();
        final Task task = getTask();
        if (task == null || !task.cropWindowsToStackBounds()) {
        if (task == null || !task.cropWindowsToStackBounds()) {
            handle.setTouchableRegionCrop(null);
            return;
            return;
        }
        }