Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce025251 authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Fix some issues where bubble bar wouldn't be on right side" into main

parents 3590e925 ed11cf45
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -203,7 +203,11 @@ class BubbleBarExpandedViewDragController(
            draggedObject: MagnetizedObject<*>,
        ) {
            dragListener.onReleased(inDismiss = true)
            if (dropTargetManager != null) {
                dropTargetManager.onDragEnded()
            } else {
                pinController.onDragEnd()
            }
            dismissView.hide()
        }
    }
+11 −3
Original line number Diff line number Diff line
@@ -147,15 +147,23 @@ public class BubbleBarLayerView extends FrameLayout
                                Log.w(TAG, "dropped invalid bubble: " + mExpandedBubble);
                                return;
                            }

                            final boolean isBubbleLeft = zone instanceof DragZone.Bubble.Left;
                            final boolean isBubbleRight = zone instanceof DragZone.Bubble.Right;
                            if (!isBubbleLeft && !isBubbleRight) {
                                // If we didn't finish the "change" animation make sure to animate
                                // it back to the right spot
                                locationChangeListener.onChange(mInitialLocation);
                            }
                            if (zone instanceof DragZone.FullScreen) {
                                ((Bubble) mExpandedBubble).getTaskView().moveToFullscreen();
                                // Make sure location change listener is updated with the initial
                                // location -- even if we "switched sides" during the drag, since
                                // we've ended up in fullscreen, the location shouldn't change.
                                locationChangeListener.onRelease(mInitialLocation);
                            } else if (zone instanceof DragZone.Bubble.Left) {
                            } else if (isBubbleLeft) {
                                locationChangeListener.onRelease(BubbleBarLocation.LEFT);
                            } else if (zone instanceof DragZone.Bubble.Right) {
                            } else if (isBubbleRight) {
                                locationChangeListener.onRelease(BubbleBarLocation.RIGHT);
                            }
                        }
@@ -189,7 +197,7 @@ public class BubbleBarLayerView extends FrameLayout
                        @NonNull
                        @Override
                        public SplitScreenMode getSplitScreenMode() {
                            return SplitScreenMode.NONE;
                            return SplitScreenMode.UNSUPPORTED;
                        }
                    },
                    new DragZoneFactory.DesktopWindowModeChecker() {