Merge "Aligning the intialization process with groupedtaskview to set content description Test: built locally, tested against tablet with bluetooth keyboard." into udc-dev am: 6ec21cbe45

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23699415

Change-Id: If91491dcb1739ccdeebb8737e8dbf3da40ec6c58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
index 3e79eaf..7bbe36a 100644
--- a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
+++ b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
@@ -280,10 +280,6 @@
         }
     }
 
-    public String getContentDescription() {
-            return getContentDescriptionForTask(mTask, mAppUsageLimitTimeMs, mAppRemainingTimeMs);
-    }
-
     private String getContentDescriptionForTask(
             Task task, long appUsageLimitTimeMs, long appRemainingTimeMs) {
         return appUsageLimitTimeMs >= 0 && appRemainingTimeMs >= 0 ?
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index f71d0c1..17d83ec 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -1020,7 +1020,10 @@
             }
             if (needsUpdate(changes, FLAG_UPDATE_ICON)) {
                 mIconLoadRequest = iconCache.updateIconInBackground(mTask,
-                        (task) -> setIcon(mIconView, task.icon));
+                        (task) -> {
+                            setIcon(mIconView, task.icon);
+                            mDigitalWellBeingToast.initialize(task);
+                        });
             }
         } else {
             if (needsUpdate(changes, FLAG_UPDATE_THUMBNAIL)) {
@@ -1342,7 +1345,6 @@
 
     protected void refreshTaskThumbnailSplash() {
         mSnapshotView.refreshSplashView();
-        setContentDescription(mDigitalWellBeingToast.getContentDescription());
     }
 
     private void setSplitSelectTranslationX(float x) {