From 9fc953b94dbc6b99e6de08c9dcc80a0cb8e3e319 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 17 Aug 2015 12:24:25 -0700 Subject: Version code cleanup > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b --- src/com/android/launcher3/ButtonDropTarget.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/com/android/launcher3/ButtonDropTarget.java') diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java index b7f89d02a..2baa6d8ee 100644 --- a/src/com/android/launcher3/ButtonDropTarget.java +++ b/src/com/android/launcher3/ButtonDropTarget.java @@ -24,7 +24,6 @@ import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.TargetApi; import android.content.Context; import android.content.res.ColorStateList; -import android.content.res.Configuration; import android.graphics.ColorMatrix; import android.graphics.ColorMatrixColorFilter; import android.graphics.PointF; @@ -93,7 +92,7 @@ public abstract class ButtonDropTarget extends TextView // drawableLeft and drawableStart. mDrawable = getResources().getDrawable(resId); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + if (Utilities.ATLEAST_JB_MR1) { setCompoundDrawablesRelativeWithIntrinsicBounds(mDrawable, null, null, null); } else { setCompoundDrawablesWithIntrinsicBounds(mDrawable, null, null, null); @@ -114,7 +113,7 @@ public abstract class ButtonDropTarget extends TextView @Override public final void onDragEnter(DragObject d) { d.dragView.setColor(mHoverColor); - if (Utilities.isLmpOrAbove()) { + if (Utilities.ATLEAST_LOLLIPOP) { animateTextColor(mHoverColor); } else { if (mCurrentFilter == null) { @@ -131,8 +130,8 @@ public abstract class ButtonDropTarget extends TextView // Do nothing } - protected void resetHoverColor() { - if (Utilities.isLmpOrAbove()) { + protected void resetHoverColor() { + if (Utilities.ATLEAST_LOLLIPOP) { animateTextColor(mOriginalTextColor.getDefaultColor()); } else { mDrawable.setColorFilter(null); -- cgit v1.2.3