Index: components/autofill/android/java/src/org/chromium/components/autofill/AutofillKeyboardAccessory.java |
diff --git a/components/autofill/android/java/src/org/chromium/components/autofill/AutofillKeyboardAccessory.java b/components/autofill/android/java/src/org/chromium/components/autofill/AutofillKeyboardAccessory.java |
index adb7e26b27586d639b409078e150393376bfc9d6..56475a385245b4eda771492457202070f1e3d3b9 100644 |
--- a/components/autofill/android/java/src/org/chromium/components/autofill/AutofillKeyboardAccessory.java |
+++ b/components/autofill/android/java/src/org/chromium/components/autofill/AutofillKeyboardAccessory.java |
@@ -7,7 +7,7 @@ package org.chromium.components.autofill; |
import android.annotation.SuppressLint; |
import android.graphics.Typeface; |
import android.os.Build; |
-import android.support.graphics.drawable.VectorDrawableCompat; |
+import android.support.v7.content.res.AppCompatResources; |
import android.text.TextUtils; |
import android.view.LayoutInflater; |
import android.view.View; |
@@ -72,15 +72,15 @@ public class AutofillKeyboardAccessory extends LinearLayout |
assert !TextUtils.isEmpty(suggestion.getLabel()); |
View touchTarget; |
- if (!suggestion.isFillable() && suggestion.getVectorDrawableIconId() != 0) { |
+ if (!suggestion.isFillable() && suggestion.getIconId() != 0) { |
touchTarget = LayoutInflater.from(getContext()).inflate( |
R.layout.autofill_keyboard_accessory_icon, this, false); |
if (separatorPosition == -1) separatorPosition = i; |
ImageView icon = (ImageView) touchTarget; |
- icon.setImageDrawable(VectorDrawableCompat.create(getResources(), |
- suggestion.getVectorDrawableIconId(), getContext().getTheme())); |
+ icon.setImageDrawable( |
+ AppCompatResources.getDrawable(getContext(), suggestion.getIconId())); |
icon.setContentDescription(suggestion.getLabel()); |
} else { |
touchTarget = LayoutInflater.from(getContext()).inflate( |
@@ -98,11 +98,11 @@ public class AutofillKeyboardAccessory extends LinearLayout |
label.setTypeface(Typeface.DEFAULT_BOLD); |
} |
- if (suggestion.getVectorDrawableIconId() != 0) { |
+ if (suggestion.getIconId() != 0) { |
ApiCompatibilityUtils.setCompoundDrawablesRelativeWithIntrinsicBounds( |
- label, VectorDrawableCompat.create(getResources(), |
- suggestion.getVectorDrawableIconId(), getContext().getTheme()), |
- null /* top */, null /* end */, null /* bottom */); |
+ label, |
+ AppCompatResources.getDrawable(getContext(), suggestion.getIconId()), |
+ null /* top */, null /* end */, null /* bottom */); |
} |
if (!TextUtils.isEmpty(suggestion.getSublabel())) { |