From 8a6179bb7dc2e40a5f6eb7627cf51a72aa7d2321 Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Thu, 15 Jul 2021 11:34:32 +0000 Subject: [PATCH] Scale task rounded corners proportional to TaskView size. Test: manual Fix: 183936745 Change-Id: I2e2dd806826cba135d5a1e6ab9a5e80b8994d64d --- .../com/android/quickstep/views/TaskView.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index b272def2ea..2e154f610b 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -794,7 +794,7 @@ public class TaskView extends FrameLayout implements Reusable { mIconView.setRotation(orientationHandler.getDegreesRotated()); snapshotParams.topMargin = deviceProfile.overviewTaskThumbnailTopMarginPx; mSnapshotView.setLayoutParams(snapshotParams); - getThumbnail().getTaskOverlay().updateOrientationState(orientationState); + mSnapshotView.getTaskOverlay().updateOrientationState(orientationState); } private void setIconAndDimTransitionProgress(float progress, boolean invert) { @@ -958,6 +958,7 @@ public class TaskView extends FrameLayout implements Reusable { private void setNonGridScale(float nonGridScale) { mNonGridScale = nonGridScale; + updateCornerRadius(); applyScale(); } @@ -1296,18 +1297,21 @@ public class TaskView extends FrameLayout implements Reusable { progress = Utilities.boundToRange(progress, 0, 1); mFullscreenProgress = progress; mIconView.setVisibility(progress < 1 ? VISIBLE : INVISIBLE); - getThumbnail().getTaskOverlay().setFullscreenProgress(progress); + mSnapshotView.getTaskOverlay().setFullscreenProgress(progress); - TaskThumbnailView thumbnail = getThumbnail(); - updateCurrentFullscreenParams(thumbnail.getPreviewPositionHelper()); + updateCornerRadius(); - thumbnail.setFullscreenParams(mCurrentFullscreenParams); + mSnapshotView.setFullscreenParams(mCurrentFullscreenParams); mOutlineProvider.updateParams( mCurrentFullscreenParams, mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx); invalidateOutline(); } + private void updateCornerRadius() { + updateCurrentFullscreenParams(mSnapshotView.getPreviewPositionHelper()); + } + void updateCurrentFullscreenParams(PreviewPositionHelper previewPositionHelper) { if (getRecentsView() == null) { return; @@ -1315,7 +1319,7 @@ public class TaskView extends FrameLayout implements Reusable { mCurrentFullscreenParams.setProgress( mFullscreenProgress, getRecentsView().getScaleX(), - getScaleX(), + mNonGridScale, getWidth(), mActivity.getDeviceProfile(), previewPositionHelper); }