diff options
author | Adam Cohen <adamcohen@google.com> | 2012-03-29 15:05:59 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-29 15:05:59 -0700 |
commit | ec114055837998906efdf741f91ab168f6c0a6f4 (patch) | |
tree | 31ef5579560345299d5a99edefa6b79fe6fe4ef0 /src/com/android/launcher2/CellLayout.java | |
parent | df2b4e0745ad910bd3e00e69d220095619eb71a2 (diff) | |
parent | 5b53f29f809a0dad4a1e0717ba610ce737ee0f43 (diff) | |
download | android_packages_apps_Trebuchet-ec114055837998906efdf741f91ab168f6c0a6f4.tar.gz android_packages_apps_Trebuchet-ec114055837998906efdf741f91ab168f6c0a6f4.tar.bz2 android_packages_apps_Trebuchet-ec114055837998906efdf741f91ab168f6c0a6f4.zip |
Merge "Fixing launcher ANR (issue 6238175)"
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 5aa39c425..199c41a59 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -191,6 +191,8 @@ public class CellLayout extends ViewGroup { mCountY = LauncherModel.getCellCountY(); mOccupied = new boolean[mCountX][mCountY]; mTmpOccupied = new boolean[mCountX][mCountY]; + mPreviousReorderDirection[0] = INVALID_DIRECTION; + mPreviousReorderDirection[1] = INVALID_DIRECTION; a.recycle(); @@ -1566,7 +1568,8 @@ public class CellLayout extends ViewGroup { float bestDistance = Float.MAX_VALUE; // We use this to march in a single direction - if (direction[0] != 0 && direction[1] != 0) { + if ((direction[0] != 0 && direction[1] != 0) || + (direction[0] == 0 && direction[1] == 0)) { return bestXY; } |