Create a type for tracking chains of Actions requested of WM
Introduces a new type ActionChain which, when linked together, represent a sequence of related actions WM performed as part of a Transition. When performing a larger "logical" operation (eg. launching an activity), it is made up of several asynchronous actions (eg. ask current activity to pause; on paused, start new activity and wait for drawn, ask Shell if more work needs to be done, etc.). Because these are async, we need to track these sets of actions independent of actions from another "logical" operation otherwise WM is unable to distinguish them. Today this DOESN'T happen and thus we currently occasionally combine multiple logical operations into one Transition which both confuses Transition clients (shell) and can contribute to latency (unrelated operations waiting for eachother). This type is the primary component used to solve this problem. A new "Action" will started at every IPC entry-point into WM. This will be linked to a prior Action which caused this one to exist. These linked actions form a chain of actions tracking the causes and effects of each step in executing a Transition. This object is then plumbed from the entry-point down (into synchronous logic), so that any resulting changes to WM can be associated with the that action chain. In this CL, only the type was added and then used to wrap the direct transition entry-points. Functionally, nothing changes as the "default" behavior when starting an action chain is equivalent to the current behavior (use collecting transition if available, otherwise use nothing). Bug: 325114242 Test: New class added but no functional changes, so existing tests Flag: com.android.window.flags.transit_tracker_plumbing Change-Id: I7a7e0730437fc1a15e44a55a84fea33aa72f1301
Loading
Please register or sign in to comment