Respect minimum dimensions for embedded Activities
Before this CL, minimum dimensions of Activity wasn't respected, that said, an Activity could be embedded in a TaskFragment of which bounds are smaller its minimum dimensions. This CL add the minimum dimensions on several places: WM core: 1. Verify minimum dimension requirement before adding an Activity to a TaskFragment. It'll be early return if the requirement is not satisfied. 2. Propagate the minimum dimensions to the client side through TaskFragmentInfo to notify the requirement. 3. If TaskFragmentOrganizer tries to shrink a TaskFragment to the bounds that smaller than minimum dimensions of its children Activity, switch to match the parent bounds. AndroidX Window extensions: 1. Early return if TaskFragment is resized to the bounds that smaller than minimum dimensions which dispatched from the server side. 2. When organizer tries to show Activities side-by-side, verify if minimum dimensions requirement of the primary Activiy. If the requirement is not satisfied, show Activities in fullscreen instead. TODO: Add an API to check if an Activity intent is allowed to embed in a TaskFragment. Bug: 232871351 Test: atest TaskFragmentOrganizerControllerTest Test: atest TaskFragmentOrganizerTest TaskFragmentOrganizerPolicyTest Test: atest SplitActivityLifecycleTest Test: atest CtsWindowManagerJetpackTestCases Test: atest WmJetpackUnitTests Merged-In: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9 Change-Id: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
Loading
Please register or sign in to comment