Merge "Round split layout values instead of using int cast" into tm-qpr-dev am: 803f88b89e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20142330

Change-Id: I28f0ab86458b730aedef3a54988e88d8d30407e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-10-10 17:55:25 +00:00
committed by Automerger Merge Worker
3 changed files with 9 additions and 9 deletions
@@ -504,9 +504,9 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
DeviceProfile dp, boolean isRtl) {
int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx;
int totalThumbnailHeight = parentHeight - spaceAboveSnapshot;
int dividerBar = splitBoundsConfig.appsStackedVertically
? (int) (splitBoundsConfig.dividerHeightPercent * parentHeight)
: (int) (splitBoundsConfig.dividerWidthPercent * parentWidth);
int dividerBar = Math.round(totalThumbnailHeight * (splitBoundsConfig.appsStackedVertically
? splitBoundsConfig.dividerHeightPercent
: splitBoundsConfig.dividerWidthPercent));
int primarySnapshotHeight;
int primarySnapshotWidth;
int secondarySnapshotHeight;
@@ -630,9 +630,9 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
DeviceProfile dp, boolean isRtl) {
int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx;
int totalThumbnailHeight = parentHeight - spaceAboveSnapshot;
int dividerBar = splitBoundsConfig.appsStackedVertically
? (int) (splitBoundsConfig.dividerHeightPercent * parentHeight)
: (int) (splitBoundsConfig.dividerWidthPercent * parentWidth);
int dividerBar = Math.round(splitBoundsConfig.appsStackedVertically
? splitBoundsConfig.dividerHeightPercent * totalThumbnailHeight
: splitBoundsConfig.dividerWidthPercent * totalThumbnailHeight);
int primarySnapshotHeight;
int primarySnapshotWidth;
int secondarySnapshotHeight;
@@ -283,9 +283,9 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
// (portrait bottom) and secondary is on the right (portrait top)
int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx;
int totalThumbnailHeight = parentHeight - spaceAboveSnapshot;
int dividerBar = splitBoundsConfig.appsStackedVertically
? (int) (splitBoundsConfig.dividerHeightPercent * parentHeight)
: (int) (splitBoundsConfig.dividerWidthPercent * parentWidth);
int dividerBar = Math.round(totalThumbnailHeight * (splitBoundsConfig.appsStackedVertically
? splitBoundsConfig.dividerHeightPercent
: splitBoundsConfig.dividerWidthPercent));
int primarySnapshotHeight;
int primarySnapshotWidth;
int secondarySnapshotHeight;