Get rid of drawing hacks for search dialog suggestions
Before, SuggestionsAdapter parsed every HTML formatted string three times, to support state-dependent colors in <font> tags. Now that there is support in Html for color resources (added in https://android-git.corp.google.com/g/7441), we can get rid of this code. Also, SuggestionsAdapter had a special purpose view for drawing background colors when suggestion items were not selected or pressed. This change replaces that code with a StateListDrawable of ColorDrawables. Before this change, HTML parsing used ~17% (uncontrolled benchmark, just did some random searching) of the system_process CPU. This change should reduce that by 2/3, i.e. about ~11% total system_process reduction.
Loading
Please register or sign in to comment