Commit 87de9d51 authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Prevent scrim showing without params

This patch prevents the location bar from attempting to show the scrim
before the view it is supposed to appear behind is inflated (thus
making the params null).

Bug: 856225
Change-Id: I7fabcd421251602cc25132db71fbb0482312458f
Reviewed-on: https://chromium-review.googlesource.com/1113953Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570112}
parent 5f0fdfe5
...@@ -2033,7 +2033,7 @@ public class LocationBarLayout extends FrameLayout ...@@ -2033,7 +2033,7 @@ public class LocationBarLayout extends FrameLayout
* scrim. * scrim.
*/ */
protected void updateFadingBackgroundView(boolean visible, boolean ignoreNtpChecks) { protected void updateFadingBackgroundView(boolean visible, boolean ignoreNtpChecks) {
if (mScrim == null) return; if (mScrim == null || mScrimParams == null) return;
NewTabPage ntp = mToolbarDataProvider.getNewTabPageForCurrentTab(); NewTabPage ntp = mToolbarDataProvider.getNewTabPageForCurrentTab();
boolean locationBarShownInNTP = ntp != null && ntp.isLocationBarShownInNTP(); boolean locationBarShownInNTP = ntp != null && ntp.isLocationBarShownInNTP();
......
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