Apply icon normalizaiton to placeholder icon generation logic
Bug: 188113211
Test: manual
TL;DR;; also matched placeholder background color to shortcut background
guideline color.
Change-Id: I0df721e40cbb135b99979034ae302dad9f5f5baa
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
index 9ce9975..f5ce814 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
@@ -63,7 +63,7 @@
private final Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
private static final float PLACEHOLDER_TEXT_SIZE = 20f;
- private static int PLACEHOLDER_BACKGROUND_COLOR = Color.rgb(240, 240, 240);
+ private static int PLACEHOLDER_BACKGROUND_COLOR = Color.rgb(245, 245, 245);
protected BaseIconFactory(Context context, int fillResIconDpi, int iconBitmapSize,
boolean shapeDetection) {
@@ -144,7 +144,7 @@
AdaptiveIconDrawable drawable = new AdaptiveIconDrawable(
new ColorDrawable(PLACEHOLDER_BACKGROUND_COLOR),
new BitmapDrawable(mContext.getResources(), placeholderBitmap));
- Bitmap icon = createIconBitmap(drawable, 1f);
+ Bitmap icon = createIconBitmap(drawable, IconNormalizer.ICON_VISIBLE_AREA_FACTOR);
return BitmapInfo.of(icon, extractColor(icon));
}