summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics/PreloadIconDrawable.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/graphics/PreloadIconDrawable.java')
-rw-r--r--src/com/android/launcher3/graphics/PreloadIconDrawable.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/graphics/PreloadIconDrawable.java b/src/com/android/launcher3/graphics/PreloadIconDrawable.java
index bc07ce1a5..3514a37c4 100644
--- a/src/com/android/launcher3/graphics/PreloadIconDrawable.java
+++ b/src/com/android/launcher3/graphics/PreloadIconDrawable.java
@@ -20,6 +20,7 @@ package com.android.launcher3.graphics;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
+import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
@@ -75,6 +76,8 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
private final Matrix mTmpMatrix = new Matrix();
private final PathMeasure mPathMeasure = new PathMeasure();
+ private final Context mContext;
+
// Path in [0, 100] bounds.
private final Path mProgressPath;
@@ -100,8 +103,9 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
/**
* @param progressPath fixed path in the bounds [0, 0, 100, 100] representing a progress bar.
*/
- public PreloadIconDrawable(Bitmap b, Path progressPath) {
+ public PreloadIconDrawable(Bitmap b, Path progressPath, Context context) {
super(b);
+ mContext = context;
mProgressPath = progressPath;
mScaledTrackPath = new Path();
mScaledProgressPath = new Path();
@@ -262,7 +266,7 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
setIsDisabled(true);
} else if (mIndicatorColor == 0) {
// Update the indicator color
- mIndicatorColor = getIconPalette().getPreloadProgressColor();
+ mIndicatorColor = getIconPalette().getPreloadProgressColor(mContext);
}
if (progress < 1 && progress > 0) {