From 8c93e513ad346311144f89fe616c6794c11558f0 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 5 Dec 2012 11:39:54 -0800 Subject: [PATCH] Fix off by one bug in gesture trail drawing Bug: 7594165 Change-Id: Ia3f7dcee71db91e39c40022b19e7b07c5d4488c8 --- .../inputmethod/keyboard/internal/GesturePreviewTrail.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/internal/GesturePreviewTrail.java b/java/src/com/android/inputmethod/keyboard/internal/GesturePreviewTrail.java index 80562cb2c..3a57f673a 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/GesturePreviewTrail.java +++ b/java/src/com/android/inputmethod/keyboard/internal/GesturePreviewTrail.java @@ -159,7 +159,7 @@ final class GesturePreviewTrail { float r1 = maxWidth / 2.0f; // Initialize bounds rectangle. outBoundsRect.set(p1x, p1y, p1x, p1y); - for (int i = startIndex + 1; i < trailSize - 1; i++) { + for (int i = startIndex + 1; i < trailSize; i++) { final int elapsedTime = sinceDown - eventTimes[i]; final int p2x = getXCoordValue(xCoords[i]); final int p2y = yCoords[i];