Get display size from DisplayController instance

DeviceProfile is not updated after rotation. Which led to drag to
reposition using landscape display size in portrait.

Bug: 330585402
Test: have device in landscape, drag bubbles and the bar itself
  left/right, observe that the drop target is shown when passing half
  the screen
  rotate device to portrait, start dragging again, observe that drop
  target is shown on the other side when passing half the screen
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: I5c0e2e4ab47a669b6e178b45ab132989029f5913
This commit is contained in:
Ats Jenk committed 2024-05-08 15:59:54 -07:00
1 parent f3224cf847
commit 5a4836b64f
1 file changed
+2 -2
@@ -260,9 +260,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
new BubbleDragController(this),
new BubbleDismissController(this, mDragLayer),
new BubbleBarPinController(this, mDragLayer,
() -> getDeviceProfile().getDisplayInfo().currentSize),
() -> DisplayController.INSTANCE.get(this).getInfo().currentSize),
new BubblePinController(this, mDragLayer,
() -> getDeviceProfile().getDisplayInfo().currentSize)
() -> DisplayController.INSTANCE.get(this).getInfo().currentSize)
));
}