Commit bb1d8a86 authored by David Trainor's avatar David Trainor Committed by Commit Bot

Prevent accessing mUseLightColorAssets being null

mUseLightColorAssets could be null, which can cause IPH crashes on
tablets if called before it is set.  This just protects against the
value not being ready.

BUG=778033

Change-Id: I057178d966d44ee1d755241be919d48e1e324e37
Reviewed-on: https://chromium-review.googlesource.com/779864
Commit-Queue: David Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519736}
parent 789bc632
...@@ -552,14 +552,14 @@ public class ToolbarTablet ...@@ -552,14 +552,14 @@ public class ToolbarTablet
@Override @Override
public boolean useLightDrawables() { public boolean useLightDrawables() {
return mUseLightColorAssets; return mUseLightColorAssets != null && mUseLightColorAssets;
} }
@Override @Override
public void showAppMenuUpdateBadge() { public void showAppMenuUpdateBadge() {
super.showAppMenuUpdateBadge(); super.showAppMenuUpdateBadge();
if (!mIsInTabSwitcherMode) { if (!mIsInTabSwitcherMode) {
if (mUseLightColorAssets) { if (mUseLightColorAssets != null && mUseLightColorAssets) {
setAppMenuUpdateBadgeDrawable(mUseLightColorAssets); setAppMenuUpdateBadgeDrawable(mUseLightColorAssets);
} }
setAppMenuUpdateBadgeToVisible(true); setAppMenuUpdateBadgeToVisible(true);
......
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