Merge "Display app icons in quick switch task view when there are no updates." into udc-dev

This commit is contained in:
Saumya Prakash
2023-05-17 17:11:49 +00:00
committed by Android (Google) Code Review

View File

@@ -130,6 +130,8 @@ public class KeyboardQuickSwitchTaskView extends ConstraintLayout {
applyThumbnail(mThumbnailView2, task2, thumbnailUpdateFunction);
if (iconUpdateFunction == null) {
applyIcon(mIcon1, task1);
applyIcon(mIcon2, task2);
setContentDescription(task2 == null
? task1.titleDescription
: getContext().getString(
@@ -183,8 +185,8 @@ public class KeyboardQuickSwitchTaskView extends ConstraintLayout {
thumbnailView.setImageBitmap(bm);
}
private void applyIcon(@Nullable ImageView iconView, @NonNull Task task) {
if (iconView == null) {
private void applyIcon(@Nullable ImageView iconView, @Nullable Task task) {
if (iconView == null || task == null) {
return;
}
iconView.setVisibility(VISIBLE);