From 442b93c9c99a2390441e7a724e20928cc76a0cca Mon Sep 17 00:00:00 2001 From: randypfohl Date: Mon, 26 Jun 2023 13:23:13 -0700 Subject: [PATCH] Updating content description for accessibility no matter the state Test: built and tested locally by opening apps and then turning on talkback to verify content description is set Bug:280908761 Change-Id: I9ed015bdd375e2cedf5e068a77bd4b4dcb5f9488 --- .../com/android/quickstep/TaskIconCache.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/quickstep/src/com/android/quickstep/TaskIconCache.java b/quickstep/src/com/android/quickstep/TaskIconCache.java index 7c05a1092c..164a36607d 100644 --- a/quickstep/src/com/android/quickstep/TaskIconCache.java +++ b/quickstep/src/com/android/quickstep/TaskIconCache.java @@ -15,7 +15,6 @@ */ package com.android.quickstep; -import static com.android.launcher3.uioverrides.QuickstepLauncher.GO_LOW_RAM_RECENTS_ENABLED; import static com.android.launcher3.util.DisplayController.CHANGE_DENSITY; import android.annotation.Nullable; @@ -182,17 +181,14 @@ public class TaskIconCache implements DisplayInfoChangeListener { } } - // Loading content descriptions if accessibility or low RAM recents is enabled. - if (GO_LOW_RAM_RECENTS_ENABLED || mAccessibilityManager.isEnabled()) { - // Skip loading the content description if the activity no longer exists - if (activityInfo == null) { - activityInfo = PackageManagerWrapper.getInstance().getActivityInfo( - key.getComponent(), key.userId); - } - if (activityInfo != null) { - entry.contentDescription = getBadgedContentDescription( - activityInfo, task.key.userId, task.taskDescription); - } + // Skip loading the content description if the activity no longer exists + if (activityInfo == null) { + activityInfo = PackageManagerWrapper.getInstance().getActivityInfo( + key.getComponent(), key.userId); + } + if (activityInfo != null) { + entry.contentDescription = getBadgedContentDescription( + activityInfo, task.key.userId, task.taskDescription); } mIconCache.put(task.key, entry);