summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2018-06-28 22:19:24 +0000
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2018-06-28 22:19:24 +0000
commit778112acf7e86eba0844324c90347a60a394bd23 (patch)
treeeeb6683555f9ec65b15458f137d2fb2c887ca50c
parent3241e68632b7d52a87dedcdb358273f651a9c4b1 (diff)
parent82d0835fa53962b149256deeb66509c0cccd5906 (diff)
downloadandroid_packages_apps_Trebuchet-778112acf7e86eba0844324c90347a60a394bd23.tar.gz
android_packages_apps_Trebuchet-778112acf7e86eba0844324c90347a60a394bd23.tar.bz2
android_packages_apps_Trebuchet-778112acf7e86eba0844324c90347a60a394bd23.zip
[automerger] Fix clipping issue on adaptive icons Bug: 62372639 am: 82d0835fa5
Change-Id: Ib3b40778e3828dacd0d851481afdeefe9960e5b3
-rw-r--r--src/com/android/launcher3/graphics/LauncherIcons.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/launcher3/graphics/LauncherIcons.java b/src/com/android/launcher3/graphics/LauncherIcons.java
index ece6c5840..333fe5907 100644
--- a/src/com/android/launcher3/graphics/LauncherIcons.java
+++ b/src/com/android/launcher3/graphics/LauncherIcons.java
@@ -337,16 +337,15 @@ 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) {
- offset = Math.max((int) Math.ceil(BLUR_FACTOR * textureWidth), Math.max(left, top));
+ int 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);
+ icon.setBounds(offset, offset, size - offset, size - offset);
} else {
icon.setBounds(left, top, left+width, top+height);
}
mCanvas.save();
- mCanvas.scale(scale, scale, textureWidth / 2 + offset, textureHeight / 2 + offset);
+ mCanvas.scale(scale, scale, textureWidth / 2, textureHeight / 2);
icon.draw(mCanvas);
mCanvas.restore();
icon.setBounds(mOldBounds);