diff options
author | Patrick Dubroy <dubroy@google.com> | 2011-03-03 19:54:56 -0800 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2011-03-03 20:10:01 -0800 |
commit | 758a9239f045ff4eb85c421a2f67a720b5b3c621 (patch) | |
tree | ecf2081ad55e36293e32630c6aeb5ae7251fbd35 /src/com/android/launcher2/DragLayer.java | |
parent | c50d9573b31fd5ad9f463370adfeafd15429adc1 (diff) | |
download | packages_apps_trebuchet-758a9239f045ff4eb85c421a2f67a720b5b3c621.zip packages_apps_trebuchet-758a9239f045ff4eb85c421a2f67a720b5b3c621.tar.gz packages_apps_trebuchet-758a9239f045ff4eb85c421a2f67a720b5b3c621.tar.bz2 |
Fix 3511340: Exit widget resize mode when home or back clicked
Also add an optimization to drastically reduce the number of
posted events when a widget is currently being resized.
Change-Id: I8839d4bba564028a67fb0355d35b7dd52465b199
Diffstat (limited to 'src/com/android/launcher2/DragLayer.java')
-rw-r--r-- | src/com/android/launcher2/DragLayer.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java index 37bbb05..2e72f62 100644 --- a/src/com/android/launcher2/DragLayer.java +++ b/src/com/android/launcher2/DragLayer.java @@ -63,12 +63,13 @@ public class DragLayer extends FrameLayout { // dismiss any visible resize frames. final Workspace w = (Workspace) findViewById(R.id.workspace); final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage()); + final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout(); - if (currentPage.getChildrenLayout().hasResizeFrames()) { + if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) { post(new Runnable() { public void run() { - if (!currentPage.getChildrenLayout().isWidgetBeingResized()) { - currentPage.getChildrenLayout().clearAllResizeFrames(); + if (!childrenLayout.isWidgetBeingResized()) { + childrenLayout.clearAllResizeFrames(); } } }); |