From 12db27fe342dfcdeeca2cb5bad68a399c543bbbc Mon Sep 17 00:00:00 2001 From: Sebastian Franco Date: Wed, 23 Mar 2022 13:11:20 -0700 Subject: [PATCH] Task thumbnail background is spilling to the front, making the BK 1px smaller to fix it This change ag/17003268 was meant as a solution for b/146521490 but it's ineficient so this other solution is simpler and more performant. This solution only makes the background 1px smaller and that prevents it from spilling in the Anti Aliasing. Test: Put Telegram in recent Task (shouldn't be the first one) and you won't see a white border. Also when a task was in multitask the backgroudn should be draw. Fix: 223761979 Change-Id: I6855e9ecce1e06f7a9311c62a038d34b04fe2398 --- .../src/com/android/quickstep/views/TaskThumbnailView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java index 60b0d17b40..bff86512f9 100644 --- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java +++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java @@ -300,7 +300,8 @@ public class TaskThumbnailView extends View { // Always draw the background since the snapshots might be translucent or partially empty // (For example, tasks been reparented out of dismissing split root when drag-to-dismiss // split screen). - canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mBackgroundPaint); + canvas.drawRoundRect(x, y + 1, width, height - 1, cornerRadius, + cornerRadius, mBackgroundPaint); final boolean drawBackgroundOnly = mTask == null || mTask.isLocked || mBitmapShader == null || mThumbnailData == null;