summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-29 12:29:17 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-05-29 12:29:17 -0700
commit9d981343c9d187b4746ed1f3658224d9551d51c8 (patch)
tree53c96d096f52a5540f963bbfaabb2fcd004d0c38 /core
parentecad93e5f3c7345febcfa078b1d2aa00a2e1fd66 (diff)
parent9ffe1ae56bf495b1ada1e9c1da523db0677d98b7 (diff)
downloadframeworks_base-9d981343c9d187b4746ed1f3658224d9551d51c8.zip
frameworks_base-9d981343c9d187b4746ed1f3658224d9551d51c8.tar.gz
frameworks_base-9d981343c9d187b4746ed1f3658224d9551d51c8.tar.bz2
Merge change 2732 into donut
* changes: Fix for #1878497.
Diffstat (limited to 'core')
-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 6aca105..8e71c57 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);
}
/**