Commit afe928de authored by Theresa's avatar Theresa Committed by Commit Bot

[Modern] Use isChromeModernDesignEnabled to modernize SnackbarView

Switch SnackbarView.java isChromeHomeEnabled checks to
isChromeModernDesignEnabled.

BUG=803096

Change-Id: I153691a9a0e70dc04c21468887c771af8314c8bc
Reviewed-on: https://chromium-review.googlesource.com/881543Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531369}
parent 1f751e41
...@@ -240,14 +240,16 @@ class SnackbarView { ...@@ -240,14 +240,16 @@ class SnackbarView {
int backgroundColor = snackbar.getBackgroundColor(); int backgroundColor = snackbar.getBackgroundColor();
if (backgroundColor == 0) { if (backgroundColor == 0) {
backgroundColor = ApiCompatibilityUtils.getColor(mContainerView.getResources(), backgroundColor = ApiCompatibilityUtils.getColor(mContainerView.getResources(),
FeatureUtilities.isChromeHomeEnabled() ? R.color.modern_primary_color FeatureUtilities.isChromeModernDesignEnabled()
: R.color.snackbar_background_color); ? R.color.modern_primary_color
: R.color.snackbar_background_color);
} }
int textAppearanceResId = snackbar.getTextAppearance(); int textAppearanceResId = snackbar.getTextAppearance();
if (textAppearanceResId == 0) { if (textAppearanceResId == 0) {
textAppearanceResId = FeatureUtilities.isChromeHomeEnabled() ? R.style.BlackBodyDefault textAppearanceResId = FeatureUtilities.isChromeModernDesignEnabled()
: R.style.WhiteBody; ? R.style.BlackBodyDefault
: R.style.WhiteBody;
} }
ApiCompatibilityUtils.setTextAppearance(mMessageView, textAppearanceResId); ApiCompatibilityUtils.setTextAppearance(mMessageView, textAppearanceResId);
......
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