Shell transitions

The introduction of shell transitions consolidated and codified the method of running animations within the system, allowing for the retrieval of centralized information regarding the animations slated for execution.

The transition trace includes data on every transition that occurs within the WindowManager (WM) shell, originating from both the system server and shell sides. This trace is permanently enabled in Droidfood and automatically embedded in bug reports.

For more information about trace collection, see Shell transitions.

Winscope's Transitions viewer displays this information for transition traces containing both server and client-side information. The viewer consists of a table log view containing the high-level information about the transition on the left and a detailed view for each transition at the right:

Shell transition trace analysis

Figure 1. Shell transition trace analysis.

Table view

The table view contains:

  • Id: Transition ID generated only for debugging.
  • Type: Transition type, as defined in Transitions.java
  • Send Time: Timestamp the transition was sent over from server to shell to be handled.
  • Dispatch Time: Timestamp when the transition is dispatched to the handler to start playing.
  • Duration: Time the transition took from starting to play to finished.
  • Status: If the transition was:
    • PLAYED:: Played.
    • ABORTED: Aborted before playing. A transition can be aborted from from shell or WM side.
    • MERGED: Merged by the transition handler into some other already playing transition (the handler decides how to handle this).

Detailed view

In addition to the details on the table view, the detailed transition view in the SELECTED TRANSITION section contains:

  • handler: The transition handler that handled this animation.
  • createTimeNs: Timestamp the transition was created on the WM server side.
  • finishTimeNs: Timestamp when the WM server side is notified that the transition has finished running on the shell side.
  • endTransactionId: Final SurfaceFlinger transaction included in this transition.
  • startTransactionId: Initial SurfaceFlinger transaction included in this transition.
  • targets: List of transition participants.
  • type: Transition type, as defined in Transitions.java

Targets

Targets are the elements involved in the transition (normally activities or tasks). For each target we record:

  • layerId: Layer that is being animated (from SurfaceFlinger hierarchy).
  • mode: Type of animation performed on this layer.
  • windowId: Window that is being animated (from WindowManager hierarchy).
  • flags: New set of flags being applied to the layer.