summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop/DragView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/dragndrop/DragView.java')
-rw-r--r--src/com/android/launcher3/dragndrop/DragView.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index 22e077bb1..93f5be526 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -22,7 +22,6 @@ import android.animation.FloatArrayEvaluator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.SuppressLint;
-import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -31,14 +30,12 @@ import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
-import android.os.Build;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.R;
-import com.android.launcher3.Utilities;
import com.android.launcher3.util.Thunk;
import java.util.Arrays;
@@ -88,7 +85,6 @@ public class DragView extends View {
* @param registrationX The x coordinate of the registration point.
* @param registrationY The y coordinate of the registration point.
*/
- @TargetApi(Build.VERSION_CODES.LOLLIPOP)
public DragView(Launcher launcher, Bitmap bitmap, int registrationX, int registrationY,
final float initialScale, final float finalScaleDps) {
super(launcher);
@@ -144,9 +140,7 @@ public class DragView extends View {
measure(ms, ms);
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
- if (Utilities.ATLEAST_LOLLIPOP) {
- setElevation(getResources().getDimension(R.dimen.drag_elevation));
- }
+ setElevation(getResources().getDimension(R.dimen.drag_elevation));
}
/** Sets the scale of the view over the normal workspace icon size. */
@@ -265,14 +259,9 @@ public class DragView extends View {
setColorScale(color, m2);
m1.postConcat(m2);
- if (Utilities.ATLEAST_LOLLIPOP) {
- animateFilterTo(m1.getArray());
- } else {
- mPaint.setColorFilter(new ColorMatrixColorFilter(m1));
- invalidate();
- }
+ animateFilterTo(m1.getArray());
} else {
- if (!Utilities.ATLEAST_LOLLIPOP || mCurrentFilter == null) {
+ if (mCurrentFilter == null) {
mPaint.setColorFilter(null);
invalidate();
} else {
@@ -281,7 +270,6 @@ public class DragView extends View {
}
}
- @TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void animateFilterTo(float[] targetFilter) {
float[] oldFilter = mCurrentFilter == null ? new ColorMatrix().getArray() : mCurrentFilter;
mCurrentFilter = Arrays.copyOf(oldFilter, oldFilter.length);