Commit 4cd87ab1 authored by Tomasz Wiszkowski's avatar Tomasz Wiszkowski Committed by Commit Bot

Ensure favicons are rendered if the enabling condition changes.

This change also ensures the favicons are rendered in case of race between
LargeIconCache and AutocompleteMediator:
if LIC supplies favicon BEFORE AutocompleteMediator sets the property value
(very narrow time window), favicons would not be shown.

Bug: 961158, 960421

Change-Id: I8983f1aaa9e69ecc9f2b2fb7d0bb4a556d6d86bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1630234Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Ender <ender@google.com>
Cr-Commit-Position: refs/heads/master@{#664460}
parent 462d699b
......@@ -95,6 +95,7 @@ public class SuggestionViewViewBinder {
view.setSuggestionIconAreaWidthRes(showIcons
? R.dimen.omnibox_suggestion_start_offset_with_icon
: R.dimen.omnibox_suggestion_start_offset_without_icon);
updateSuggestionIcon(view, model);
} else if (SuggestionViewProperties.TEXT_LINE_2_TEXT.equals(propertyKey)) {
Spannable line2Text = model.get(SuggestionViewProperties.TEXT_LINE_2_TEXT).text;
if (TextUtils.isEmpty(line2Text)) {
......@@ -184,7 +185,6 @@ public class SuggestionViewViewBinder {
}
icon = AppCompatResources.getDrawable(view.getContext(), drawableId);
}
view.setSuggestionIconDrawable(
icon, iconType, allowTint, model.get(SuggestionCommonProperties.USE_DARK_COLORS));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment