Launch SizeCompat Activities in a Window on Freeform Desktop Mode
Currently, when a display is in freeform mode, an activity that is not resizable launches in fullscreen. However, for large screen devices, it is preferable to launch activities in windows to create the true desktop experience. This CL changes launch configurations and resize actions to make non-resizable activities launch in a window and to prevent resizing of these windows. When the display enters fullscreen mode, the activity keeps its original bounds and launches in a letterbox. To make this all work, ActivityRecord was updated to use the hierarchy instead of trying to recalculate everything independently with a fullscreen assumption. The result is that the ActivityRecord configuration now (mostly) has the actual bounds of the app so that positioning works properly. Please note, the following tests were removed because the functionality they were trying to test has changed. Previously, when a task was nonresizeable, even if the display windowing mode was freeform, it was launched in fullscreen mode. However this CL allows nonresizeable tasks in freeform mode to be launched in windows. These tests were removed since they are redundant with non-resizable (which is handled by packagemanager): - TaskLaunchParamsModifierTests#testForceMaximizesPreDApp - TaskLaunchParamsModifierTests#testForceMaximizesAppWithoutMultipleDensitySupport The following tests were added: - TaskPositioningControllerTests#testHandleTapOutsideNonResizableTask - TaskLaunchParamsModifierTests#testLaunchesAppInWindowOnFreeformDisplay - ActivityRecordTests#testSizeCompatMode_KeepBoundsWhenChangingFromFreeformToFullscreen This also adds a developer option to enable size-compat apps to start in freeform mode. Test: go/wm-smoke Change-Id: I3aa3fcdcd2b1e0b875d61dfaed3d5e85313edc29
Loading
Please register or sign in to comment