Always draw background for task thumbnail
Always draw background for task thumbnail because the task snapshot might be translucent or partially empty. For example, when drag-to-dismiss split screen, it will reparent tasks from dismissing split root to the bottom of display. Task thumbnail of those tasks might be partially empty because the snapshot was taken in new bounds inherits from display but with split screen content. Fix: 200096421 Test: drag to dismiss split, observed task thumbnail no longger been cropped. Change-Id: I5d04daa55a558f79ccf5127080088bd0698d06d8
This commit is contained in:
parent
d1c9cd2700
commit
7d20de28e3
|
@ -307,14 +307,15 @@ public class TaskThumbnailView extends View {
|
|||
}
|
||||
}
|
||||
|
||||
// Draw the background in all cases, except when the thumbnail data is opaque
|
||||
// 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);
|
||||
|
||||
final boolean drawBackgroundOnly = mTask == null || mTask.isLocked || mBitmapShader == null
|
||||
|| mThumbnailData == null;
|
||||
if (drawBackgroundOnly || mThumbnailData.isTranslucent) {
|
||||
canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mBackgroundPaint);
|
||||
if (drawBackgroundOnly) {
|
||||
return;
|
||||
}
|
||||
if (drawBackgroundOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mPaint);
|
||||
|
|
Loading…
Reference in New Issue