Merge "Only refresh DISABLED_NO_THUMBNAIL when thumbnail changes" into sc-v2-dev

This commit is contained in:
Alex Chau
2021-08-06 17:41:11 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 1 deletions
@@ -182,6 +182,13 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
}
}
/**
* Called when the current task's thumbnail has changed.
*/
public void refreshActionVisibility(ThumbnailData thumbnail) {
getActionsView().updateDisabledFlags(DISABLED_NO_THUMBNAIL, thumbnail == null);
}
/**
* End rendering live tile in Overview.
*
@@ -162,7 +162,9 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
mBitmapShader = new BitmapShader(bm, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mPaint.setShader(mBitmapShader);
updateThumbnailMatrix();
refreshOverlay();
if (mOverlayEnabled) {
getTaskOverlay().refreshActionVisibility(mThumbnailData);
}
} else {
mBitmapShader = null;
mThumbnailData = null;