summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics/PreloadIconDrawable.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-02-10 16:52:16 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-02-16 15:24:37 -0800
commit1f3f07d47c29cba3b70bcd15ebb65a077f55a558 (patch)
treed34ba158bcab7f2974d7d7121d14ae914171f0e1 /src/com/android/launcher3/graphics/PreloadIconDrawable.java
parent9e76f682f3e52afa1f11172564b883c7dfda5063 (diff)
downloadandroid_packages_apps_Trebuchet-1f3f07d47c29cba3b70bcd15ebb65a077f55a558.tar.gz
android_packages_apps_Trebuchet-1f3f07d47c29cba3b70bcd15ebb65a077f55a558.tar.bz2
android_packages_apps_Trebuchet-1f3f07d47c29cba3b70bcd15ebb65a077f55a558.zip
Simplifying some launcher themes
> Replacing some colors with theme attributes > Simplifying styles definition by removing unnecessary inheritance and inlining some definitions Change-Id: Ifa167515cae6a7fd3720f1a52ff9ce11abb4495f
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) {