Fix wrong touch region of split sreen

To compatable with Ia36d7529 which introduced a single-top root task for
multi-window split, updates space-to fill bounds of letter box to the
task level.

Fix: 227563144
Test: Test: atest WmTests:SizeCompatTests
Test: verify touch region with dumpsys input in multi-window split
Change-Id: I64375f66ce06e47c6c5421d2cd30c1d63f5a47f8
This commit is contained in:
Jerry Chang
2022-04-06 07:21:13 +00:00
parent 953115987f
commit 43d5948314

View File

@@ -175,7 +175,7 @@ final class LetterboxUiController {
final Rect spaceToFill = transformedBounds != null
? transformedBounds
: mActivityRecord.inMultiWindowMode()
? mActivityRecord.getRootTask().getBounds()
? mActivityRecord.getTask().getBounds()
: mActivityRecord.getRootTask().getParent().getBounds();
mLetterbox.layout(spaceToFill, w.getFrame(), mTmpPoint);
} else if (mLetterbox != null) {