Skip to content

Commit 0b68477

Browse files
author
Romain Guy
committed
Don't scale bitmaps to an empty size when targetDpi=0
Bug #7334217 Change-Id: I8d232a835580ffbf85334e0a3580e8d8240c8570
1 parent c37f349 commit 0b68477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphics/java/android/graphics/Bitmap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ public int getScaledHeight(int targetDensity) {
967967
* @hide
968968
*/
969969
static public int scaleFromDensity(int size, int sdensity, int tdensity) {
970-
if (sdensity == DENSITY_NONE || sdensity == tdensity) {
970+
if (sdensity == DENSITY_NONE || tdensity == DENSITY_NONE || sdensity == tdensity) {
971971
return size;
972972
}
973973

0 commit comments

Comments
 (0)