Commit bb012a94 authored by Ted Choc's avatar Ted Choc Committed by Commit Bot

Fix omnibox suggestions when downloads home v2 is enabled.

The bug manifested itself if you had the downloads page visible
and was the first time you focused the omnibox.  The problem
was caused by two views using the ID toolbar in their XML.

Then findViewById on the root was unpredictable and would return
the first it finds, and when downloads is showing it would be
the downloads toolbar.

This just makes the downloads toolbar use a unique ID.

BUG=901736

Change-Id: I4b67fb828909f1ac443569faa691b953c94e73a1
Reviewed-on: https://chromium-review.googlesource.com/c/1318370Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605438}
parent 3cb094bc
......@@ -8,7 +8,7 @@
android:layout_height="wrap_content">
<org.chromium.chrome.browser.download.home.toolbar.DownloadHomeToolbar
android:id="@+id/toolbar"
android:id="@+id/download_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height_no_shadow"
style="@style/ModernToolbar">
......
......@@ -108,7 +108,7 @@ public class ToolbarCoordinator implements SelectionObserver<ListItem> {
mView = (ViewGroup) LayoutInflater.from(context).inflate(
R.layout.download_home_toolbar, null);
mToolbar = mView.findViewById(R.id.toolbar);
mToolbar = mView.findViewById(R.id.download_toolbar);
mShadow = mView.findViewById(R.id.shadow);
mToolbar.initialize(selectionDelegate, 0 /* titleResId */, null /* drawerLayout */,
......
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