Merge "Fix bug in ImageDecoder which provided the incorrect density to NinePatchDrawables"

This commit is contained in:
Derek Sollenberger
2018-01-24 23:09:53 +00:00
committed by Android (Google) Code Review

View File

@@ -920,10 +920,6 @@ public final class ImageDecoder implements AutoCloseable {
Resources res = src.getResources();
byte[] np = bm.getNinePatchChunk();
if (np != null && NinePatch.isNinePatchChunk(np)) {
if (res != null) {
bm.setDensity(res.getDisplayMetrics().densityDpi);
}
Rect opticalInsets = new Rect();
bm.getOpticalInsets(opticalInsets);
Rect padding = new Rect();