am 4da2ed7a: Fix too thick gesture trail width

* commit '4da2ed7a78c63284fa3869450a492ee7ae420ed9':
  Fix too thick gesture trail width
main
Ken Wakasa 2013-01-10 05:40:13 -08:00 committed by Android Git Automerger
commit 7f83014a68
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ final class GesturePreviewTrail {
private static float getWidth(final int elapsedTime, final Params params) {
final int deltaTime = params.mTrailLingerDuration - elapsedTime;
final float deltaWidth = params.mTrailStartWidth - params.mTrailEndWidth;
return (deltaTime * deltaWidth) / params.mTrailLingerDuration + params.mTrailEndWidth;
return Math.max(
(deltaTime * deltaWidth) / params.mTrailLingerDuration, params.mTrailEndWidth);
}
private final RoundedLine mRoundedLine = new RoundedLine();