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
This commit is contained in:
chaviw
2020-12-09 18:02:52 -08:00
parent cd413cf83a
commit b5c162bd73

View File

@@ -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);