Commit 3519b073 authored by mathp's avatar mathp Committed by Commit Bot

[Autofill] Use Drawable instead of iconId in Autofill prefs

BUG=728116
TEST=crash no longer repros

Review-Url: https://codereview.chromium.org/2919593005
Cr-Commit-Position: refs/heads/master@{#476306}
parent f1698968
......@@ -9,6 +9,7 @@ import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.support.v7.content.res.AppCompatResources;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
......@@ -45,7 +46,8 @@ public class AutofillCreditCardsFragment
Preference pref = new Preference(getActivity());
pref.setTitle(card.getObfuscatedNumber());
pref.setSummary(card.getFormattedExpirationDate(getActivity()));
pref.setIcon(card.getIssuerIconDrawableId());
pref.setIcon(
AppCompatResources.getDrawable(getActivity(), card.getIssuerIconDrawableId()));
if (card.getIsLocal()) {
pref.setFragment(AutofillLocalCardEditor.class.getName());
......@@ -89,4 +91,4 @@ public class AutofillCreditCardsFragment
PersonalDataManager.getInstance().unregisterDataObserver(this);
super.onDestroyView();
}
}
\ No newline at end of file
}
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