Fix TaskView cropping for transient taskbar

TaskView clipping is not necessary anymore because task in Overview will always be the same aspect ratio as the app when in fullscreen.

Fix: 268211636
Test: manual trigger of Overview (landscape, portrait, split screen)
Change-Id: Ib4faeda6f0cccef3b23fcbacb89c6d2832c0df59
Merged-In: Ib4faeda6f0cccef3b23fcbacb89c6d2832c0df59
This commit is contained in:
Thales Lima
2023-02-23 16:33:18 +00:00
parent b915b989df
commit 3a6193517d
9 changed files with 73 additions and 209 deletions
@@ -582,8 +582,7 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
? splitInfo.dividerHeightPercent
: splitInfo.dividerWidthPercent;
int deviceHeightWithoutTaskbar = dp.availableHeightPx - dp.taskbarSize;
float scale = (float) outRect.height() / deviceHeightWithoutTaskbar;
float scale = (float) outRect.height() / dp.availableHeightPx;
float topTaskHeight = dp.availableHeightPx * topLeftTaskPercent;
float scaledTopTaskHeight = topTaskHeight * scale;
float dividerHeight = dp.availableHeightPx * dividerBarPercent;
@@ -636,8 +635,7 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
}
secondarySnapshot.setTranslationY(spaceAboveSnapshot);
} else {
int deviceHeightWithoutTaskbar = dp.availableHeightPx - dp.taskbarSize;
float scale = (float) totalThumbnailHeight / deviceHeightWithoutTaskbar;
float scale = (float) totalThumbnailHeight / dp.availableHeightPx;
float topTaskHeight = dp.availableHeightPx * taskPercent;
float finalDividerHeight = dividerBar * scale;
float scaledTopTaskHeight = topTaskHeight * scale;