Fix small positioning bug with DWB banner in landscape

The DWB banner is now positioned correctly when the task thumbnail is set as a secondary split view.

Fixes: 220637396
Test: Manual testing on local Pixel 6
Change-Id: I3bcb0eb09d2a607b2891bc9f63f3a0b03668f48e
This commit is contained in:
Jeremy Sim
2022-02-23 18:35:47 -08:00
parent 0a7af9869e
commit 87fad7b984
@@ -352,8 +352,14 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
// Set translations
if (deviceProfile.isLandscape) {
if (desiredTaskId == splitBounds.rightBottomTaskId) {
translationX = ((taskViewWidth * splitBounds.leftTaskPercent)
+ (taskViewWidth * splitBounds.dividerWidthPercent));
float leftTopTaskPercent = splitBounds.appsStackedVertically
? splitBounds.topTaskPercent
: splitBounds.leftTaskPercent;
float dividerThicknessPercent = splitBounds.appsStackedVertically
? splitBounds.dividerHeightPercent
: splitBounds.dividerWidthPercent;
translationX = ((taskViewWidth * leftTopTaskPercent)
+ (taskViewWidth * dividerThicknessPercent));
}
} else {
if (desiredTaskId == splitBounds.leftTopTaskId) {