diff options
| author | 2018-04-03 13:39:53 -0400 | |
|---|---|---|
| committer | 2018-04-03 14:00:39 -0400 | |
| commit | 5df1a75ec83fc5ffd0265421c711822194df0ce0 (patch) | |
| tree | 60f79f7882cd85c3bc5add95be7a546b2235f360 | |
| parent | 9c9177eb6ba73c20b36aeabc6bb9ccad4694f41e (diff) | |
Dejank QS edit screen.
Do not show any tile animations on the QS edit screen.
Change-Id: I7cd409c859da0b4606a54d1308f85c01d92baff9
Fixes: 72086633
Test: visual
3 files changed, 13 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/CustomizeTileView.java b/packages/SystemUI/src/com/android/systemui/qs/customize/CustomizeTileView.java index eb95866aa909..20e3cee663da 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/CustomizeTileView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/CustomizeTileView.java @@ -44,4 +44,9 @@ public class CustomizeTileView extends QSTileView { public TextView getAppLabel() { return mSecondLine; } + + @Override + protected boolean animationsEnabled() { + return false; + } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java index 862a6a44618a..e7e756f87c84 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java @@ -159,13 +159,13 @@ public class QSIconViewImpl extends QSIconView { return getColorForState(getContext(), state); } - public static void animateGrayScale(int fromColor, int toColor, ImageView iv, - final Runnable endRunnable) { + private void animateGrayScale(int fromColor, int toColor, ImageView iv, + final Runnable endRunnable) { if (iv instanceof AlphaControlledSlashImageView) { ((AlphaControlledSlashImageView)iv) .setFinalImageTintList(ColorStateList.valueOf(toColor)); } - if (ValueAnimator.areAnimatorsEnabled()) { + if (mAnimationEnabled && ValueAnimator.areAnimatorsEnabled()) { final float fromAlpha = Color.alpha(fromColor); final float toAlpha = Color.alpha(toColor); final float fromChannel = Color.red(fromColor); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java index 09d928fd3657..cc60f8744ca7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java @@ -179,7 +179,7 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { protected void handleStateChanged(QSTile.State state) { int circleColor = getCircleColor(state.state); if (circleColor != mCircleColor) { - if (mBg.isShown()) { + if (mBg.isShown() && animationsEnabled()) { ValueAnimator animator = ValueAnimator.ofArgb(mCircleColor, circleColor) .setDuration(QS_ANIM_LENGTH); animator.addUpdateListener(animation -> mBg.setImageTintList(ColorStateList.valueOf( @@ -205,6 +205,10 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { } } + protected boolean animationsEnabled() { + return true; + } + private int getCircleColor(int state) { switch (state) { case Tile.STATE_ACTIVE: |