From 0d84d7de61128e110ae941185eb9ca41ffa2b22f Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Fri, 15 Jun 2018 14:45:04 -0700 Subject: [PATCH] Apply legacy treatment on all non adaptive icons Bug: 110123894 Bug: 62372639 Change-Id: I3bcaa3b9886942b4f1d45aaeebc8b8022e1319f8 --- src/com/android/launcher3/IconCache.java | 2 +- src/com/android/launcher3/graphics/LauncherIcons.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java index 8d79737c59..9dc3129fd8 100644 --- a/src/com/android/launcher3/IconCache.java +++ b/src/com/android/launcher3/IconCache.java @@ -801,7 +801,7 @@ public class IconCache { } private static final class IconDB extends SQLiteCacheHelper { - private final static int RELEASE_VERSION = 22; + private final static int RELEASE_VERSION = 23; private final static String TABLE_NAME = "icons"; private final static String COLUMN_ROWID = "rowid"; diff --git a/src/com/android/launcher3/graphics/LauncherIcons.java b/src/com/android/launcher3/graphics/LauncherIcons.java index 89ba72abf5..3cf9c2f2da 100644 --- a/src/com/android/launcher3/graphics/LauncherIcons.java +++ b/src/com/android/launcher3/graphics/LauncherIcons.java @@ -241,7 +241,8 @@ public class LauncherIcons implements AutoCloseable { private Drawable normalizeAndWrapToAdaptiveIcon(Drawable icon, int iconAppTargetSdk, RectF outIconBounds, float[] outScale) { float scale = 1f; - if (Utilities.ATLEAST_OREO && iconAppTargetSdk >= Build.VERSION_CODES.O) { + if ((Utilities.ATLEAST_OREO && iconAppTargetSdk >= Build.VERSION_CODES.O) || + Utilities.ATLEAST_P) { boolean[] outShape = new boolean[1]; if (mWrapperIcon == null) { mWrapperIcon = mContext.getDrawable(R.drawable.adaptive_icon_drawable_wrapper)