Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79a31f32 authored by Nader Jawad's avatar Nader Jawad
Browse files

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
parent aa602f16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;