aosp15的窗口过渡动画ShellTransition相关的核心类整体介绍(1)

【Android14 ShellTransitions】(二)创建Transition 还是我们之前说的,我们以在Launcher界面点击App图标启动某个App为例,来分析Transition的一般流程。在这一节中我们只分析和创建Transition相关的部分,即TransitionController.createAndStartCollecting的内容,余下的部分在其它章节中再进行分析。这一节的内容还是比较简单的,在WMCore侧,根据动画的类型创建相应的Transition对象,Transition的初始状态为STATE_PENDING。 阅读详情
AI摘要

本文围绕安卓的ShellTransition展开,介绍其概念,指出它是App跳转过渡,与AppTransition有进程上的差异。阐述使用它的原因,包括为wms解耦减负、提高系统稳定性。还讲解了高版本开放方法,以及WMCore和WMShell概念,对相关类进行深入剖析。

什么是ShellTransition

这里ShellTransition其实可以变成两部分,一个Shell和Transition,这里Shell大家可以简单认为代表是WMShell,而Transition就是普通的过渡的意思,这里Transition和以前的AppTransition中的Transition其实没有任何差别哈,都可以简单认为其实是一种App跳转的一种过渡,只不过差别如下:

AppTransition 整体都是在system_server进程自己独立完成,但是ShellTransition一般的会涉及system_server进程和systemui进程

为什么要用ShellTransition

针对这个为啥google原来的APPTransition用的好好的要全部升级到ShellTransition呢?这个问题的官方是没有看到相关的前后对比升级的原因,也只有确实使用认识了APPTransition和ShellTransition后自己可以有一些自己的见解,下面列出两个个人见解:

1、为wms核心业务进行解耦减负,ShellTransition本质也是为了减轻wms的业务,让wms只专注窗口相关的策略管理,这一点和分屏,自由窗口等慢慢剥离到WMShell一样

2、ShellTransition自带了同步引擎,同步刷新即让多个参与动画的窗口显示隐藏等在同一个Transaction事务中,这样可以减少一些因为时序关系导致的偶现显示疑难问题比如闪黑,闪屏等,提高系统稳定性。

高版本开放ShellTransition方法

这里看看aosp15是如何开放ShellTransition的
在老版本aosp13实际上使用是AppTransition,但是aosp15版本后发现
AppTransition的prepare方法会直接return

 boolean prepareAppTransition(@TransitionType int transit, @TransitionFlags int flags) {
        if (mDisplayContent.mTransitionController.isShellTransitionsEnabled()) {
            return false;
        }
}

这里看看mDisplayContent.mTransitionController.isShellTransitionsEnabled()方法
frameworks/base/services/core/java/com/android/server/wm/TransitionController.java

    boolean isShellTransitionsEnabled() {
        return !mTransitionPlayers.isEmpty();
    }

这里就是判断mTransitionPlayers有没有内容,那么这里的mTransitionPlayers又是来自哪里呢?
是在registerTransitionPlayer方法中

frameworks/base/services/core/java/com/android/server/wm/TransitionController.java

   void registerTransitionPlayer(@Nullable ITransitionPlayer player,
            @Nullable WindowProcessController playerProc) {
        if (!mTransitionPlayers.isEmpty()) {
            ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS_MIN, "Registering transition "
                    + "player %s over %d other players", player.asBinder(),
                    mTransitionPlayers.size());
            // flush currently running transitions so that the new player doesn't get
            // intermediate state
            flushRunningTransitions();
        } else {
            ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS_MIN, "Registering transition "
                    + "player %s ", player.asBinder());
        }
        mTransitionPlayers.add(new TransitionPlayerRecord(player, playerProc));
    }

frameworks/base/services/core/java/com/android/server/wm/WindowOrganizerController.java

@Override
public void registerTransitionPlayer(ITransitionPlayer player) {
    enforceTaskPermission("registerTransitionPlayer()");
    final int callerPid = Binder.getCallingPid();
    final int callerUid = Binder.getCallingUid();
    final long ident = Binder.clearCallingIdentity();
    try {
        synchronized (mGlobalLock) {
            final WindowProcessController wpc =
                    mService.getProcessController(callerPid, callerUid);
            mTransitionController.registerTransitionPlayer(player, wpc);
        }
    } finally {
        Binder.restoreCallingIdentity(ident);
    }
}

这里WindowOrganizerController的registerTransitionPlayer方法是systemui端负责调用的
frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java


   private void onInit() {
 //省略
        if (Transitions.ENABLE_SHELL_TRANSITIONS) {//一定要ENABLE_SHELL_TRANSITIONS
            mIsRegistered = true;
            // Register this transition handler with Core
            try {
                mOrganizer.registerTransitionPlayer(mPlayerImpl);//注册
            } catch (RuntimeException e) {
                mIsRegistered = false;
                throw e;
            }
            // Pre-load the instance.
            TransitionMetrics.getInstance();
        }
    }

看看这里的Transitions.ENABLE_SHELL_TRANSITIONS
frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java

/** Set to {@code true} to enable shell transitions. */
public static final boolean ENABLE_SHELL_TRANSITIONS = getShellTransitEnabled();

下面看看getShellTransitEnabled方法

    private static boolean getShellTransitEnabled() {
        try {
            if (AppGlobals.getPackageManager().hasSystemFeature(
                    PackageManager.FEATURE_AUTOMOTIVE, 0)) {//车载相关feature
                return SystemProperties.getBoolean("persist.wm.debug.shell_transit", true);
            }
        } catch (RemoteException re) {
            Log.w(TAG, "Error getting system features");
        }
        return true;//默认就是返回true
    }

getShellTransitEnabled方法可以看出默认情况下就是返回true,也就是开启ShellTransition

WMCore和WMShell概念

在学习ShellTransition时候首先要了解一下两个经常后续会说道的两个词:WMCore和WMShell
WMCore和WMShell的官方定义解释比较难找到哈,不过我这边看到有如下一段官方解释:

## Motivation

The primary motivation for the WindowManager Shell (WMShell) library is to effectively scale
WindowManager by making it easy™ and safe to create windowing features to fit the needs of
various Android products and form factors.

To achieve this, WindowManager separates the policy of managing windows (WMCore) from the
presentation of surfaces (WMShell) and provides a minimal interface boundary for the two to
communicate.

这里的官方解释了WMShell出现的动机,本质就是为了减轻原来wms的业务负担,可以更加安全创建一些窗口需求来满足各个产品,这里面就有出现对应的WMCore和WMShell,就可以看出两个名词的意义

WindowManager Shell ----》 简称 WMShell,一般在systemui进程

WindowManager的策略部分,即可以任务WindowManagerService那部分逻辑 —》 简称WMCore,其实就是system_server的wms

了解了WMCore和WMShell两个概念后,接下来就开始对相关的类进行深入的剖析

TransitionController(WMCore端过渡动画收集启动管理者)

先看看官方注释


/**
 * Handles all the aspects of recording (collecting) and synchronizing transitions. This is only
 * concerned with the WM changes. The actual animations are handled by the Player.
 *
 * Currently, only 1 transition can be the primary "collector" at a time. This is because WM changes
 * are still performed in a "global" manner. However, collecting can actually be broken into
 * two phases:
 *    1. Actually making WM changes and recording the participating containers.
 *    2. Waiting for the participating containers to become ready (eg. redrawing content).
 * Because (2) takes most of the time AND doesn't change WM, we can actually have multiple
 * transitions in phase (2) concurrently with one in phase (1). We refer to this arrangement as
 * "parallel" collection even though there is still only ever 1 transition actually able to gain
 * participants.
 *
 * Parallel collection happens when the "primary collector" has finished "setup" (phase 1) and is
 * just waiting. At this point, another transition can start collecting. When this happens, the
 * first transition is moved to a "waiting" list and the new transition becomes the "primary
 * collector". If at any time, the "primary collector" moves to playing before one of the waiting
 * transitions, then the first waiting transition will move back to being the "primary collector".
 * This maintains the "global"-like abstraction that the rest of WM currently expects.
 *
 * When a transition move-to-playing, we check it against all other playing transitions. If it
 * doesn't overlap with them, it can also animate in parallel. In this case it will be assigned a
 * new "track". "tracks" are a way to communicate to the player about which transitions need to be
 * played serially with each-other. So, if we find that a transition overlaps with other transitions
 * in one track, the transition will be assigned to that track. If, however, the transition overlaps
 * with transition in >1 track, we will actually just mark it as SYNC meaning it can't actually
 * play until all prior transition animations finish. This is heavy-handed because it is a fallback
 * situation and supporting something fancier would be unnecessarily complicated.
 */

注释内容比较多,只需要关心以下内容既可以:
负责处理同步过渡动画记录收集各方面,TransitionController只覆盖WM更改部分(简单说就是窗口相关的收集变化等),真正的动画播放还是Player(即WMShell)进行处理的。
目前,同一时间只能有一个transition可以成为主要“收集器”,因为WM变化以全局方式执行。然而,收集一般分为两个阶段:
1、实际进行WM更改并收集相关的参与容器
2、等待参与容器准备就绪(比如重新绘制内容)

其他的就暂时也不进行深入翻译,开始只需要知道上面两个步骤既可以。

Transitions(WMShell端过渡动画播放相关管理)

frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java

/**
 * Plays transition animations. Within this player, each transition has a lifecycle.
 * 1. When a transition is directly started or requested, it is added to "pending" state.
 * 2. Once WMCore applies the transition and notifies, the transition moves to "ready" state.
 * 3. When a transition starts animating, it is moved to the "active" state.
 *
 * Basically: --start--> PENDING --onTransitionReady--> READY --play--> ACTIVE --finish--> |
 *                                                            --merge--> MERGED --^
 *
 * The READY and beyond lifecycle is managed per "track". Within a track, all the animations are
 * serialized as described; however, multiple tracks can play simultaneously. This implies that,
 * within a track, only one transition can be animating ("active") at a time.
 *
 * While a transition is animating in a track, transitions dispatched to the track will be queued
 * in the "ready" state for their turn. At the same time, whenever a transition makes it to the
 * head of the "ready" queue, it will attempt to merge to with the "active" transition. If the
 * merge succeeds, it will be moved to the "active" transition's "merged" list and then the next
 * "ready" transition can attempt to merge. Once the "active" transition animation is finished,
 * the next "ready" transition can play.
 *
 * Track assignments are expected to be provided by WMCore and this generally tries to maintain
 * the same assignments. If, however, WMCore decides that a transition conflicts with >1 active
 * track, it will be marked as SYNC. This means that all currently active tracks must be flushed
 * before the SYNC transition can play.
 */

Transitions类主要就是播放过渡动画。在这个player中,每个transition对象都有一个自己生命周期。(transition就是过渡动画,这里不再翻译)
1、当一个transition直接启动或请求是,就会将他添加到“pending”状态
2、一旦WMCore应用了transition和通知出来,transition就会被移入到“ready”状态
3、当transition开始动画时,他就会被移入到“active”状态

上面都有提到状态,上面注释也有专门的状态链路,上状态如下情况:

--start--> PENDING --onTransitionReady--> READY --play--> ACTIVE --finish--> |
                                                --merge--> MERGED --^

注意这里看的时候要注意,小写字母这种代表是一个动作,比如start代表开始方法属于一个动作,动作会导致状态变成PENDING这种,这块后续再结合代码具体介绍方法和状态哈。

WMCore和WMShell代表过渡动画实体类

WMCore端的代表类:Transition
frameworks/base/services/core/java/com/android/server/wm/Transition.java

**
 * Represents a logical transition. This keeps track of all the changes associated with a logical
 * WM state -> state transition.
 * @see TransitionController
 *
 * In addition to tracking individual container changes, this also tracks ordering-changes (just
 * on-top for now). However, since order is a "global" property, the mechanics of order-change
 * detection/reporting is non-trivial when transitions are collecting in parallel. See
 * {@link #collectOrderChanges} for more details.
 */
class Transition implements BLASTSyncEngine.TransactionReadyListener {
    private static final String TAG = "Transition";
    private static final String TRACE_NAME_PLAY_TRANSITION = "playing";

    /** The default package for resources */
    private static final String DEFAULT_PACKAGE = "android";

    /** The transition has been created but isn't collecting yet. */
    private static final int STATE_PENDING = -1;

    /** The transition has been created and is collecting, but hasn't formally started. */
    private static final int STATE_COLLECTING = 0;

    /**
     * The transition has formally started. It is still collecting but will stop once all
     * participants are ready to animate (finished drawing).
     */
    private static final int STATE_STARTED = 1;

    /**
     * This transition is currently playing its animation and can no longer collect or be changed.
     */
    private static final int STATE_PLAYING = 2;

    /**
     * This transition is aborting or has aborted. No animation will play nor will anything get
     * sent to the player.
     */
    private static final int STATE_ABORT = 3;

    /**
     * This transition has finished playing successfully.
     */
    private static final int STATE_FINISHED = 4;

Transition是过渡动画在WMCore的代表类,它主要保持跟踪这WM状态到过渡动画状态,即最后状态都会体现在这个Transition类中的几个状态,默认状态是STATE_PENDING。

WMShell端的过渡动画实体类:ActiveTransition类位于Transitions.java下面
frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java

private static final class ActiveTransition {
        final IBinder mToken;

        TransitionHandler mHandler;
        boolean mAborted;
        TransitionInfo mInfo;
        SurfaceControl.Transaction mStartT;
        SurfaceControl.Transaction mFinishT;

        /** Ordered list of transitions which have been merged into this one. */
        private ArrayList<ActiveTransition> mMerged;

        ActiveTransition(IBinder token) {
            mToken = token;
        }
//省略

这里没看到对ActiveTransition进行注释说,这里因为很多核心逻辑是在ActiveTransition成员变量TransitionInfo中,这里大家先简单知道ActiveTransition是WMShell端的过渡动画对象与WMCore端的Transition对象靠mToken进行对应。

WMCore和WMShell端主要核心类关系及作用总结图:

核心类即职责图

文章来源参考:
https://mp.weixin.qq.com/s/ZBKZ6YOzZrRCltgR0FSqxA

更多framework实战干货,请关注下面“千里马学框架”

Android 14 窗口动画揭秘:从 WMCore 到 WMShell,一次启动 Transition 的完整旅程 本文深入解析Android 14窗口动画系统,揭示WMCore与WMShell如何协同完成Transition流程。从动画准备到执行,详细介绍了跨进程通信、状态同步及处理器选择等核心机制,帮助开发者理解Android窗口动画的底层实现原理与调试技巧。 阅读详情

相关推荐

android13 WindowManager-Shell.jar

android13 WindowManager-Shell.jar

安卓Transition学习(一)

Android transition学习总结最近开始学习安卓5.0新特性,今天学习到transition,不知道transition,请自我科普,怕因时间太久,故把学习心得整理如下: 渐进显示效果TransitionManager.beginDelayedTransition(root) root:是场景的父控件简单的一句代码就能使此root控件下的元素变化带有默认的fade的效果。如果想指定其他

axbbest的博客 1161

最新Mamba环境配置教程:从CUDA到causal-conv1d的完整安装流程

本文提供最新Mamba环境配置教程,涵盖从CUDA到causal-conv1d的完整安装流程。针对深度学习领域的长序列处理需求,详细指导如何正确配置CUDA工具链、安装PyTorch及关键依赖causal-conv1d,解决常见报错问题,并验证mamba-ssm集成效果。

bush的博客 420

【Android14 ShellTransitions】(一)开篇

说来惭愧,AndroidU都已经开发这么久了,但是我还没有整理过ShellTransition相关的知识。我本来希望能够系统的写一篇关于ShellTransition的笔记出来,但是发现一来这是一个比较庞大的模块,二来我个人能力有限,对ShellTransition目前掌握的并不透彻,只是朦胧上大体有一个认知。

ukynho的博客 6316

从零到一:高通QCS6490边缘AI开发板的Linux生态构建与实战避坑指南

本文详细介绍了在高通QCS6490边缘AI开发板上构建Linux生态系统的完整流程,包括开发环境准备、系统镜像构建与烧录、AI运行时环境配置、模型部署优化以及性能调试。重点解析了如何利用Hexagon DSP的高达12 TOPS AI算力,并提供了实战中的避坑指南和性能优化技巧,帮助开发者高效实现边缘AI应用从概念验证到产品落地的全过程。

eee77的博客 773

线性分类器(Linear Classifier)

线性分类器 如上图所示,这是二维空间中的一个数据集,如果他正好能够被一条直线分成两类,那么我们称它为线性可分数据集,这条直线就是一个线性分类器。 在三维空间中,如果数据集线性可分,是指能够被一个平面分为两类。 在一维空间中,所有的点都在一条直线上,如果线性可分。可以理解为它们能够被一个点分开。 这里的直线、平面、点被分为决策边界。 一个 m 维空间中的数据集,如果能够被一个超平面一分为二,那么这个数据集就是线性可分的,这个超平面就是决策边界。 例如,这是二维平面上的一条直线, 它可以把平面切分成两

xuechanba的博客 1万+

深入理解WindowManager

WindowManager 我们知道Window是通过WindowManager来管理的,而与WindowManager对应的还有一个WMS(WindowManagerService)那么他们两者到底是怎么工作的呢?接下来我们就来具体分许一下 这篇文章我们重点分析WindowManager的基本知识脉络,而不去看具体的实现细节,我们只关心WindowManager和WindowManagerS...

小黄人的博客 3309

Librepilot _64位window10环境下的搭建及一些坑的解决办法

  刚入IT行业的小菜鸟,在window上折腾了四天的librepilot地面控制站的搭建,想着这么辛苦不能白费了,看网上相关资料少得可怜,唯一一个详细教程还是在32位环境下,一大堆坑,所以把自己的经验写下来,供大家一起参考。 参考的原文是:https://www.cnblogs.com/jasonchan1202/p/7809937.html的博客,但是执行下来才发现这个博客对64位系统极其不...

weixin_41426339的博客 2732

一起学 Android 14:ShellTransition 屏幕旋转过程深度剖析

在aosp14引入了ShellTransition后,系统中很多的动画过程都引入到ShellTransition中,比如点击app启动Activity,分屏等,前面这块内容已经在马哥的。RotationLayer是一个独立的图层,而且层级很高,整个分析流程也可以以这个RotationLayer为线索进行分析整个屏幕旋转新流程。可以看出屏幕在准备旋转前就已经创建好了对应的RotationLayer,这个是一个屏幕的截图Layer。display change) | 由 Shell(SystemUI)的。

learnframework的博客 454

用 ADBC 把动态查询做得又快又稳:从 CL_SQL_STATEMENT 到安全取数的工程化实践

本文介绍了ABAP中ADBC(ABAP Database Connectivity)技术的核心用法与最佳实践。ADBC作为Open SQL的补充,适用于动态查询、数据库特性调用等场景。文章通过示例代码详细演示了使用ADBC执行查询的完整流程:创建SQL语句、执行查询获取结果集、批量装载数据到内表,以及分包读取处理大数据量。特别强调了动态SQL的安全防护措施,包括输入转义和参数绑定等防注入技术。同时对比了ADBC与Open SQL的适用场景,指出ADBC更适合需要动态访问数据库原生功能的场合。文章还分析了代码

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 1782

Aurix TC3xx系列MCU ResourceM模块配置(多核资源分配)

为减轻主核的负载率或者平衡各个核的资源分配,通常需要把一些MCU内部资源分配到从核上,在EB tresos工具中,通过ResourceM模块实现多核资源分配。

m0_38045338的博客 1393

vue transition的理解

最近开发的过程中用到了vue的transition组件,写一下自己的心得体会。 transition的作用 首先我的理解是transition是作为元素切换时的过渡动画,例如在一个div进行v-if,v-show的时候,他的显示与隐藏分别进行怎样的变幻,都可以由transition进行控制。 transition的属性 v-enter:元素显示/插入前的效果,例如:transform:translateX(-200%); v-active-enter:元素显示/插入的过渡时间和函数,例如:tra.

qq_41756580的博客 1万+

YOLO26 旋转框检测 OBB 技术:角度预测与解码优化

YOLO26旋转框检测技术通过CSL角度编码有效解决了OBB检测中的周期性问题。该技术采用5参数表示法(cx,cy,w,h,θ),在检测头中分别处理分类、回归和角度预测。核心创新点包括:1)使用高斯或三角窗口的CSL编码对角度进行平滑表示;2)通过加权平均解码角度,避免边界不连续问题。该方法在遥感、文本检测等需要精确方向信息的场景中表现优异,相比传统HBB框可提升定位精度30%以上,同时保持了YOLO系列的高效特性。

一键难忘的博客 537

ShellTransition学习

这个类我理解相当于把包装一次system_server发起的Transition请求,东里面的内容就可以看出mToken代表一个Transion对象,mHandler用于处理此次请求的对象(也有可能不是第一次赋值的handler处理此次Transition请求,后面会讲到),mInfo具体需要做那些图层的动画(动画的具体内容)。1.今天整理以下Shell部分的内容,即Transitions里面的类和变量之间的关系,下一次整理system的Transition类和变量之间的关系。

626

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Android 16系统源码_分屏模式(二)全屏分屏模式层级树信息

通过对比全屏和分屏模式下的窗口层级树信息,理解分屏模式的实现思路。

AfinalStone的专栏 5526

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

aosp15/14 窗口动画ShellTransition深入实战专题剖析

最新版本安卓aosp15 分支r3总计30课时以上有android相关基础知识,android framework相关基础知识的人群,适合安卓系统工程师,窗口相关工程师要进行提高的,或者企业里面经常要解决一些显示类疑难问题如:闪屏,闪黑,黑屏等人群。课程知识收益1、最新的aosp15代码的ShellTransition相关内容的深入剖析2、深入理解同步刷新等机制及相关的作用3、aosp15版本winscope相关的高级用法,分析显示类问题高级技巧。

liaosongmao1的专栏 259

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

【Android14 ShellTransitions】(四)Transition收集动画参与者

这一节的内容在WMCore中,现在Transition已经走到COLLECTING状态了,并且可以收集动画参与者了。那么Transition是在什么时候去收集动画参与者?回到我们最初的ActivityStarter.startActivityUnchecked:在调用了TransitionController.createAndStartCollecting后,紧接着就是调用了TransitionController.collect。

ukynho的博客 2709

【Android14 ShellTransitions】(七)Transition就绪

ShellTransitions Transition onTransactionReady tryPromote canPromote onTransitionReady

ukynho的博客 2523

WM Shell多动画场景处理

Track是一组连续且按顺序执行的transitions,如果一个transition与所有其他的transition并行(在动画就绪时),那么他将被分配一个新的track。然而,对于真正独立的transitions,他们的动画可以独立的运行。READY 及之后的生命周期按“track”进行管理,在一个track中,所有动画都按描述的方式进行排序,一个track内,一次只能有一个transition处于active状态;如果它不与他们重叠,它可以并行动画,在这种情况下,它将被分配一个新的track。

xiaoyantan的博客 2316

Android 12系统源码_窗口管理(三)WindowManagerService对窗口的管理过程

通过Android12系统源码梳理WindowManagerService对窗口的管理过程

AfinalStone的专栏 2663

设置屏幕大小流程。

屏幕

caolinai7257的博客 1049

ShellTransition源码分析:WMCore收集WindowContainer到finishNow执行

那么到这里WMShell -----------------> WMCore这个过程就完成了,接下来的就是WMCore等待收集的WindowContainer完成绘制finish后,再触发onTransactionReady了.收集的wc有3个是重复的,都是ActivityRecord,所以最后收集到了4个wc,即Transition的mParticipants集合一共有四个元素,一般对应的SyncGroup的mRootMembers也有四个元素。

learnframework的博客 1043

aosp15 shelltransition之桌面点击启动app部分-systemserver部分

上面startActivityUnchecked中主要有3个部分和transition相关步骤这里transitionController.createAndStartCollecting(TRANSIT_OPEN)就是创建出对应的Transition核心重点就是startCollecting方法这里主要看看mSyncEngine.startSyncSet方法总结一下transitionController.createAndStartCollecting干的事情。

learnframework的博客 1528

WMShell (WindowManager Shell)

wmshell

sinat_38816956的博客 1267
上一篇: fallbackhome黑屏闪黑问题修改方案1:开机动画延迟退出时间-framework实战开发
下一篇: 请收藏:如何确认uid对应的包名和进程-android系统必学小技巧干货分享
千里马学框架
博客等级 码龄6年 1万+粉丝 653原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千里马学框架

帮助你了,就请我喝杯咖啡

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址