diff options
| author | 2022-09-14 21:48:41 -0700 | |
|---|---|---|
| committer | 2022-10-03 22:38:47 -0700 | |
| commit | cd7c00c36e198afee5d4db1c3d354d6b997b3c4b (patch) | |
| tree | 0841c09b24b42c9f4edc10d415ae4c0d9fedb2a1 /libs/androidfw/StringPool.cpp | |
| parent | f12d6c289413ab69d1bdd496a7def3ffedfc183f (diff) | |
Load icons and labels only once
The current implementation triggers icon loading each time a view gets
bound and, as binding happens multiple times, icon and label loadings
are unnecessarily duplicated. In addition, as a loading task never gets
canceled, there’re cases (like in the associated ticket) when a view
gets rapidly bound to multiple positions and all the icon loadings
eventually catches up updating it, ending up in icons rapidly changing
on the screen for the view.
This change addresses this by simplifying the icon loading/binding
logic: a view is always bound to the current data and the task is only
updates the data with the missing piece of info once (and applied for
both icons and label loading tasks).
There is one extra change in ResolverActivity due to LoadIconTask
interface change and cancellation logic for the tasks.
Fix: 245934835
Test: Manual tests on a list which does not fit into the screen.
Test: Manual tests with arficial delays added into the tasks.
Test: atest FrameworksCoreTests:ResolverActivityTest
Test: atest FrameworksCoreTests:ChooserActivityTest
Change-Id: I76fe5663523232a74d4f505c535cd6dbcf7f8759
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions