Loading src/com/android/launcher3/FastBitmapDrawable.java +14 −3 Original line number Diff line number Diff line Loading @@ -103,9 +103,14 @@ public class FastBitmapDrawable extends Drawable { } protected FastBitmapDrawable(Bitmap b, int iconColor) { this(b, iconColor, false); } protected FastBitmapDrawable(Bitmap b, int iconColor, boolean isDisabled) { mBitmap = b; mIconColor = iconColor; setFilterBitmap(true); setIsDisabled(isDisabled); } @Override Loading Loading @@ -249,6 +254,10 @@ public class FastBitmapDrawable extends Drawable { } } protected boolean isDisabled() { return mIsDisabled; } /** * Sets the saturation of this icon, 0 [full color] -> 1 [desaturated] */ Loading Loading @@ -338,21 +347,23 @@ public class FastBitmapDrawable extends Drawable { @Override public ConstantState getConstantState() { return new MyConstantState(mBitmap, mIconColor); return new MyConstantState(mBitmap, mIconColor, mIsDisabled); } protected static class MyConstantState extends ConstantState { protected final Bitmap mBitmap; protected final int mIconColor; protected final boolean mIsDisabled; public MyConstantState(Bitmap bitmap, int color) { public MyConstantState(Bitmap bitmap, int color, boolean isDisabled) { mBitmap = bitmap; mIconColor = color; mIsDisabled = isDisabled; } @Override public Drawable newDrawable() { return new FastBitmapDrawable(mBitmap, mIconColor); return new FastBitmapDrawable(mBitmap, mIconColor, mIsDisabled); } @Override Loading Loading
src/com/android/launcher3/FastBitmapDrawable.java +14 −3 Original line number Diff line number Diff line Loading @@ -103,9 +103,14 @@ public class FastBitmapDrawable extends Drawable { } protected FastBitmapDrawable(Bitmap b, int iconColor) { this(b, iconColor, false); } protected FastBitmapDrawable(Bitmap b, int iconColor, boolean isDisabled) { mBitmap = b; mIconColor = iconColor; setFilterBitmap(true); setIsDisabled(isDisabled); } @Override Loading Loading @@ -249,6 +254,10 @@ public class FastBitmapDrawable extends Drawable { } } protected boolean isDisabled() { return mIsDisabled; } /** * Sets the saturation of this icon, 0 [full color] -> 1 [desaturated] */ Loading Loading @@ -338,21 +347,23 @@ public class FastBitmapDrawable extends Drawable { @Override public ConstantState getConstantState() { return new MyConstantState(mBitmap, mIconColor); return new MyConstantState(mBitmap, mIconColor, mIsDisabled); } protected static class MyConstantState extends ConstantState { protected final Bitmap mBitmap; protected final int mIconColor; protected final boolean mIsDisabled; public MyConstantState(Bitmap bitmap, int color) { public MyConstantState(Bitmap bitmap, int color, boolean isDisabled) { mBitmap = bitmap; mIconColor = color; mIsDisabled = isDisabled; } @Override public Drawable newDrawable() { return new FastBitmapDrawable(mBitmap, mIconColor); return new FastBitmapDrawable(mBitmap, mIconColor, mIsDisabled); } @Override Loading