Loading libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DropTargetManager.kt +7 −3 Original line number Diff line number Diff line Loading @@ -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() } } Loading Loading @@ -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)) { Loading @@ -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) Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +1 −6 Original line number Diff line number Diff line Loading @@ -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() { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java +3 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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) Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/bubbles/DropTargetManagerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -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 } Loading Loading
libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DropTargetManager.kt +7 −3 Original line number Diff line number Diff line Loading @@ -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() } } Loading Loading @@ -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)) { Loading @@ -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) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +1 −6 Original line number Diff line number Diff line Loading @@ -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() { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java +3 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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) Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/bubbles/DropTargetManagerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -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 } Loading