Skip to content

Commit

Permalink
Delay workspace loading after a failed shortcut drag by half a second
Browse files Browse the repository at this point in the history
This fixes a race condition causing the state manager to get stuck
  • Loading branch information
amirzaidi committed Jul 14, 2018
1 parent 483c51c commit 849089d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/com/android/launcher3/popup/PopupContainerWithArrow.java
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,13 @@ public void onDropCompleted(View target, DropTarget.DragObject d, boolean isFlin
boolean success) {
if (!success) {
d.dragView.remove();
mLauncher.showWorkspace(true);
mLauncher.getDropTargetBar().onDragEnd();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mLauncher.showWorkspace(true);
}
}, 500);
}
}

Expand Down

0 comments on commit 849089d

Please sign in to comment.