Reduce computing unused ChangeInfo in Transition
Originally, if the window container can not be animated or controlled by remote, the intermediate ChangeInfo are just ignored during calculating TransitionInfo. So they can be skipped earlier at creation. For example when launching an activity in a task, there may be 10 ChangeInfo: 2 activities + Task + TaskDisplayArea + Display + 5 DisplayArea. With this change, the 5 DisplayArea will be ignored (if their organizers are not active): Root, WindowedMagnification, HideDisplayCutout, OneHanded, and FullscreenMagnification. Then in collect(), it no longer needs to traverse 30+ DisplayArea for creating the intermediate parent ChangeInfo. That would also speed up calculateTargets and calculateTransitionInfo because less ChangeInfo to look up. Also simplify getTopVisibleWallpaper (called in collect()) a bit by eliminating unnecessary overhead of forAllWindows. Bug: 260059642 Test: atest TransitionTests Change-Id: I15f3ccd5af2fe70f71c88d6d8676661c312aef2e
Loading
Please register or sign in to comment