Fix a couple of drag and drop issues from transient taskbar

- Don't stash until drag ends, but immediately stash at that point
  (regardless of success or failure, though failure will animate to the
  original icon before stashing)
- Send transient taskbar's bounds to WM Shell via intent extra such that
  they ignore drag events in that region

Test: manual in persistent and transient taskbar
Bug: 269814838
Fixes: 268526633
Fixes: 259645384
Change-Id: I5ded3998046f259ed6e79cb4ed765ad7b0c72e45
This commit is contained in:
Tony Wickham
2023-02-21 19:19:23 +00:00
parent 73a2334f7f
commit 16cfed3d1f
3 changed files with 33 additions and 17 deletions

View File

@@ -20,6 +20,7 @@ import static android.view.KeyEvent.KEYCODE_BACK;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -183,6 +184,11 @@ public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> {
invalidate();
}
/** Returns the bounds in DragLayer coordinates of where the transient background was drawn. */
protected RectF getLastDrawnTransientRect() {
return mBackgroundRenderer.getLastDrawnTransientRect();
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
TestLogging.recordMotionEvent(TestProtocol.SEQUENCE_MAIN, "Touch event", ev);