À partir du 27 mars 2025, nous vous recommandons d'utiliser android-latest-release au lieu de aosp-main pour créer et contribuer à AOSP. Pour en savoir plus, consultez la section Modifications apportées à AOSP.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
L'introduction des transitions de shell a consolidé et codifié la méthode d'exécution des animations dans le système, ce qui permet de récupérer des informations centralisées sur les animations prévues pour l'exécution.
La trace de transition inclut des données sur chaque transition qui se produit dans le shell WindowManager (WM), provenant à la fois du serveur système et du côté du shell. Cette trace est activée en permanence dans Droidfood et intégrée automatiquement aux rapports de bugs.
Pour en savoir plus sur la collecte de traces, consultez la section Transitions de shell.
L'outil de visualisation des transitions de Winscope affiche ces informations pour les traces de transition contenant à la fois des informations côté serveur et côté client. L'aperçu se compose d'une vue de journal de table contenant des informations générales sur la transition à gauche et une vue détaillée de chaque transition à droite:
Figure 1 : Analyse de la trace de transition de shell.
Tableau
La vue Tableau contient les éléments suivants:
Id:ID de transition généré uniquement à des fins de débogage.
Heure d'envoi:code temporel de la transition envoyée du serveur au shell pour être gérée.
Heure de distribution:code temporel de la distribution de la transition au gestionnaire pour lancer la lecture.
Durée:durée de la transition entre le début de la lecture et la fin.
État:si la transition a été :
PLAYED : joué.
ABORTED: Arrêté avant la lecture. Une transition peut être interrompue du côté du shell ou de la fenêtre manager.
MERGED (FUSIONNÉ) : fusionné par le gestionnaire de transition avec une autre transition en cours de lecture (le gestionnaire décide de la façon dont il doit gérer cela).
Vue détaillée
En plus des détails de la vue du tableau, la vue détaillée de la transition dans la section TRANSITION SÉLECTIONNÉE contient les éléments suivants:
handler: gestionnaire de transition qui a géré cette animation.
createTimeNs: code temporel de la création de la transition côté serveur WM.
finishTimeNs: code temporel lorsque le côté serveur WM est informé que la transition a terminé son exécution côté shell.
endTransactionId: transaction SurfaceFlinger finale incluse dans cette transition.
startTransactionId: transaction SurfaceFlinger initiale incluse dans cette transition.
Les cibles sont les éléments impliqués dans la transition (généralement des activités ou des tâches). Pour chaque cible, nous enregistrons les éléments suivants:
layerId: calque en cours d'animation (à partir de la hiérarchie SurfaceFlinger).
mode: type d'animation effectuée sur cette couche.
windowId: fenêtre animée (de la hiérarchie WindowManager).
flags: nouvel ensemble d'options appliquées à la couche.
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (UTC)."],[],[],null,["# Shell transitions\n\nThe introduction of shell transitions consolidated and codified the method of\nrunning animations within the system, allowing for the retrieval of centralized\ninformation regarding the animations slated for execution.\n\nThe transition trace includes data on every transition that occurs within the\nWindowManager (WM) shell, originating from both the system server and shell\nsides. This trace is permanently enabled in Droidfood and automatically embedded\nin bug reports.\n| **Note:** The transitions are stored in a ring buffer, which is recorded by different processes. As a result, it's possible that portions (usually the initial segments) of a transition might have been removed from the buffer. For example, when sending a transition creation time followed by a start and finish time, the buffer might contain all three segments, only the start and finish times, or even only the finish time. This limitation is consistent with other Perfetto data segments and, similar to Perfetto, the limitation is handled during rendering rather than during data creation or parsing.\n\nFor more information about trace collection, see\n[Shell transitions](/docs/core/graphics/winscope/capture/adb#capture-adb-transitions).\n\nWinscope's Transitions viewer displays this information for transition\ntraces containing both server and client-side information. The viewer consists\nof a table log view containing the high-level information about the transition\non the left and a detailed view for each transition at the right:\n\n**Figure 1.** Shell transition trace analysis.\n\nTable view\n----------\n\nThe table view contains:\n\n- **Id:** Transition ID generated only for debugging.\n- **Type:** Transition type, as defined in [`Transitions.java`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java)\n- **Send Time:** Timestamp the transition was sent over from server to shell to be handled.\n- **Dispatch Time:** Timestamp when the transition is dispatched to the handler to start playing.\n- **Duration:** Time the transition took from starting to play to finished.\n- **Status:** If the transition was:\n - **PLAYED:**: Played.\n - **ABORTED**: Aborted before playing. A transition can be aborted from from shell or WM side.\n - **MERGED**: Merged by the transition handler into some other already playing transition (the handler decides how to handle this).\n\nDetailed view\n-------------\n\nIn addition to the details on the table view, the detailed transition view\nin the **SELECTED TRANSITION** section contains:\n\n- `handler`: The transition handler that handled this animation.\n- `createTimeNs`: Timestamp the transition was created on the WM server side.\n- `finishTimeNs`: Timestamp when the WM server side is notified that the transition has finished running on the shell side.\n- `endTransactionId`: Final SurfaceFlinger transaction included in this transition.\n- `startTransactionId`: Initial SurfaceFlinger transaction included in this transition.\n- `targets`: List of transition participants.\n- `type`: Transition type, as defined in [`Transitions.java`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java)\n\n### Targets\n\nTargets are the elements involved in the transition (normally activities or\ntasks). For each target we record:\n\n- `layerId`: Layer that is being animated (from SurfaceFlinger hierarchy).\n- `mode`: Type of animation performed on this layer.\n- `windowId`: Window that is being animated (from WindowManager hierarchy).\n- `flags`: New set of flags being applied to the layer."]]