Letterbox: make letterbox work with drag resizing
Fixes an issue where letterboxing disabled using the insetFrame for drag resizing, leading to unsightly jank when doing so. Also makes sure that the insetFrame is always cleared when not in multi-window mode, because that could lead to stale frames when leaving a non-fullscreen task left multiwindow mode. Change-Id: I5576fe86ce17f8cd377bc6a55b3d50d7703569a0 Fixes: 76009001 Bug: 64369819 Test: Enable double cutout, enter landscape, enter splitscreen, drag handle, verify no weird layout issues. Test: Open ApiDemos > App > Activity > Max Aspect Ratio > 1:1, enter split screen, open other app, drag handle up a bit, drag handle all the way up. Open Api Demos activity again from recents, verify it has correct size.
This commit is contained in:
@@ -857,10 +857,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
// If the task has temp inset bounds set, we have to make sure all its windows uses
|
||||
// the temp inset frame. Otherwise different display frames get applied to the main
|
||||
// window and the child window, making them misaligned.
|
||||
if (inFullscreenContainer || isLetterboxedAppWindow()) {
|
||||
mInsetFrame.setEmpty();
|
||||
} else if (task != null && isInMultiWindowMode()) {
|
||||
// Otherwise we need to clear the inset frame, to avoid using a stale frame after leaving
|
||||
// multi window mode.
|
||||
if (task != null && isInMultiWindowMode()) {
|
||||
task.getTempInsetBounds(mInsetFrame);
|
||||
} else {
|
||||
mInsetFrame.setEmpty();
|
||||
}
|
||||
|
||||
// Denotes the actual frame used to calculate the insets and to perform the layout. When
|
||||
|
||||
Reference in New Issue
Block a user