diff options
author | 2019-02-13 14:38:31 -0800 | |
---|---|---|
committer | 2019-02-14 10:58:07 -0800 | |
commit | 79a31f32cae01bb35e65867173769b48bc063763 (patch) | |
tree | 985959da9c603c60479f7733a9459731530a9bdd | |
parent | aa602f16fcfa7bef9d564d2c7aeb19a050e23bb5 (diff) |
Restore getIntrinsicWidth behavior from Android O
Updated ImageDecoder InputStreamSource to always respect the given
inputDensity regardless if the provided resource class is null
or not.
Fixes: 115836404
Test: AI8dcdc764a963e95d6c0ad644a1e05f055c748c75 Added CTS test to
verify intrinsic bounds of resolved Drawable respects display density
Change-Id: I54e5835a8bceea9c991972ff7f106dbed29b6662
-rw-r--r-- | graphics/java/android/graphics/ImageDecoder.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/ImageDecoder.java b/graphics/java/android/graphics/ImageDecoder.java index 466a5fc2a770..d913c6694bd5 100644 --- a/graphics/java/android/graphics/ImageDecoder.java +++ b/graphics/java/android/graphics/ImageDecoder.java @@ -372,7 +372,7 @@ public final class ImageDecoder implements AutoCloseable { } mResources = res; mInputStream = is; - mInputDensity = res != null ? inputDensity : Bitmap.DENSITY_NONE; + mInputDensity = inputDensity; } final Resources mResources; |