Merge changes from topic "am-f8cfbb03-ab08-49c2-b587-0dcf40840504" into ub-launcher3-master
* changes:
[automerger] Fix bug where dragging app from Search breaks Folder preview. am: 4f59381bc4
Fix bug where dragging app from Search breaks Folder preview.
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c8e4c49..dec0a92 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -267,6 +267,10 @@
}
DeviceProfile getMultiWindowProfile(Context context, Point mwSize) {
+ // We take the minimum sizes of this profile and it's multi-window variant to ensure that
+ // the system decor is always excluded.
+ mwSize.set(Math.min(availableWidthPx, mwSize.x), Math.min(availableHeightPx, mwSize.y));
+
// In multi-window mode, we can have widthPx = availableWidthPx
// and heightPx = availableHeightPx because Launcher uses the InvariantDeviceProfiles'
// widthPx and heightPx values where it's needed.