am ad9bcb22: merge from open-source master

Merge commit 'ad9bcb22d05fbf130ac64254abd51a137e9a3d3f'

* commit 'ad9bcb22d05fbf130ac64254abd51a137e9a3d3f':
  Fix x coordinate of the ACTION_UP event in TouchUtils.drag() method
  Fixed Android animation framework, for using interpolators that do not start at 0.0f
  Fix for GPS engines without separate session and engine status events.
  Be tolerant of GPS session and engine on status messages arriving out of order.
  GpsLocationProvider: Do not release wakelock until the GPS engine is fully off
This commit is contained in:
The Android Open Source Project
2010-02-08 09:17:10 -08:00
committed by Android Git Automerger
3 changed files with 6 additions and 4 deletions

View File

@@ -880,7 +880,7 @@ public abstract class Animation implements Cloneable {
region.inset(-1.0f, -1.0f);
if (mFillBefore) {
final Transformation previousTransformation = mPreviousTransformation;
applyTransformation(0.0f, previousTransformation);
applyTransformation(mInterpolator.getInterpolation(0.0f), previousTransformation);
}
}

View File

@@ -282,7 +282,9 @@ public class AnimationSet extends Animation {
final Animation a = animations.get(i);
temp.clear();
a.applyTransformation(0.0f, temp);
final Interpolator interpolator = a.mInterpolator;
a.applyTransformation(interpolator != null ? interpolator.getInterpolation(0.0f)
: 0.0f, temp);
previousTransformation.compose(temp);
}
}

View File

@@ -773,7 +773,7 @@ public class TouchUtils {
float xStep = (toX - fromX) / stepCount;
MotionEvent event = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_DOWN, fromX, y, 0);
MotionEvent.ACTION_DOWN, x, y, 0);
inst.sendPointerSync(event);
inst.waitForIdleSync();
@@ -787,7 +787,7 @@ public class TouchUtils {
}
eventTime = SystemClock.uptimeMillis();
event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, fromX, y, 0);
event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0);
inst.sendPointerSync(event);
inst.waitForIdleSync();
}