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

Commit c6761560 authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Don't move bubble to full screen from launcher" into main

parents 18c20b49 2d731e06
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -73,7 +73,11 @@ class DropTargetManager(
        val newDragZone = state.getMatchingDragZone(x = x, y = y)
        state.currentDragZone = newDragZone
        if (oldDragZone != newDragZone) {
            dragZoneChangedListener.onDragZoneChanged(from = oldDragZone, to = newDragZone)
            dragZoneChangedListener.onDragZoneChanged(
                draggedObject = state.draggedObject,
                from = oldDragZone,
                to = newDragZone
            )
            updateDropTarget()
        }
    }
@@ -136,7 +140,7 @@ class DropTargetManager(
    /** Stores the current drag state. */
    private inner class DragState(
        private val dragZones: List<DragZone>,
        draggedObject: DraggedObject
        val draggedObject: DraggedObject
    ) {
        val initialDragZone =
            if (draggedObject.initialLocation.isOnLeft(isLayoutRtl)) {
@@ -157,7 +161,7 @@ class DropTargetManager(
        fun onInitialDragZoneSet(dragZone: DragZone)

        /** Called when the object was dragged to a different drag zone. */
        fun onDragZoneChanged(from: DragZone, to: DragZone)
        fun onDragZoneChanged(draggedObject: DraggedObject, from: DragZone, to: DragZone)

        /** Called when the drag has ended with the zone it ended in. */
        fun onDragEnded(zone: DragZone)
+1 −6
Original line number Diff line number Diff line
@@ -2644,12 +2644,7 @@ public class BubbleController implements ConfigurationChangeListener,
    }

    private void moveBubbleToFullscreen(String key) {
        Bubble b = mBubbleData.getBubbleInStackWithKey(key);
        if (b == null) {
            Log.w(TAG, "can't find bubble with key " + key + " to move to fullscreen");
            return;
        }
        b.getTaskView().moveToFullscreen();
        // TODO b/388858013: convert the bubble to full screen
    }

    private boolean isDeviceLocked() {
+3 −2
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import com.android.wm.shell.shared.bubbles.DeviceConfig;
import com.android.wm.shell.shared.bubbles.DismissView;
import com.android.wm.shell.shared.bubbles.DragZone;
import com.android.wm.shell.shared.bubbles.DragZoneFactory;
import com.android.wm.shell.shared.bubbles.DraggedObject;
import com.android.wm.shell.shared.bubbles.DropTargetManager;

import kotlin.Unit;
@@ -168,8 +169,8 @@ public class BubbleBarLayerView extends FrameLayout
                        }

                        @Override
                        public void onDragZoneChanged(@NonNull DragZone from,
                                @NonNull DragZone to) {
                        public void onDragZoneChanged(@NonNull DraggedObject draggedObject,
                                @NonNull DragZone from, @NonNull DragZone to) {
                            final boolean isBubbleLeft = to instanceof DragZone.Bubble.Left;
                            final boolean isBubbleRight = to instanceof DragZone.Bubble.Right;
                            if ((isBubbleLeft || isBubbleRight)
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ class DropTargetManagerTest {
            initialDragZone = dragZone
        }

        override fun onDragZoneChanged(from: DragZone, to: DragZone) {
        override fun onDragZoneChanged(draggedObject: DraggedObject, from: DragZone, to: DragZone) {
            fromDragZone = from
            toDragZone = to
        }