From b5c162bd73f3a83daf905ad1e62f79837a262b1f Mon Sep 17 00:00:00 2001 From: chaviw Date: Wed, 9 Dec 2020 18:02:52 -0800 Subject: [PATCH] Clear child task crop in split so it matches parent crop When in split, we don't want to give the child task a crop. The parent has logic how to handle crop and adjust properly when drag resizing. It's better to just let the child task match the parent task. Fixes: 175260017 Test: Background appears when drag resizing split Change-Id: I8f0e3d0773f10889030e0ce4d600dbed2b13ed39 --- .../wm/shell/splitscreen/SplitScreenTaskListener.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskListener.java index 5b2b38ba81899..af451ae8bc504 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskListener.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskListener.java @@ -205,12 +205,9 @@ class SplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { private void updateChildTaskSurface( RunningTaskInfo taskInfo, SurfaceControl leash, boolean firstAppeared) { - final Rect taskBounds = taskInfo.getConfiguration().windowConfiguration.getBounds(); final Point taskPositionInParent = taskInfo.positionInParent; - final Rect corp = new Rect(taskBounds); - corp.offset(-taskBounds.left, -taskBounds.top); mSyncQueue.runInSync(t -> { - t.setWindowCrop(leash, corp); + t.setWindowCrop(leash, null); t.setPosition(leash, taskPositionInParent.x, taskPositionInParent.y); if (firstAppeared && !Transitions.ENABLE_SHELL_TRANSITIONS) { t.setAlpha(leash, 1f);