Notify changes after loading icon in sharesheet

The icon loading inside the sharesheet happens as a separate
async task inside the bindViewHolder. We have seen it taking longer
time in some cases which caused the icon loading to happen after the
bindViewHolder resulting in empty icons being loaded in the
sharesheet for wembley/namaste phone devices. This change introduces a
call to notify observers after the icon loading is done.

Test: Tested on device
Bug: 194886990
Change-Id: Id1752f10ced7877efe5eff90aac6db2bd656f34c
This commit is contained in:
Jigar Thakkar
2021-08-10 16:17:26 +00:00
parent bc28c57884
commit 57882dab5f

View File

@@ -789,6 +789,9 @@ public class ResolverListAdapter extends BaseAdapter {
} else {
mDisplayResolveInfo.setDisplayIcon(d);
mHolder.bindIcon(mDisplayResolveInfo);
// Notify in case view is already bound to resolve the race conditions on
// low end devices
notifyDataSetChanged();
}
}