Make split screen have enter and exit animation

Remove MULTI_WINDOW mode block on loadAnimation to make transition
animation could show. And add some specific rule for split screen
because it should just like a full screen window but contain two
tasks.

Fix: 221117079
Test: manual
Test: pass existing tests
Change-Id: I6ccf0b5344d2bd11a2cd4eacba4df5cb9164e3e2
This commit is contained in:
Tony Huang
2022-11-16 08:08:45 +00:00
parent 3920ea3dd5
commit adeedd3479
2 changed files with 10 additions and 1 deletions

View File

@@ -2772,6 +2772,13 @@ class Task extends TaskFragment {
@Override
void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
Rect outSurfaceInsets) {
// If this task has its adjacent task, it means they should animate together. Use display
// bounds for them could move same as full screen task.
if (getAdjacentTaskFragment() != null && getAdjacentTaskFragment().asTask() != null) {
super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
return;
}
final WindowState windowState = getTopVisibleAppMainWindow();
if (windowState != null) {
windowState.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);

View File

@@ -18,6 +18,7 @@ package com.android.server.wm;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
@@ -3194,7 +3195,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
if (isOrganized()
// TODO(b/161711458): Clean-up when moved to shell.
&& getWindowingMode() != WINDOWING_MODE_FULLSCREEN
&& getWindowingMode() != WINDOWING_MODE_FREEFORM) {
&& getWindowingMode() != WINDOWING_MODE_FREEFORM
&& getWindowingMode() != WINDOWING_MODE_MULTI_WINDOW) {
return null;
}