From 5a4836b64f3d342fd6d801cebf9a272204bf4b68 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Wed, 8 May 2024 14:24:01 -0700 Subject: [PATCH] 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 --- .../com/android/launcher3/taskbar/TaskbarActivityContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index b24be541a9..6538f77139 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -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) )); }