summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics/IconNormalizer.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-09-11 21:40:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-09-11 21:40:47 +0000
commit673f917d57f47482aa1a823e74f0377315f30293 (patch)
tree730290c4e76f907f473e7fac3c4ac3e6f25dc23a /src/com/android/launcher3/graphics/IconNormalizer.java
parenta41ebf0cd2c2cd95a377c824acb517894ebbd372 (diff)
parente24cb63b811e2885a69e7df794e9972cdf5a57b9 (diff)
downloadandroid_packages_apps_Trebuchet-673f917d57f47482aa1a823e74f0377315f30293.tar.gz
android_packages_apps_Trebuchet-673f917d57f47482aa1a823e74f0377315f30293.tar.bz2
android_packages_apps_Trebuchet-673f917d57f47482aa1a823e74f0377315f30293.zip
Merge "WallpaperManagerCompat should target correct platform Also replace Utilities.isAtLeastO() to static final constant. Bug: 65544683" into ub-launcher3-dorval-polish2
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);