summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcore/java/android/gesture/Gesture.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/java/android/gesture/Gesture.java b/core/java/android/gesture/Gesture.java
index 6aca105825e8..8e71c5744d41 100755
--- a/core/java/android/gesture/Gesture.java
+++ b/core/java/android/gesture/Gesture.java
@@ -46,7 +46,7 @@ public class Gesture implements Parcelable {
private static int sGestureCount = 0;
- private RectF mBoundingBox;
+ private final RectF mBoundingBox = new RectF();
// the same as its instance ID
private long mGestureID;
@@ -83,12 +83,7 @@ public class Gesture implements Parcelable {
*/
public void addStroke(GestureStroke stroke) {
mStrokes.add(stroke);
-
- if (mBoundingBox == null) {
- mBoundingBox = new RectF(stroke.boundingBox);
- } else {
- mBoundingBox.union(stroke.boundingBox);
- }
+ mBoundingBox.union(stroke.boundingBox);
}
/**