Scale density correctly on VectorDrawable.applyTheme()

Bug: 25081461
Change-Id: I012e0932e67bc51502dc00e11131218af1377115
This commit is contained in:
Alan Viverette
2015-10-21 15:15:23 -04:00
parent 459fdf95c6
commit 4a94faa0c7

View File

@@ -603,7 +603,7 @@ public class VectorDrawable extends Drawable {
final int densityDpi = a.getResources().getDisplayMetrics().densityDpi;
final int newSourceDensity = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi;
final int oldSourceDensity = pathRenderer.mSourceDensity;
final float densityScale = oldSourceDensity / (float) newSourceDensity;
final float densityScale = newSourceDensity / (float) oldSourceDensity;
pathRenderer.mSourceDensity = newSourceDensity;
final int tintMode = a.getInt(R.styleable.VectorDrawable_tintMode, -1);