From 8f4a3963b0bc0f98773bf34a3ff2989677d43e96 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Wed, 3 May 2017 15:39:26 -0700 Subject: [PATCH] Guard aginast O for checking AdaptiveIconDrawable b/37952598 Change-Id: Ief11aa61d804f9ca44ce9199002a6e763b3bf3e9 --- src/com/android/launcher3/graphics/LauncherIcons.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/graphics/LauncherIcons.java b/src/com/android/launcher3/graphics/LauncherIcons.java index 746a639fff..53521f22d0 100644 --- a/src/com/android/launcher3/graphics/LauncherIcons.java +++ b/src/com/android/launcher3/graphics/LauncherIcons.java @@ -265,7 +265,7 @@ public class LauncherIcons { final int top = (textureHeight-height) / 2; sOldBounds.set(icon.getBounds()); - if (icon instanceof AdaptiveIconDrawable) { + if (Utilities.isAtLeastO() && icon instanceof AdaptiveIconDrawable) { int offset = Math.min(left, top); int size = Math.max(width, height); icon.setBounds(offset, offset, offset + size, offset + size);