summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrey Epin <ayepin@google.com> 2022-07-12 10:50:20 -0700
committer Andrey Epin <ayepin@google.com> 2022-07-12 10:50:20 -0700
commit33f923ec77c4cb2bc12667416503af04563c75bb (patch)
tree315c466feed68061208da1c33b12971f9eebc912
parentcb1af1ca55da842e13588e4580519747f5269135 (diff)
Update icon only once
We have multiple LoadIconTasks started for the same icon, first from the list view measurement and then from the actual view biding. We let all those tasks to update the UI which riggered (through an observed but not precicly comprehended mechanism) multiple announcements for the first item in the list. Ideally, we should have only one loading task for an item, but that would be a more complex fix. Instead, we just let the winning task to update the UI. Fix: 238681660 Test: Manual test. Change-Id: I8cc7a9a12a3b2e9e49834500d8b7d2bf3e6367d3
-rw-r--r--core/java/com/android/internal/app/ResolverListAdapter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/app/ResolverListAdapter.java b/core/java/com/android/internal/app/ResolverListAdapter.java
index 737d5e348249..06787f193fe5 100644
--- a/core/java/com/android/internal/app/ResolverListAdapter.java
+++ b/core/java/com/android/internal/app/ResolverListAdapter.java
@@ -950,7 +950,7 @@ public class ResolverListAdapter extends BaseAdapter {
protected void onPostExecute(Drawable d) {
if (getOtherProfile() == mDisplayResolveInfo) {
mResolverListCommunicator.updateProfileViewButton();
- } else {
+ } else if (!mDisplayResolveInfo.hasDisplayIcon()) {
mDisplayResolveInfo.setDisplayIcon(d);
mHolder.bindIcon(mDisplayResolveInfo);
// Notify in case view is already bound to resolve the race conditions on