Merge "Don't scale bitmaps to an empty size when targetDpi=0 Bug #7334217" into jb-mr1-dev

This commit is contained in:
Romain Guy
2012-10-11 15:50:17 -07:00
committed by Android (Google) Code Review

View File

@@ -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;
}