Fetch icon and thumbnail for completed task to prevent stale data

The data returned from getAllTaskData can sometimes replace recently fetched thumbnail and icon data with a null value due to a race condition. This occurs when getAllTaskData results are returned after, or at the same time as, the thumbnail and icon data is fetched. Consequently, the information displayed to the user is incorrect and remains so until the user re-enters Overview or scrolls. To address this issue, we propose to re-request the task data for requests that have already been completed.

Change-Id: I99ee7f38abab3c283c9f82bce7b1d069575ddc6e
Fix: 392069389
Doc: go/launcher-overview-unified-taskviewmodel
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTests
Test: TasksRepositoryTest
1 file changed