diff options
author | Patrick Dubroy <dubroy@google.com> | 2011-01-25 05:32:24 -0800 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2011-01-25 05:33:22 -0800 |
commit | 8b1fe774c24854fdefc4d875d8460752048696e2 (patch) | |
tree | 896d23db4296c10d951ea096783acc38d75bf7e8 /src/com/android/launcher2/Launcher.java | |
parent | 8c920dd3683d752aa4c43e964831ce53f9b72887 (diff) | |
download | android_packages_apps_Trebuchet-8b1fe774c24854fdefc4d875d8460752048696e2.tar.gz android_packages_apps_Trebuchet-8b1fe774c24854fdefc4d875d8460752048696e2.tar.bz2 android_packages_apps_Trebuchet-8b1fe774c24854fdefc4d875d8460752048696e2.zip |
Fix 3385181: Widget doesn't stay where I put it
Change-Id: I8ea7bb50fea6c6b113e4ba69221623e6c6cd80cc
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index dabc42a9e..1a7067e93 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1148,10 +1148,7 @@ public final class Launcher extends Activity final int[] cellXY = mTmpAddItemCellCoordinates; final CellLayout layout = (CellLayout) mWorkspace.getChildAt(screen); - int[] touchXY = null; - if (mAddDropPosition != null && mAddDropPosition[0] > -1 && mAddDropPosition[1] > -1) { - touchXY = mAddDropPosition; - } + int[] touchXY = mAddDropPosition; boolean foundCellSpan = false; if (touchXY != null) { // when dragging and dropping, just find the closest free spot @@ -1196,13 +1193,7 @@ public final class Launcher extends Activity // if we are placing widgets on a "spring-loaded" screen final int[] cellXY = mTmpAddItemCellCoordinates; - // For now, we don't save the coordinate where we dropped the icon because we're not - // supporting spring-loaded mini-screens; however, leaving the ability to directly place - // a widget on the home screen in case we want to add it in the future - int[] touchXY = null; - if (mAddDropPosition != null && mAddDropPosition[0] > -1 && mAddDropPosition[1] > -1) { - touchXY = mAddDropPosition; - } + int[] touchXY = mAddDropPosition; boolean foundCellSpan = false; if (touchXY != null) { // when dragging and dropping, just find the closest free spot |