Merge "Override getAnimationFrames in Task and TaskStack."

This commit is contained in:
Issei Suzuki
2019-11-01 13:40:44 +00:00
committed by Android (Google) Code Review
2 changed files with 22 additions and 0 deletions

View File

@@ -471,6 +471,17 @@ class Task extends WindowContainer<ActivityRecord> implements ConfigurationConta
}
}
@Override
void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
Rect outSurfaceInsets) {
final WindowState windowState = getTopVisibleAppMainWindow();
if (windowState != null) {
windowState.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
} else {
super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
}
}
/**
* Calculate the maximum visible area of this task. If the task has only one app,
* the result will be visible frame of that app. If the task has more than one apps,

View File

@@ -1870,6 +1870,17 @@ public class TaskStack extends WindowContainer<Task> implements
return mAnimatingActivityRegistry;
}
@Override
void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
Rect outSurfaceInsets) {
final Task task = getTopChild();
if (task != null) {
task.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
} else {
super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
}
}
@Override
RemoteAnimationTarget createRemoteAnimationTarget(
RemoteAnimationController.RemoteAnimationRecord record) {