summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics/IconNormalizer.java
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2017-09-11 11:18:03 -0700
committerHyunyoung Song <hyunyoungs@google.com>2017-09-11 12:17:09 -0700
commite24cb63b811e2885a69e7df794e9972cdf5a57b9 (patch)
treec4229be8691f0ed8e902a12c2d68785aec257f57 /src/com/android/launcher3/graphics/IconNormalizer.java
parent9c1607886b87734f5ec36a87f62dcaabb78bdf20 (diff)
downloadandroid_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.java4
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);