diff options
author | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-06-28 18:33:37 +0000 |
---|---|---|
committer | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-06-28 18:33:37 +0000 |
commit | 3241e68632b7d52a87dedcdb358273f651a9c4b1 (patch) | |
tree | 065ac9bc742e2365f8980837fff6d35ddbe6fb30 | |
parent | acbda3fe52d640a47dce30048446809446ba9df4 (diff) | |
parent | 7d4ef41cb4fdebeec7b009c7997c5e7e9be0b00f (diff) | |
download | android_packages_apps_Trebuchet-3241e68632b7d52a87dedcdb358273f651a9c4b1.tar.gz android_packages_apps_Trebuchet-3241e68632b7d52a87dedcdb358273f651a9c4b1.tar.bz2 android_packages_apps_Trebuchet-3241e68632b7d52a87dedcdb358273f651a9c4b1.zip |
[automerger] Fix clipping issue on adaptive icons Bug: 62372639 am: 7d4ef41cb4
Change-Id: Id8b659b99db2b2ee5fcb468a046ef9704046487e
-rw-r--r-- | src/com/android/launcher3/IconCache.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/graphics/LauncherIcons.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java index 9dc3129fd..c5ca183f7 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 = 23; + private final static int RELEASE_VERSION = 24; 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 09ea1ad41..ece6c5840 100644 --- a/src/com/android/launcher3/graphics/LauncherIcons.java +++ b/src/com/android/launcher3/graphics/LauncherIcons.java @@ -337,15 +337,16 @@ public class LauncherIcons implements AutoCloseable { final int top = (textureHeight-height) / 2; mOldBounds.set(icon.getBounds()); + int offset = 0; if (Utilities.ATLEAST_OREO && icon instanceof AdaptiveIconDrawable) { - int offset = Math.max((int) Math.ceil(BLUR_FACTOR * textureWidth), Math.max(left, top)); + offset = Math.max((int) Math.ceil(BLUR_FACTOR * textureWidth), Math.max(left, top)); int size = Math.max(width, height); icon.setBounds(offset, offset, offset + size, offset + size); } else { icon.setBounds(left, top, left+width, top+height); } mCanvas.save(); - mCanvas.scale(scale, scale, textureWidth / 2, textureHeight / 2); + mCanvas.scale(scale, scale, textureWidth / 2 + offset, textureHeight / 2 + offset); icon.draw(mCanvas); mCanvas.restore(); icon.setBounds(mOldBounds); |