summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-08-30 19:17:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-08-30 19:17:07 +0000
commitbb28c01cf49c013143b7257c9e0a489b24ec4769 (patch)
tree70e4c7fc28491470f7e21a2ca9cb3c8cafd7acfc /src/com/android/launcher3/DeviceProfile.java
parent472110e7732777552fa1412b7c9e7b3c41a633a2 (diff)
parenta11380d37081c8232eb78bf29e704a38df3237f2 (diff)
downloadandroid_packages_apps_Trebuchet-bb28c01cf49c013143b7257c9e0a489b24ec4769.tar.gz
android_packages_apps_Trebuchet-bb28c01cf49c013143b7257c9e0a489b24ec4769.tar.bz2
android_packages_apps_Trebuchet-bb28c01cf49c013143b7257c9e0a489b24ec4769.zip
Merge "Fix bug where mw landscape cell size is calculated incorretly." into ub-launcher3-dorval-polish2
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c8e4c4908..dec0a92a9 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -267,6 +267,10 @@ public class DeviceProfile {
}
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.