Include bubbles in the dragged items of taskbar UI controller
Flag: com.android.wm.shell.enable_bubble_bar Test: manual - test dragging bubbles with the other CL Bug: 345488529 Change-Id: I95085fd18f2710cd36a2d47640641da047aa48c7
This commit is contained in:
@@ -77,6 +77,8 @@ public class BubbleDragController {
|
||||
private BubbleBarPinController mBubbleBarPinController;
|
||||
private BubblePinController mBubblePinController;
|
||||
|
||||
private boolean mIsDragging;
|
||||
|
||||
public BubbleDragController(TaskbarActivityContext activity) {
|
||||
mActivity = activity;
|
||||
}
|
||||
@@ -240,6 +242,16 @@ public class BubbleDragController {
|
||||
});
|
||||
}
|
||||
|
||||
/** Whether there is an item being dragged or not. */
|
||||
public boolean isDragging() {
|
||||
return mIsDragging;
|
||||
}
|
||||
|
||||
/** Sets whether something is being dragged or not. */
|
||||
public void setIsDragging(boolean isDragging) {
|
||||
mIsDragging = isDragging;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bubble touch listener for handling a single bubble view or bubble bar view while dragging.
|
||||
* The dragging starts after "shorter" long click (the long click duration might change):
|
||||
@@ -436,6 +448,7 @@ public class BubbleDragController {
|
||||
|
||||
private void startDragging(@NonNull View view) {
|
||||
onDragStart();
|
||||
BubbleDragController.this.setIsDragging(true);
|
||||
mActivity.setTaskbarWindowFullscreen(true);
|
||||
mAnimator = new BubbleDragAnimator(view);
|
||||
mAnimator.animateFocused();
|
||||
@@ -452,6 +465,7 @@ public class BubbleDragController {
|
||||
}
|
||||
|
||||
private void stopDragging(@NonNull View view, @NonNull MotionEvent event) {
|
||||
BubbleDragController.this.setIsDragging(false);
|
||||
Runnable onComplete = () -> {
|
||||
mActivity.setTaskbarWindowFullscreen(false);
|
||||
cleanUp(view);
|
||||
|
||||
Reference in New Issue
Block a user