diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2017-09-11 11:18:03 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2017-09-11 12:17:09 -0700 |
commit | e24cb63b811e2885a69e7df794e9972cdf5a57b9 (patch) | |
tree | c4229be8691f0ed8e902a12c2d68785aec257f57 /src/com/android/launcher3/graphics/IconNormalizer.java | |
parent | 9c1607886b87734f5ec36a87f62dcaabb78bdf20 (diff) | |
download | android_packages_apps_Trebuchet-e24cb63b811e2885a69e7df794e9972cdf5a57b9.tar.gz android_packages_apps_Trebuchet-e24cb63b811e2885a69e7df794e9972cdf5a57b9.tar.bz2 android_packages_apps_Trebuchet-e24cb63b811e2885a69e7df794e9972cdf5a57b9.zip |
WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683
Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
Diffstat (limited to 'src/com/android/launcher3/graphics/IconNormalizer.java')
-rw-r--r-- | src/com/android/launcher3/graphics/IconNormalizer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/graphics/IconNormalizer.java b/src/com/android/launcher3/graphics/IconNormalizer.java index 8ed62bcdc..28fc42368 100644 --- a/src/com/android/launcher3/graphics/IconNormalizer.java +++ b/src/com/android/launcher3/graphics/IconNormalizer.java @@ -231,7 +231,7 @@ public class IconNormalizer { */ public synchronized float getScale(@NonNull Drawable d, @Nullable RectF outBounds, @Nullable Path path, @Nullable boolean[] outMaskShape) { - if (Utilities.isAtLeastO() && d instanceof AdaptiveIconDrawable && + if (Utilities.ATLEAST_OREO && d instanceof AdaptiveIconDrawable && mAdaptiveIconScale != SCALE_NOT_INITIALIZED) { if (outBounds != null) { outBounds.set(mAdaptiveIconBounds); @@ -347,7 +347,7 @@ public class IconNormalizer { float areaScale = area / (width * height); // Use sqrt of the final ratio as the images is scaled across both width and height. float scale = areaScale > scaleRequired ? (float) Math.sqrt(scaleRequired / areaScale) : 1; - if (Utilities.isAtLeastO() && d instanceof AdaptiveIconDrawable && + if (Utilities.ATLEAST_OREO && d instanceof AdaptiveIconDrawable && mAdaptiveIconScale == SCALE_NOT_INITIALIZED) { mAdaptiveIconScale = scale; mAdaptiveIconBounds.set(mBounds); |