Make nearby places photos not look like jellybeans

Bug: 14392467
Change-Id: I22f7a021c8f2af9124f0f04d65107367bbed4c09
diff --git a/src/com/android/contacts/common/ContactPhotoManager.java b/src/com/android/contacts/common/ContactPhotoManager.java
index f9db2ed..b3dbd31 100644
--- a/src/com/android/contacts/common/ContactPhotoManager.java
+++ b/src/com/android/contacts/common/ContactPhotoManager.java
@@ -978,7 +978,11 @@
             // into a circle.
             final int height = bitmap.getHeight();
             final int width = bitmap.getWidth();
-            if (height != width && holder.originalSmallerExtent < mThumbnailSize) {
+
+            // The smaller dimension of a scaled bitmap can range from anywhere from 0 to just
+            // below twice the length of a thumbnail image due to the way we calculate the optimal
+            // sample size.
+            if (height != width && Math.min(height, width) <= mThumbnailSize * 2) {
                 final int dimension = Math.min(height, width);
                 bitmap = ThumbnailUtils.extractThumbnail(bitmap, dimension, dimension);
             }