Commit 50d2e87b authored by Theresa's avatar Theresa Committed by Commit Bot

Return new background drawable rather than caching in CardConfiguration

TBR=huayinz@chromium.org
BUG=891089

Change-Id: I4d4c6fbdb2d845b0639f0eab05f4b043a2a9a15e
Reviewed-on: https://chromium-review.googlesource.com/1256108
Commit-Queue: Theresa <twellington@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595697}
parent bba3c72b
...@@ -120,7 +120,6 @@ public class FeedNewTabPage extends NewTabPage { ...@@ -120,7 +120,6 @@ public class FeedNewTabPage extends NewTabPage {
private final Resources mResources; private final Resources mResources;
private final UiConfig mUiConfig; private final UiConfig mUiConfig;
private final int mCornerRadius; private final int mCornerRadius;
private final Drawable mCardBackground;
private final int mCardMargin; private final int mCardMargin;
private final int mCardWideMargin; private final int mCardWideMargin;
...@@ -129,8 +128,6 @@ public class FeedNewTabPage extends NewTabPage { ...@@ -129,8 +128,6 @@ public class FeedNewTabPage extends NewTabPage {
mUiConfig = uiConfig; mUiConfig = uiConfig;
mCornerRadius = mResources.getDimensionPixelSize( mCornerRadius = mResources.getDimensionPixelSize(
R.dimen.content_suggestions_card_modern_corner_radius); R.dimen.content_suggestions_card_modern_corner_radius);
mCardBackground = ApiCompatibilityUtils.getDrawable(
mResources, R.drawable.content_card_modern_background);
mCardMargin = mResources.getDimensionPixelSize( mCardMargin = mResources.getDimensionPixelSize(
R.dimen.content_suggestions_card_modern_margin); R.dimen.content_suggestions_card_modern_margin);
mCardWideMargin = mCardWideMargin =
...@@ -144,7 +141,8 @@ public class FeedNewTabPage extends NewTabPage { ...@@ -144,7 +141,8 @@ public class FeedNewTabPage extends NewTabPage {
@Override @Override
public Drawable getCardBackground() { public Drawable getCardBackground() {
return mCardBackground; return ApiCompatibilityUtils.getDrawable(
mResources, R.drawable.content_card_modern_background);
} }
@Override @Override
......
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