Fix some issues with shortcut containers opened inside folders.

- Dragging a shortcut from a container inside a folder was buggy
  because the folder assumes that all drags are removing an item
  (so it marks the cell as unoccupied, etc.). So we just close
  the folder when dragging a shortcut.
- When the shortcuts container opened outside of a folder, touches
  on it were incercepted by DragLayer to close the folder. So we
  move the container intercept check first, and return false if the
  touch is over the container so it can handle the touch.

Change-Id: I8c5814513e99910b2930e05d9a62dfe0a0a60f3e
This commit is contained in:
Tony Wickham
2016-06-30 12:07:33 -07:00
parent 5215b545b9
commit 2f2104ccdf
2 changed files with 24 additions and 19 deletions
@@ -359,6 +359,8 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnClic
mLauncher.getDragLayer().setController(mLauncher.getDragController());
mLauncher.getWorkspace().beginDragShared(v, mIconLastTouchPos, this, false);
((DragLayer) getParent()).removeView(this);
// TODO: support dragging from within folder without having to close it
mLauncher.closeFolder();
return false;
}