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

This commit is contained in:
Alex Chau authored and Android (Google) Code Review committed 2021-08-06 17:41:11 +00:00
commit 55861dc50b
2 files changed
+10 -1

No files matched your search

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