summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher/CellLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher/CellLayout.java')
-rw-r--r--src/com/android/launcher/CellLayout.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher/CellLayout.java b/src/com/android/launcher/CellLayout.java
index 160dd18b8..058b22c61 100644
--- a/src/com/android/launcher/CellLayout.java
+++ b/src/com/android/launcher/CellLayout.java
@@ -939,7 +939,7 @@ out: for (int i = x; i < x + spanX - 1 && x < xCount; i++) {
int maxVacantSpanYSpanX;
final Rect current = new Rect();
- private void clearVacantCells() {
+ void clearVacantCells() {
final ArrayList<VacantCell> list = vacantCells;
final int count = list.size();
@@ -980,6 +980,10 @@ out: for (int i = x; i < x + spanX - 1 && x < xCount; i++) {
* @return True if a vacant cell of the specified dimension was found, false otherwise.
*/
boolean findCellForSpan(int[] cellXY, int spanX, int spanY) {
+ return findCellForSpan(cellXY, spanX, spanY, true);
+ }
+
+ boolean findCellForSpan(int[] cellXY, int spanX, int spanY, boolean clear) {
final ArrayList<VacantCell> list = vacantCells;
final int count = list.size();
@@ -1013,7 +1017,7 @@ out: for (int i = x; i < x + spanX - 1 && x < xCount; i++) {
}
}
- clearVacantCells();
+ if (clear) clearVacantCells();
return found;
}