android 13 WMS/AMS系统开发-窗口层级相关DisplayArea,WindowContainer

Android12 - WMS之WindowContainer树(DisplayArea) 同一个Feature,相邻的Layer所生成的结点相同且共用,比如对于WindowedMagnification这个Feature,0~31 Layer所对应的结点都是[WindowedMagnification, 0, root]将task加入到TaskDisplayArea。如图示表格,按每个Layer所对应的列从上到下,最上面的为根结点root,上面的结点为下面节点的结点点,下面的节点被加入到上面结点的mChildren属性列表中。每个layer的值代表该layer在Z轴中的顺序,值越大的越靠上。 阅读详情
AI摘要

文章详细介绍了WindowContainer类及其子类在Android窗口管理中的作用,包括RootWindowContainer、DisplayContent、TaskDisplayArea等组件,以及窗口层级的概念和展示。通过dumpsys命令的输出,展示了窗口树的结构,并解释了各层级窗口的关系,帮助理解Android系统的窗口组织和显示顺序。

WindowContainer类相关类解释

官方注释:

/**
 * Defines common functionality for classes that can hold windows directly or through their
 * children in a hierarchy form.
 * The test class is {@link WindowContainerTests} which must be kept up-to-date and ran anytime
 * changes are made to this class.
 */

给可以直接持有窗口的自己或它的孩子定义了一些公共的方法和属性,像RootWindowContainer、DisplayContent、DisplayArea、DisplayArea.Tokens、TaskDisplayArea、Task、ActivityRecord、WindowToken、WindowState都是直接或间接的继承该类。

class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<E>
        implements Comparable<WindowContainer>, Animatable, SurfaceFreezer.Freezable,
        InsetsControlTarget {

    /**
     * The parent of this window container.
     * For removing or setting new parent {@link #setParent} should be used, because it also
     * performs configuration updates based on new parent's settings.
     */
    private WindowContainer<WindowContainer> mParent = null;

    // List of children for this window container. List is in z-order as the children appear on
    // screen with the top-most window container at the tail of the list.
    protected final WindowList<E> mChildren = new WindowList<E>();
}

这里面主要的重要要成员变量就是mParent和mChildren,一个代表父节点一个代表子节点,而且子节点的list顺序代表就是z轴的层级显示顺序,list尾巴在比list的头的z轴层级要高。

RootWindowContainer:根窗口容器,树的根是它。通过它遍历寻找,可以找到窗口树上的窗口。它的孩子是DisplayContent。
  DisplayContent:该类是对应着显示屏幕的,Android是支持多屏幕的,所以可能存在多个DisplayContent对象。上图只画了一个对象的结构,其他对象的结构也是和画的对象的结构是相似的。
DisplayArea:该类是对应着显示屏幕下面的,代表一组窗口合集,具有多个子类,如Tokens,TaskDisplayArea等
  TaskDisplayArea:它为DisplayContent的孩子,对应着窗口层次的第2层。第2层作为应用层,看它的定义:int APPLICATION_LAYER = 2,应用层的窗口是处于第2层。TaskDisplayArea的孩子是Task类,其实它的孩子类型也可以是TaskDisplayArea。而Task的孩子则可以是ActivityRecord,也可以是Task。
  Tokens:代表专门包含WindowTokens的容器,它的孩子是WindowToken,而WindowToken的孩子则为WindowState对象。WindowState是对应着一个窗口的。
  ImeContainer:它是输入法窗口的容器,它的孩子是WindowToken类型。WindowToken的孩子为WindowState类型,而WindowState类型则对应着输入法窗口。
  Task:任务,它的孩子可以是Task,也可以是ActivityRecord类型。
  ActivityRecord:是对应着应用进程中的Activity的。ActivityRecord是继承WindowToken的,它的孩子类型为WindowState。
  WindowState:WindowState是对应着一个窗口的。

窗口层级分析WindowContainer相关子类关联:
这里先我们用一个dumpsys命令来看看层级结构相关的输出
test@test:~$ adb shell dumpsys activity containers

ACTIVITY MANAGER CONTAINERS (dumpsys activity containers)
ROOT type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
  #0 Display 0 name="Built-in Screen" type=undefined mode=fullscreen override-mode=fullscreen requested-bounds=[0,0][1440,2960] bounds=[0,0][1440,2960]
   #2 Leaf:36:36 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #1 WindowToken{6e2757c type=2024 android.os.BinderProxy@6d43102} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 81ffe05 ScreenDecorOverlayBottom type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #0 WindowToken{98a9487 type=2024 android.os.BinderProxy@2130925} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 ac8fb4 ScreenDecorOverlay type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
   #1 HideDisplayCutout:32:35 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #2 OneHanded:34:35 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 FullscreenMagnification:34:35 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 Leaf:34:35 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #1 FullscreenMagnification:33:33 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 Leaf:33:33 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #0 OneHanded:32:32 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 Leaf:32:32 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
   #0 WindowedMagnification:0:31 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #6 HideDisplayCutout:26:31 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 OneHanded:26:31 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #2 FullscreenMagnification:29:31 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 Leaf:29:31 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #1 Leaf:28:28 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 FullscreenMagnification:26:27 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 Leaf:26:27 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #5 Leaf:24:25 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #1 WindowToken{696f278 type=2024 android.os.BinderProxy@31aecde} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 cf5fd51 pip-dismiss-overlay type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 WindowToken{e74c3eb type=2019 android.os.BinderProxy@d19030} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 e2b3548 NavigationBar0 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #4 HideDisplayCutout:18:23 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 OneHanded:18:23 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 FullscreenMagnification:18:23 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 Leaf:18:23 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #3 OneHanded:17:17 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 FullscreenMagnification:17:17 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 Leaf:17:17 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 WindowToken{34b13c0 type=2040 android.os.BinderProxy@710d2c1} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #0 d7c18f9 NotificationShade type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #2 HideDisplayCutout:16:16 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 OneHanded:16:16 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 FullscreenMagnification:16:16 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 Leaf:16:16 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #1 OneHanded:15:15 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 FullscreenMagnification:15:15 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 Leaf:15:15 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 WindowToken{e183269 type=2000 android.os.BinderProxy@e488916} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #0 5dfa4ee StatusBar type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
    #0 HideDisplayCutout:0:14 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
     #0 OneHanded:0:14 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #1 ImePlaceholder:13:14 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 ImeContainer type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #0 WindowToken{9439bd0 type=2011 android.os.Binder@f6126f6} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
         #0 6060c0a InputMethod type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
      #0 FullscreenMagnification:0:12 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #2 Leaf:3:12 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #0 WindowToken{58fdd21 type=2038 android.os.BinderProxy@ff11113} type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
         #0 cd4a10f ShellDropTarget type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #1 DefaultTaskDisplayArea type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #2 Task=1 type=home mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
         #0 Task=8 type=home mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
          #0 ActivityRecord{6733b50 u0 com.android.launcher3/.uioverrides.QuickstepLauncher} t8} type=home mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
           #0 6e08fe2 com.android.launcher3/com.android.launcher3.uioverrides.QuickstepLauncher type=home mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #1 Task=3 type=undefined mode=fullscreen override-mode=fullscreen requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #0 Task=4 type=undefined mode=fullscreen override-mode=fullscreen requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
         #1 Task=6 type=undefined mode=multi-window override-mode=multi-window requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
         #0 Task=5 type=undefined mode=multi-window override-mode=multi-window requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
       #0 Leaf:0:1 type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
        #0 WallpaperWindowToken{76eaad0 token=android.os.Binder@28e6df6} type=undefined mode=fullscreen override-mode=fullscreen requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]
         #0 19ddb72 com.android.systemui.ImageWallpaper type=undefined mode=fullscreen override-mode=undefined requested-bounds=[0,0][0,0] bounds=[0,0][1440,2960]


dumpsys的输出其实就是代表了整个图层结构的一个树形输出,可能这样看稍微有一些抽象,我们把他转成图如下:
在这里插入图片描述其实你第一次看到一定一脸迷茫,不知道怎么看。
接下来我就来详细讲解这个层级结构是怎么来的
每个显示屏幕的窗口层级分为37层,0-36层。每层可以放置多个窗口,上层窗口覆盖下面的,这个树中每个点一般这样格式:
xxx名字:层级开始数 :层级结束数

那么如下节点,代表当前名字为Leaf图层占领了0-1这两个层级
在这里插入图片描述这一下解释以后是不是从右到左依次看每个节点是不是就可以看出来,0-36个图层每个图层都有对应节点进行占领,有的一个节点占领一层,如Leaf:16:16 ,有的一个节点可能占领多层如:Leaf:18:23

这个就是wms中可以起到分层的一个树,但是看了半天是不是发现好像和我们平时分析的WindowToken等身影,因为树最开始创建时候肯定还没有任何的有效Window,有效window都是各个app等触发来创建的,这里如果根据dumpsys加上常见几个window如下:
在这里插入图片描述彩色部分就是我们常见的一些window的图层位置,明显可以看出,
Wallpaper处于0-1层节点
Activity处于DefaultTaskDisplayArea也就是第2层
InputMethod处于13-14层
StatusBar处于15层
NotificationShade处于17层
NavigationBar0处于24-25层
是不是这一下就亲切多了,瞬间就感觉平常见到的那些window都清楚知道他们的层级了,所以而且也完全符合我们的实际现象,比如Activity肯定要在Wallpaer的上面,NavigationBar0肯定在Activity的上面
当然同学会问:请问这个层级树是怎么构成的?这个部分相对比较复杂,后续再分享,本节我们就要掌握好可以根据dumpsys可以复原出树形图,也可以清楚自己的Window具体处在的层级

总结:

最后我们已经了解了层级结构树,这里又回到开始讨论的WindowContainer几个子类结合层级树关系大概如下:
在这里插入图片描述

android T分屏流程 android T上对分屏流程进行了重构,之前用WINDOWING_MODE_SPLIT_SCREEN_PRIMARY等windowingMode来判断当前窗口是否分屏已经失效;分屏的触发操作放在了wm shell下,运行在systemui进程;将分屏涉及到的reparent、reorder等系列操作封装到WindowContainerTransaction中通过WindowOrganizer的applyTransaction来通知system server进行相关处理实现分屏。 阅读详情

相关推荐

【问题分析】TaskDisplayArea被隐藏导致的黑屏以及无焦点窗口问题【Android 14】

用户操作出的偶现的黑屏以及无焦点窗口问题。直接原因是,TaskDisplayArea被添加了eLayerHidden标志位,导致所有App的窗口不可见,从而出现黑屏和无焦点窗口问题,相关log为:这个log是MTK添加的,用来分析ANR问题还是非常有帮助的,对于分析黑屏问题同样有用。

ukynho的博客 1953

安卓车载车机手机framework系统开发WMS/AMS体验专题

Android手机车机大厂Framework系统-WMS/AMS系统专题实战课作者:千里马10年+Android系统及应用开发经验,曾就职于爱奇艺,美国unokiwi,中兴努比亚,主要红魔手机ROM创新技术规划,技术难题,亮点卖点挖掘突破,基本好多游戏特色功能(游戏空间,红魔时刻,一键连招,红魔投屏)都有我的成果,多次获得公司优秀员工,优秀发明人,优秀讲师,发布发明专利百余篇国内首个做android framework实战开发课程作者 ps:购买了课程一定记得联系客服加入课程专群基于最新国内aosp 13/android 13代码深入理解framework重点模块wms胜任wms相关的需求开发掌握系统闪黑,冻屏疑难问题解决成为业界wms/ams模块专家打下基础

Android WindowContainer窗口结构

窗口是根据显示屏幕来管理,每个显示屏幕的窗口层级分为37层,0-36层。每层可以放置多个窗口,上层窗口覆盖下面的。要理解窗口的结构,需要学习下WindowContainer、RootWindowContainer、DisplayContent、TaskDisplayArea、Task、ActivityRecord、WindowToken、WindowStateWindowContainer等类。

薛文旺 1507

TaskDisplayArea、ActivityStack、Task以及ActivityRecord之间的关系

根据以上显示的信息,注释(1)中的Display #0 为ActivityDisplay,id为0,注释(2)中的Stack #33 为 ActivityStack,id为33,注释(4)中的Stack #1为ActivityStack,id为1,注释(3)和注释(5)TaskRecord的 id分别为33和30.我们可以看到这里有很多个ActivityStack 的全局变量,mRootHomeTask使用来存储launcher的ActivityStack,其type为home。

码龙-的博客 1485

车底盘:阿克曼转向和四轮差速

特性四轮差速四轮转向阿克曼转向转向方式控制左右轮组速度差控制四个轮子的角度控制前轮角度(后轮固定)运动原理滑移摩擦(搓着走)纯滚动(滚着走)近乎纯滚动(低速时)能耗高低(实现纯滚动时)中轮胎磨损非常严重小中灵活性高(可原地旋转)极高(可全向移动)低(转弯半径大)控制精度较低(受地面摩擦影响大)极高高机械复杂度低(通常只需2个驱动电机)极高(需4个转向+4个驱动执行器)中(需1个转向+2个驱动执行器)典型应用坦克、履带车辆、简单AGV、扫地机器人豪华轿车、高性能全向AGV。

bing_feilong的博客 1952

MD01和MD01N比较

摘要:MD01(传统MRP)与MD01N(MRP Live)是SAP系统不同版本的物料需求计划事务码。核心差异包括:MD01N取消MRP列表、简化计划规则、合并MPS/MRP操作、采用BAdI技术等,体现S/4HANA平台简化、标准化和智能化的演进方向。MD01N通过优化参数配置、增强筛选功能、利用HANA实时计算能力,实现了更高效的物料计划流程,代表了新一代计划引擎的技术革新。

SAP_LES_COM的博客 901

Android 12 - WMS 层级结构 && DisplayAreaGroup 引入

1. 简介 在 Android 窗口管理中,所有的窗口都是以树形数据结构进行组织管理的,认知这棵 WMS 的树有助于我们理解窗口的管理和显示,同时,WMS 的层级也决定了其在 SurfaceFlinger 的层级结构,这恰恰决定了它的显示规则。 2. WMS 顶层层级构建 在 Android 12 中,所有窗口树形管理都继基于 WindowContainer, 每个 WindowContainer 都有一个父节点和若干个子节点,我们先看看框架中 WindowContainer 都有哪些类型: RootW

HansChen的博客 6847

MAX31865模块温度测量

本文主要介绍MAX31865 测温注意事项,并写出读取温度的示例代码,模块详细参数可以查阅相关手册,

7482

android 13 WMS/AMS系统开发-窗口层级相关DisplayArea,WindowContainer第二节

接着上一节课学习,我们已经清楚的知道了层级结构应该怎么看,根据dumpsys的输出可以完美复原出层级结构树,也理解了结构树对于层级结构的控制作用。但还没有从源码部分对这个结构树进行一个分析,即分析生成这个结构树的源码部分。

learnframework的博客 7024

数学建模更新10(蒙特卡罗模拟)

蒙特卡罗模拟一.目录二.引例1:布丰投针实验1.投针步骤2.思路3. 历史实验者二.蒙特卡罗模拟概述1.定义2.提出3.原理4.讨论三.应用实例1.三门问题【1】问题【2】代码2.模拟排队问题【1】题目【2】引入参数【3】总结题目信息【4】过程可视化【5】一些推导公式【6】代码3.有约束的非线性规划问题【1】问题的分类【2】例子【3】推导过程【4】代码 一.目录 二.引例1:布丰投针实验 1.投针步骤 步骤: 1:取一张白纸,在上面画出许多条间距为a的平行线 2:去一根长度为l的针,随机的向纸张上投掷n次

沉晨尘宸的博客 3048

EtherCAT主站SOEM -- 0 -- 该EtherCAT主站SOEM专栏后续安排

SOEM(Simple Open EtherCAT Master)是一个开源的EtherCAT主站库,允许开发者构建自定义的EtherCAT主站应用程序。EtherCAT是一种实时以太网通信协议,广泛应用于工业自动化和机器控制领域。开源性质:SOEM是一个开源项目,这意味着开发者可以自由地查看、修改和分发代码。这使其成为工业自动化领域的一个强大工具,可以根据具体需求进行定制。EtherCAT主站实现:SOEM库提供了一个完整的EtherCAT主站实现,允许主站与多个EtherCAT从站设备进行通信。

常驻客栈的博客--嵌入式EtherCAT 6696

dumpsys activity containers

可见所有的Activity相关的页面,都是挂载在。可以查看当前容器层级信息。

了凡 781

C# 固高板卡(总线型) 操作类

主要功能有:初始化,轴使能,正负方向手动移动,回0,点到点移动,等待移动完成,输入IO数据读取,输出IO控制,清除报警等功能。

StevenChen的博客 576

Android T 窗口层级其三 —— 层级结构树添加窗口

DisplayArea层级结构中的每一个DisplayArea,都包含着一个层级值范围,这个层级值范围表明了这个DisplayArea可以容纳哪些类型的窗口。每种窗口类型,都可以通过WindowManagerPolicy.getWindowLayerFromTypeLw方法,返回一个相应的层级值。尚未添加窗口的层级结构树,如图。这里我们根据上面的代码,以及。的信息简单画出如下树形图。

yimelancholy的博客 3495

贪婪投影三角化算法

贪婪投影三角化算法是一种利用点云数据进行曲面重建的方法。其基本思想是通过迭代地连接点云中的邻近点来生成三角形,从而构建出整个表面。这种方法被称为“贪婪”,因为它在每一步仅考虑当前最优的策略,而不考虑全局的最优性。

twnkie的博客 1568

#systemverilog# 之 event region 和 timeslot 仿真调度(二)例子

由于疫情的关系,一时半会回不了学校了。今天开始,哪怕在家也要克服惰性开始学习了。今天来个的想了很久但都犯懒而没动手的内容,就是关于仿真软件在跑systemverilog的时候,是如果通过将HDL代码分成5个区域来编译,从而实现用软件模拟硬件的运行结果的思想。 首先,是基础概念,systemverilog标准划分了仿真软件的5个跑仿真所要执行的区域,说白了就是规定了软件在跑代码的时候要把代码分成5类,放到5个堆栈里面分别跑,这样才能:明明在软件上是以顺序方式来执行代码的,却能“看似”像在硬件中那样的实现并行

那么菜的博客 1768

2【Android 12】WindowContainer类

在代码搜索WindowContainer的继承关系,可以得到:除了不参与WindowContainer层级结构的WindowingLayerContainer之外,其他类都在本文有提及,用类图总结为:然后,将我们上面分析各个WindowContainer类时提供的说明图进行关联,可以得到:得到了一个简略版的WindowContainer层级结构图,这个并不真实反映手机的情况,因为这是按照我们上面的分析拼凑出的一张图,但是可以作为参考。

ukynho的博客 1万+

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

Android 12系统源码_窗口管理(四)窗口令牌WindowToken和窗口状态WindowState

通过Android12系统源码认识Android系统的窗口层级树

AfinalStone的专栏 2421

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

android12 displayArea学习

上图所示流程为冷启动activity的场景,在ATMS的视角下,会完成activityRecord和Task的创建,并把Task放到taskDisplayArea下面,把activityRecord放到Task下面。第五步,设置root节点为DisplayContent,同时从root节点开始,遍历所有子节点,创建DisplayArea,同时也创建对应的DisplayArea的surface。第三步,根据先前设置的feature数量,遍历所有Layer,根据具体规则创建每一层的pendingArea。

lizhenjun114的专栏 1928

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

Android 窗口结构(一) 窗口层级构造

Android窗口是根据显示屏幕来管理,每个显示屏幕的窗口层级分为37层,0-36层。每层可以放置多个窗口,上层窗口覆盖下面的。要理解窗口的结构,需要学习下WindowContainer、RootWindowContainer、DisplayContent、TaskDisplayArea、Task、ActivityRecord、WindowToken、WindowStateWindowContainer等类。

q1165328963的博客 6724

安卓12窗口层次: DisplayArea树

DisplayArea树 DisplayArea树示意图 DisplayArea概念 DisplayArea树的所有节点都继承于DisplayArea,而DisplayArea继承于WindowContainer,因此每一个节点都是一个container。DisplayArea代表了屏幕的显示区域,该显示区域是从Z值来看的,即在不同的layer上创建不同的DisplayArea。如果一个DisplayArea有子元素,那么代表该DisplayArea从Z轴上还是可分的。 DisplayContent代表一

jieliaoyuan8279的博客 9950

3【Android 12】DisplayArea层级结构

DisplayArea类的继承关系,之前已经分析过,这里用一张简单的类图总结:既然DisplayContent是作为其代表的屏幕的DisplayArea层级结构的根节点,那么从DisplayContent出发,看一下这棵以DisplayContent为根节点的DisplayArea树是如何生成的。 在DisplayContent的构造方法中,调用DisplayAreaPolicy.Provider.instantiate方法,去初始化一个DisplayArea层级结构。DisplayAreaPolicy.P

ukynho的博客 4143

Android T 窗口层级其一 —— 容器类

窗口在App端是以PhoneWindow的形式存在,承载了一个Activity的View层级结构。这里我们探讨一下WMS端窗口的形式。

yimelancholy的博客 3901

【Android 13源码分析】WindowContainer窗口层级-3-实例分析

在安卓源码的设计中,将将屏幕分为了37层,不同的窗口将在不同的层级中显示。对这一块的概念以及相关源码做了详细分析,整理出以下几篇。当前为第三篇,以应用窗口和系统窗口2大类型窗口的挂载为例介绍窗口是如何挂载到层级树中的。这篇看完对AOSP中整个窗口树就有了比较完整的了解。

隔壁小王的博客 2060
上一篇: android 13 WMS/AMS系统开发-SplashScreen的添加与移除分析
下一篇: android 13 WMS/AMS系统开发-窗口层级相关DisplayArea,WindowContainer第二节
千里马学框架
博客等级 码龄6年 1万+粉丝 653原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

打赏作者

千里马学框架

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

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

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

打赏作者

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

抵扣说明:

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

余额充值
⌂ 换网址