summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozef BABJAK <jozef.babjak@gmail.com>2011-04-19 13:24:37 +0200
committerJozef BABJAK <jozef.babjak@gmail.com>2011-04-19 13:24:37 +0200
commite42143aa575dcb8ab0616080b2e9b4614a1a4167 (patch)
treef56d52571f917242185c57c7107bf3f3ade1ba30
parent08d9d9a46250c4fad66e9b637e8898a3524c4286 (diff)
downloadframeworks_base-e42143aa575dcb8ab0616080b2e9b4614a1a4167.zip
frameworks_base-e42143aa575dcb8ab0616080b2e9b4614a1a4167.tar.gz
frameworks_base-e42143aa575dcb8ab0616080b2e9b4614a1a4167.tar.bz2
Eliminating dead logic - bitmap state simply cannot be null here.
Change-Id: I33fdf650b06242efa22ca30b3f7252f6854b42f6
-rw-r--r--graphics/java/android/graphics/drawable/BitmapDrawable.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 0b8465e..501374b 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -474,10 +474,8 @@ public class BitmapDrawable extends Drawable {
mBitmapState = state;
if (res != null) {
mTargetDensity = res.getDisplayMetrics().densityDpi;
- } else if (state != null) {
- mTargetDensity = state.mTargetDensity;
} else {
- mTargetDensity = DisplayMetrics.DENSITY_DEFAULT;
+ mTargetDensity = state.mTargetDensity;
}
setBitmap(state.mBitmap);
}