Commit c1d16215 authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[Android, Crash] Fix for key icon drawable in accessory bar

This CL tries to address the kitkat and earlier crashes due to a
parsing error of a vector graphic by replacing VectorDrawableCompat
with AppCompatResources.

Bug: 856175
Change-Id: I987d930be1164f8c9e33025d733f928d3ac7ff1f
Reviewed-on: https://chromium-review.googlesource.com/1115122Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570425}
parent 829f7cca
......@@ -6,7 +6,7 @@ package org.chromium.chrome.browser.autofill.keyboard_accessory;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.graphics.drawable.VectorDrawableCompat;
import android.support.v7.content.res.AppCompatResources;
import android.support.v7.widget.RecyclerView;
import android.view.View;
......@@ -46,8 +46,7 @@ public class PasswordAccessorySheetCoordinator {
*/
public Drawable getIcon(Context context) {
if (mIcon != null) return mIcon;
mIcon = VectorDrawableCompat.create(
context.getResources(), R.drawable.ic_vpn_key_grey, context.getTheme());
mIcon = AppCompatResources.getDrawable(context, R.drawable.ic_vpn_key_grey);
return mIcon;
}
......
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