summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-10-11 15:11:22 -0700
committerRomain Guy <romainguy@google.com>2012-10-11 15:11:22 -0700
commit0b68477f8287fe5ddac1beb1c9d0811ded034dad (patch)
tree05af338d5edeef278c073d1b748476ade38135b7 /graphics
parentc37f349ecff54f15ed31d57c1b886897c91430af (diff)
downloadframeworks_base-0b68477f8287fe5ddac1beb1c9d0811ded034dad.zip
frameworks_base-0b68477f8287fe5ddac1beb1c9d0811ded034dad.tar.gz
frameworks_base-0b68477f8287fe5ddac1beb1c9d0811ded034dad.tar.bz2
Don't scale bitmaps to an empty size when targetDpi=0
Bug #7334217 Change-Id: I8d232a835580ffbf85334e0a3580e8d8240c8570
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Bitmap.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 4604437..6238edb 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -967,7 +967,7 @@ public final class Bitmap implements Parcelable {
* @hide
*/
static public int scaleFromDensity(int size, int sdensity, int tdensity) {
- if (sdensity == DENSITY_NONE || sdensity == tdensity) {
+ if (sdensity == DENSITY_NONE || tdensity == DENSITY_NONE || sdensity == tdensity) {
return size;
}