Android WMS - Window animation triggering and loading (16)

        Android window animation is a type of Android system animation. When a non-Activity main window or non-wallpaper window is added or removed, the Android window animation process will be triggered. For example, the window animation will be triggered when a Toast pops up or is removed. .

        I roughly divide the execution process of window animation into the following steps:

  • Trigger added window animation
  • Load the corresponding animation resources
  • Create a leash and reparent the window container that performs animation to the leash.
  • Start looping window animation
  • When the animation ends, reparent the window executing the animation to the original parent node of the container.

1. Trigger the added window animation

        In the later stage of performSurfacePlacementNoTrace(), the most important function in WMS, all windows (WindowState) on a screen will be traversed. If the WindowState has a surface, the WindowState.winAnimator.commitFinishDrawingLocked() method will be called.

1、WindowStateAnimator

Source code location:/frameworks/base/services/core/java/com/android/server/wm/WindowStateAnimator.java

boolean commitFi

Guess you like

Origin blog.csdn.net/c19344881x/article/details/134183681