Merge "Adding delay upon user interaction to prevent the new-app animation from taking over your phone. (Bug 6248609)"
diff --git a/src/com/android/launcher2/DeleteDropTarget.java b/src/com/android/launcher2/DeleteDropTarget.java
index 7e4225b..d8ea6ef 100644
--- a/src/com/android/launcher2/DeleteDropTarget.java
+++ b/src/com/android/launcher2/DeleteDropTarget.java
@@ -38,6 +38,7 @@
public class DeleteDropTarget extends ButtonDropTarget {
private static int DELETE_ANIMATION_DURATION = 285;
+ private static int FLIND_DELETE_ANIMATION_DURATION = 350;
private static int MODE_FLING_DELETE_TO_TRASH = 0;
private static int MODE_FLING_DELETE_ALONG_VECTOR = 1;
@@ -307,7 +308,7 @@
private long mPrevTime;
private boolean mHasOffsetForScale;
- private final TimeInterpolator mAlphaInterpolator = new DecelerateInterpolator(1.5f);
+ private final TimeInterpolator mAlphaInterpolator = new DecelerateInterpolator(0.75f);
public FlingAlongVectorAnimatorUpdateListener(DragLayer dragLayer, PointF vel, Rect from,
long startTime) {
@@ -373,7 +374,7 @@
final ViewConfiguration config = ViewConfiguration.get(mLauncher);
final DragLayer dragLayer = mLauncher.getDragLayer();
- final int duration = DELETE_ANIMATION_DURATION;
+ final int duration = FLIND_DELETE_ANIMATION_DURATION;
final long startTime = AnimationUtils.currentAnimationTimeMillis();
// NOTE: Because it takes time for the first frame of animation to actually be
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index 9a61db6..59dcc5b 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -63,7 +63,7 @@
static final int SCROLL_RIGHT = 1;
private static final float MAX_FLING_DEGREES = 35f;
- private static final int FLING_TO_DELETE_THRESHOLD_Y_VELOCITY = -1400;
+ private static final int FLING_TO_DELETE_THRESHOLD_Y_VELOCITY = -1500;
private Launcher mLauncher;
private Handler mHandler;
diff --git a/src/com/android/launcher2/DragView.java b/src/com/android/launcher2/DragView.java
index 5636f99..a6aa595 100644
--- a/src/com/android/launcher2/DragView.java
+++ b/src/com/android/launcher2/DragView.java
@@ -22,7 +22,6 @@
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
-import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PorterDuff;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index cef7137..f768a39 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2360,7 +2360,6 @@
mStateAnimation = null;
}
final Resources res = getResources();
- final Launcher instance = this;
final int duration = res.getInteger(R.integer.config_appsCustomizeZoomInTime);
final int fadeDuration = res.getInteger(R.integer.config_appsCustomizeFadeInTime);
@@ -2540,9 +2539,6 @@
updateWallpaperVisibility(true);
showHotseat(animated);
if (animated) {
- final float oldScaleX = fromView.getScaleX();
- final float oldScaleY = fromView.getScaleY();
-
final LauncherViewPropertyAnimator scaleAnim =
new LauncherViewPropertyAnimator(fromView);
scaleAnim.
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 604e73c..1fc39f6 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -17,7 +17,6 @@
package com.android.launcher2;
import android.animation.Animator;
-import android.animation.AnimatorInflater;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
@@ -29,7 +28,6 @@
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
-import android.view.ActionMode;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -42,8 +40,6 @@
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Interpolator;
-import android.widget.Checkable;
-import android.widget.ImageView;
import android.widget.Scroller;
import com.android.launcher.R;
diff --git a/src/com/android/launcher2/StrokedTextView.java b/src/com/android/launcher2/StrokedTextView.java
index 20f9f48..4e28d17 100644
--- a/src/com/android/launcher2/StrokedTextView.java
+++ b/src/com/android/launcher2/StrokedTextView.java
@@ -89,7 +89,6 @@
protected void onDraw(Canvas canvas) {
if (mCache != null) {
if (mUpdateCachedBitmap) {
- final int gap = getCompoundDrawablePadding();
final int w = getMeasuredWidth();
final int h = getMeasuredHeight();
final String text = getText().toString();
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 8c3b465..5b321f3 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1838,7 +1838,6 @@
* Responsibility for the bitmap is transferred to the caller.
*/
public Bitmap createDragBitmap(View v, Canvas canvas, int padding) {
- final int outlineColor = getResources().getColor(android.R.color.holo_blue_light);
Bitmap b;
if (v instanceof TextView) {