Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java +20 −16 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ public class QSIconViewImpl extends QSIconView { } public static void animateGrayScale(int fromColor, int toColor, ImageView iv) { if (ValueAnimator.areAnimatorsEnabled()) { final float fromAlpha = Color.alpha(fromColor); final float toAlpha = Color.alpha(toColor); final float fromChannel = Color.red(fromColor); Loading @@ -151,7 +152,6 @@ public class QSIconViewImpl extends QSIconView { ValueAnimator anim = ValueAnimator.ofFloat(0, 1); anim.setDuration(QS_ANIM_LENGTH); anim.addUpdateListener(animation -> { float fraction = animation.getAnimatedFraction(); int alpha = (int) (fromAlpha + (toAlpha - fromAlpha) * fraction); Loading @@ -159,7 +159,11 @@ public class QSIconViewImpl extends QSIconView { setTint(iv, Color.argb(alpha, channel, channel, channel)); }); anim.start(); } else { setTint(iv, toColor); } } public static void setTint(ImageView iv, int color) { Loading Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java +20 −16 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ public class QSIconViewImpl extends QSIconView { } public static void animateGrayScale(int fromColor, int toColor, ImageView iv) { if (ValueAnimator.areAnimatorsEnabled()) { final float fromAlpha = Color.alpha(fromColor); final float toAlpha = Color.alpha(toColor); final float fromChannel = Color.red(fromColor); Loading @@ -151,7 +152,6 @@ public class QSIconViewImpl extends QSIconView { ValueAnimator anim = ValueAnimator.ofFloat(0, 1); anim.setDuration(QS_ANIM_LENGTH); anim.addUpdateListener(animation -> { float fraction = animation.getAnimatedFraction(); int alpha = (int) (fromAlpha + (toAlpha - fromAlpha) * fraction); Loading @@ -159,7 +159,11 @@ public class QSIconViewImpl extends QSIconView { setTint(iv, Color.argb(alpha, channel, channel, channel)); }); anim.start(); } else { setTint(iv, toColor); } } public static void setTint(ImageView iv, int color) { Loading