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

This commit is contained in:
Randy Pfohl
2023-06-16 23:18:02 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 6 deletions

View File

@@ -280,10 +280,6 @@ public final class DigitalWellBeingToast {
}
}
public String getContentDescription() {
return getContentDescriptionForTask(mTask, mAppUsageLimitTimeMs, mAppRemainingTimeMs);
}
private String getContentDescriptionForTask(
Task task, long appUsageLimitTimeMs, long appRemainingTimeMs) {
return appUsageLimitTimeMs >= 0 && appRemainingTimeMs >= 0 ?

View File

@@ -1020,7 +1020,10 @@ public class TaskView extends FrameLayout implements Reusable {
}
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 @@ public class TaskView extends FrameLayout implements Reusable {
protected void refreshTaskThumbnailSplash() {
mSnapshotView.refreshSplashView();
setContentDescription(mDigitalWellBeingToast.getContentDescription());
}
private void setSplitSelectTranslationX(float x) {