Account for disparity btw folder preview size and drawable size

-> When there is disparity between the cached icon size and the available space
   in the preview, the folder preview could appear not as intended (either
   overly crammed, or overly spacious)

issue 27701193

Change-Id: I9f97012ba569d1419b1e3f661cd26761b2a36285
diff --git a/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java b/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java
index 68b756b..6ee02f9 100644
--- a/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java
+++ b/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java
@@ -23,6 +23,7 @@
     private float mRadius;
     private float mIconSize;
     private boolean mIsRtl;
+    private float mBaselineIconScale;
 
     @Override
     public void init(int availableSpace, int intrinsicIconSize, boolean rtl) {
@@ -30,6 +31,7 @@
         mRadius = ITEM_RADIUS_SCALE_FACTOR * availableSpace / 2f;
         mIconSize = intrinsicIconSize;
         mIsRtl = rtl;
+        mBaselineIconScale = availableSpace / (intrinsicIconSize * 1f);
     }
 
     @Override
@@ -103,13 +105,16 @@
     }
 
     private float scaleForNumItems(int numItems) {
+        float scale = 1f;
         if (numItems <= 2) {
-            return MAX_SCALE;
+            scale = MAX_SCALE;
         } else if (numItems == 3) {
-            return (MAX_SCALE + MIN_SCALE) / 2;
+            scale = (MAX_SCALE + MIN_SCALE) / 2;
         } else {
-            return MIN_SCALE;
+            scale = MIN_SCALE;
         }
+
+        return scale * mBaselineIconScale;
     }
 
     @Override