summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CellLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r--src/com/android/launcher2/CellLayout.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index eb92d2039..12b0158be 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -16,8 +16,6 @@
package com.android.launcher2;
-import java.util.Arrays;
-
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -49,6 +47,8 @@ import android.view.animation.LayoutAnimationController;
import com.android.launcher.R;
+import java.util.Arrays;
+
public class CellLayout extends ViewGroup {
static final String TAG = "CellLayout";
@@ -1150,12 +1150,12 @@ public class CellLayout extends ViewGroup {
// re-mark space taken by ignoreView as occupied
markCellsAsOccupiedForView(ignoreView);
- // Return null if no suitable location found
- if (bestDistance < Double.MAX_VALUE) {
- return bestXY;
- } else {
- return null;
+ // Return -1, -1 if no suitable location found
+ if (bestDistance == Double.MAX_VALUE) {
+ bestXY[0] = -1;
+ bestXY[1] = -1;
}
+ return bestXY;
}
/**