New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 792129 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Change ApiCompatibilityUtils.getDrawable to use AppCompatResources

Reported by ltian@chromium.org, Dec 5 2017

Issue description

ApiCompatibilityUtils.getDrawable current implementation uses Resources.getDrawable. This will crash if drawable is VectorDrawable. To solve the problem, we should use AppCompatResources.getDrawable.




 
Cc: changwan@chromium.org
Is there any way to check for VectorDrawable? I'm asking this because currently I suspect that using AppCompatResources in other places caused issue 782956.

Comment 2 by ltian@chromium.org, Jun 7 2018

changwan@: I look into AppCompactDrawableManager and looks like what it does for check VectorDrawable is use resources to get the TypeValue for the resId then see whether it is a xml file and if so, manually parse the file to see whether it is a VectorDrawable.

Comment 3 by ltian@chromium.org, Jun 7 2018

Cc: ltian@chromium.org
Owner: ----
Status: Available (was: Assigned)
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.

Sign in to add a comment