diff options
| author | Hyunyoung Song <hyunyoungs@google.com> | 2021-10-27 00:25:52 -0700 |
|---|---|---|
| committer | Hyunyoung Song <hyunyoungs@google.com> | 2021-10-29 13:54:17 -0700 |
| commit | f71aa0ca0d182e3eb052908abf3498e83bbc6aa7 (patch) | |
| tree | 4b8a4dfbd7b6f89412a8a74ef887c4062dfd2a7e | |
| parent | 60bffaf53f76203b634a231fd86dd047c02b8e5b (diff) | |
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
| -rw-r--r-- | iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ public class BaseIconFactory implements AutoCloseable { 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 @@ public class BaseIconFactory implements AutoCloseable { 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)); } |
