The article only records their own understanding of a little, for their own reference.
This article will detail the role of key member variables and functions in Appwindowanimator.
Appwindowanimator is the activity animation class. Each activity object corresponds to a Appwindowtoken object in the WMS, and Appwindowtoken contains a Appwindowanimator object. In other words, an activity is supposed to have a Appwindowanimator object, which is stored in the appwindowtoken corresponding to the activity. This can be seen in the Appwindowtoken constructor:
Appwindowtoken (Windowmanagerservice _service, Iapplicationtoken _token) { super (_service, _token.asbinder (), WindowManager.LayoutParams.TYPE_APPLICATION, true); Appwindowtoken = this; Apptoken = _token; Minputapplicationhandle = new Inputapplicationhandle (this); Manimator = Service.manimator; Mappanimator = new <span style= "color: #cc0000; Background-color:rgb (255, 255, 255);" >AppWindowAnimator</span> (this); }
1, Mapptoken
New OneAppwindowanimator This (appwindowtoken) as a parameter, stored in the Appwindowanimator.mapptoken, in other words , Mapptoken Save is the animation belongs to which Appwindowtoken, further said that is which activity to belong to.
Public Appwindowanimator (Final Appwindowtoken atoken) { <span style= "color: #ff6666;" >mapptoken </span>= <span style= "color: #ff6666;" >atoken</span>; Mservice = Atoken.service; Manimator = Atoken.manimator; }
2.