Cleanup pattern for removing the extra empty screen after drag operations

-> Fixes a couple bugs: issue 12179908, issue 12372657, issue 13287732

Change-Id: I24b5abe8e432ea331eeb77407120a8cec28f6376
This commit is contained in:
Adam Cohen
2014-05-08 17:27:56 -07:00
parent 1317e2dd4a
commit 689ff16ea2
4 changed files with 37 additions and 49 deletions
@@ -808,13 +808,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
!(target instanceof DeleteDropTarget) && !(target instanceof Folder))) {
// Exit spring loaded mode if we have not successfully dropped or have not handled the
// drop in Workspace
mLauncher.getWorkspace().removeExtraEmptyScreen(true, new Runnable() {
@Override
public void run() {
mLauncher.exitSpringLoadedDragMode();
mLauncher.unlockScreenOrientation(false);
}
});
mLauncher.exitSpringLoadedDragMode();
mLauncher.unlockScreenOrientation(false);
} else {
mLauncher.unlockScreenOrientation(false);
}