am a728543a: Merge "Fix a couple small bugs (issue 6539339)" into jb-dev

* commit 'a728543a34e4095dfd1f661dfd3dd6d2ccbca657':
  Fix a couple small bugs (issue 6539339)
This commit is contained in:
Winson Chung
2012-05-23 11:16:01 -07:00
committed by Android Git Automerger
2 changed files with 7 additions and 4 deletions
+4 -4
View File
@@ -80,7 +80,6 @@ public class CellLayout extends ViewGroup {
// return an (x, y) value from helper functions. Do NOT use them to maintain other state. // return an (x, y) value from helper functions. Do NOT use them to maintain other state.
private final int[] mTmpXY = new int[2]; private final int[] mTmpXY = new int[2];
private final int[] mTmpPoint = new int[2]; private final int[] mTmpPoint = new int[2];
private final PointF mTmpPointF = new PointF();
int[] mTempLocation = new int[2]; int[] mTempLocation = new int[2];
boolean[][] mOccupied; boolean[][] mOccupied;
@@ -149,7 +148,7 @@ public class CellLayout extends ViewGroup {
static final int LANDSCAPE = 0; static final int LANDSCAPE = 0;
static final int PORTRAIT = 1; static final int PORTRAIT = 1;
private static final float REORDER_HINT_MAGNITUDE = 0.10f; private static final float REORDER_HINT_MAGNITUDE = 0.12f;
private static final int REORDER_ANIMATION_DURATION = 150; private static final int REORDER_ANIMATION_DURATION = 150;
private float mReorderHintAnimationMagnitude; private float mReorderHintAnimationMagnitude;
@@ -1969,7 +1968,9 @@ public class CellLayout extends ViewGroup {
va = ValueAnimator.ofFloat(0f, 1f); va = ValueAnimator.ofFloat(0f, 1f);
va.setRepeatMode(ValueAnimator.REVERSE); va.setRepeatMode(ValueAnimator.REVERSE);
va.setRepeatCount(ValueAnimator.INFINITE); va.setRepeatCount(ValueAnimator.INFINITE);
va.setDuration((int) (DURATION * (1.0f + Math.random()*.08f))); va.setDuration(DURATION);
va.setStartDelay((int) ((Math.max(REORDER_ANIMATION_DURATION, delay)
+ Math.random() * 60)));
va.addUpdateListener(new AnimatorUpdateListener() { va.addUpdateListener(new AnimatorUpdateListener() {
@Override @Override
public void onAnimationUpdate(ValueAnimator animation) { public void onAnimationUpdate(ValueAnimator animation) {
@@ -1993,7 +1994,6 @@ public class CellLayout extends ViewGroup {
} }
} }
}); });
va.setStartDelay(Math.max(REORDER_ANIMATION_DURATION, delay));
mShakeAnimators.put(child, this); mShakeAnimators.put(child, this);
va.start(); va.start();
} }
+3
View File
@@ -2194,6 +2194,9 @@ public class Workspace extends SmoothPagedView
resizeOnDrop = true; resizeOnDrop = true;
item.spanX = resultSpan[0]; item.spanX = resultSpan[0];
item.spanY = resultSpan[1]; item.spanY = resultSpan[1];
AppWidgetHostView awhv = (AppWidgetHostView) cell;
AppWidgetResizeFrame.updateWidgetSizeRanges(awhv, mLauncher, resultSpan[0],
resultSpan[1]);
} }
if (mCurrentPage != screen && !hasMovedIntoHotseat) { if (mCurrentPage != screen && !hasMovedIntoHotseat) {