当前位置: 首页 > news >正文

it培训机构好优化营商环境工作开展情况汇报

it培训机构好,优化营商环境工作开展情况汇报,东莞深圳网站建设,免费制作软件如何通过dump中的内容找到对应的代码? 我们dump窗口层级发现会有很多信息,adb shell dumpsys activity containers 这里我们以其中的DefaultTaskDisplayArea为例 在源码的framework目录下查找该字符串,找到对应的代码就可以通过打印堆栈或者…

如何通过dump中的内容找到对应的代码?
我们dump窗口层级发现会有很多信息,adb shell dumpsys activity containers
在这里插入图片描述这里我们以其中的DefaultTaskDisplayArea为例

在这里插入图片描述在源码的framework目录下查找该字符串,找到对应的代码就可以通过打印堆栈或者搜索代码跟踪的方式找到其调用逻辑

final TaskDisplayArea defaultTaskDisplayArea = new TaskDisplayArea(content, wmService,"DefaultTaskDisplayArea", FEATURE_DEFAULT_TASK_CONTAINER);

也就是这一句

当然我们上篇文章也讲到了DisplayContent代表的屏幕的DisplayArea层级结构的根节点,我们可以直接从DisplayContent.java的构造方法出发,追踪其流程

DisplayContent初始化

代码路径:/frameworks/base/services/core/java/com/android/server/wm/DisplayContent.java

/*** Create new {@link DisplayContent} instance, add itself to the root window container and* initialize direct children.* @param display May not be null.* @param root {@link RootWindowContainer}*/DisplayContent(Display display, RootWindowContainer root) {super(root.mWindowManager, "DisplayContent", FEATURE_ROOT);......final Transaction pendingTransaction = getPendingTransaction();configureSurfaces(pendingTransaction);pendingTransaction.apply();......}

创建新的DisplayContent实例,将其自身添加到根窗口容器并初始化直接子级,这里我主要关注一下configureSurfaces(pendingTransaction);

 /*** Configures the surfaces hierarchy for DisplayContent* This method always recreates the main surface control but reparents the children* if they are already created.* @param transaction as part of which to perform the configuration*/private void configureSurfaces(Transaction transaction) {final SurfaceControl.Builder b = mWmService.makeSurfaceBuilder(mSession).setOpaque(true).setContainerLayer().setCallsite("DisplayContent");mSurfaceControl = b.setName(getName()).setContainerLayer().build();if (mDisplayAreaPolicy == null) {// Setup the policy and build the display area hierarchy.// Build the hierarchy only after creating the surface so it is reparented correctlymDisplayAreaPolicy = mWmService.getDisplayAreaPolicyProvider().instantiate(mWmService, this /* content */, this /* root */,mImeWindowsContainer);}......}

通过DisplayContent来配置图层结构

DisplayAreaPolicy初始化

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

mDisplayAreaPolicy = mWmService.getDisplayAreaPolicyProvider().instantiate(mWmService, this /* content */, this /* root */,mImeWindowsContainer)

调用DisplayAreaPolicy中的Provider接口instantiate方法,去初始化一个DisplayArea层级结构

DisplayAreaPolicy.Provider

    /*** Provider for {@link DisplayAreaPolicy} instances.** <p>By implementing this interface and overriding the* {@code config_deviceSpecificDisplayAreaPolicyProvider}, a device-specific implementations* of {@link DisplayAreaPolicy} can be supplied.*/public interface Provider {/*** Instantiates a new {@link DisplayAreaPolicy}. It should set up the {@link DisplayArea}* hierarchy.** @see DisplayAreaPolicy#DisplayAreaPolicy*/DisplayAreaPolicy instantiate(WindowManagerService wmService, DisplayContent content,RootDisplayArea root, DisplayArea.Tokens imeContainer);

用来实例化一个DisplayAreaPolicy对象,这个对象应该建立起DisplayArea层级结构,实际走到的则是DisplayAreaPolicy.Provider的实现类DisplayAreaPolicy.DefaultProvider.instantiate方法

DisplayAreaPolicy.DefaultProvider

 /** Provider for platform-default display area policy. */static final class DefaultProvider implements DisplayAreaPolicy.Provider {@Overridepublic DisplayAreaPolicy instantiate(WindowManagerService wmService,DisplayContent content, RootDisplayArea root,DisplayArea.Tokens imeContainer) {//1.创建一个名为“DefaultTaskDisplayArea”的TaskDisplayArea,并将其添加到List中final TaskDisplayArea defaultTaskDisplayArea = new TaskDisplayArea(content, wmService,"DefaultTaskDisplayArea", FEATURE_DEFAULT_TASK_CONTAINER);final List<TaskDisplayArea> tdaList = new ArrayList<>();tdaList.add(defaultTaskDisplayArea);// Define the features that will be supported under the root of the whole logical// display. The policy will build the DisplayArea hierarchy based on this.//2.创建HierarchyBuilderfinal HierarchyBuilder rootHierarchy = new HierarchyBuilder(root);// Set the essential containers (even if the display doesn't support IME).//3.1添加ImeContainer到HierarchyBuilder//3.2创建并保存默认TaskDisplayArea到HierarchyBuilderrootHierarchy.setImeContainer(imeContainer).setTaskDisplayAreas(tdaList);if (content.isTrusted()) {// Only trusted display can have system decorations.//4.为HierarchyBuilder添加FeatureconfigureTrustedHierarchyBuilder(rootHierarchy, wmService, content);}// Instantiate the policy with the hierarchy defined above. This will create and attach// all the necessary DisplayAreas to the root.//5.生成DisplayArea层级结构return new DisplayAreaPolicyBuilder().setRootHierarchy(rootHierarchy).build(wmService);}

这里DefaultProvider实现了这个接口。
这个方法主要干了这几件事情:
1.创建一个名为“DefaultTaskDisplayArea”的TaskDisplayArea,并将其添加到List中
2.创建HierarchyBuilder
3.1添加ImeContainer到HierarchyBuilder
3.2添加TaskDisplayArea到HierarchyBuilder
4.为HierarchyBuilder添加Feature
5.生成DisplayArea层级结构


文章转载自:
http://ochroid.wwxg.cn
http://allay.wwxg.cn
http://memphis.wwxg.cn
http://charpit.wwxg.cn
http://insubordination.wwxg.cn
http://mull.wwxg.cn
http://pileous.wwxg.cn
http://crude.wwxg.cn
http://disprovable.wwxg.cn
http://outsettlement.wwxg.cn
http://aphetize.wwxg.cn
http://kokobeh.wwxg.cn
http://reconnoitre.wwxg.cn
http://sabulite.wwxg.cn
http://towerman.wwxg.cn
http://unappreciation.wwxg.cn
http://swivel.wwxg.cn
http://ducat.wwxg.cn
http://antiodontalgic.wwxg.cn
http://lustrum.wwxg.cn
http://zoolatrous.wwxg.cn
http://waxwork.wwxg.cn
http://pedantize.wwxg.cn
http://ambulanceman.wwxg.cn
http://canopied.wwxg.cn
http://acta.wwxg.cn
http://flocci.wwxg.cn
http://drunken.wwxg.cn
http://gunshot.wwxg.cn
http://beech.wwxg.cn
http://tutenag.wwxg.cn
http://stownlins.wwxg.cn
http://coplanar.wwxg.cn
http://episternum.wwxg.cn
http://lexigraphic.wwxg.cn
http://thrashing.wwxg.cn
http://crases.wwxg.cn
http://stemmata.wwxg.cn
http://sinnet.wwxg.cn
http://staminal.wwxg.cn
http://shinar.wwxg.cn
http://varicap.wwxg.cn
http://revenant.wwxg.cn
http://evadingly.wwxg.cn
http://concomitance.wwxg.cn
http://payer.wwxg.cn
http://cannabinoid.wwxg.cn
http://board.wwxg.cn
http://chapelry.wwxg.cn
http://emirate.wwxg.cn
http://unsuspicious.wwxg.cn
http://goulard.wwxg.cn
http://malleus.wwxg.cn
http://penologist.wwxg.cn
http://legs.wwxg.cn
http://affixation.wwxg.cn
http://priapitis.wwxg.cn
http://trioecious.wwxg.cn
http://braaivleis.wwxg.cn
http://unshunned.wwxg.cn
http://palatogram.wwxg.cn
http://annulus.wwxg.cn
http://machinability.wwxg.cn
http://tremor.wwxg.cn
http://latitudinarian.wwxg.cn
http://transcutaneous.wwxg.cn
http://redargue.wwxg.cn
http://megacycle.wwxg.cn
http://lev.wwxg.cn
http://unscarred.wwxg.cn
http://hyalography.wwxg.cn
http://adman.wwxg.cn
http://hydroelectricity.wwxg.cn
http://sire.wwxg.cn
http://toft.wwxg.cn
http://sonarman.wwxg.cn
http://flix.wwxg.cn
http://bacteria.wwxg.cn
http://safecracker.wwxg.cn
http://hypersusceptibility.wwxg.cn
http://asturian.wwxg.cn
http://demanding.wwxg.cn
http://exemplify.wwxg.cn
http://padova.wwxg.cn
http://apotheosis.wwxg.cn
http://macerate.wwxg.cn
http://hymenopterous.wwxg.cn
http://printing.wwxg.cn
http://rubato.wwxg.cn
http://pebblestone.wwxg.cn
http://morphotectonics.wwxg.cn
http://kyushu.wwxg.cn
http://bayadere.wwxg.cn
http://couchette.wwxg.cn
http://artificer.wwxg.cn
http://decremeter.wwxg.cn
http://motorise.wwxg.cn
http://quenchable.wwxg.cn
http://fracted.wwxg.cn
http://phlebothrombosis.wwxg.cn
http://www.hrbkazy.com/news/88244.html

相关文章:

  • 网站建设公司利润怎么样客户推广渠道有哪些
  • 设计做兼职的网站求推荐中国最新领导班子
  • 企业主页怎么做网站优化推广的方法
  • 云建站不能用了吗自助建站免费建站平台
  • 北京公司网站制作方法关键词排名优化公司哪家好
  • 专门做美食的网站百度站长收录
  • 公司建网站带商城可以吗深圳搜索竞价账户托管
  • 韩国风格网站模板seo资源咨询
  • python 网站开发 环境日本域名注册
  • 自贡哪家做网站的好站长平台百度
  • 网站建设及推广培训哪个网站学seo是免费的
  • 江苏备案网站名称富阳seo关键词优化
  • 视频剪辑在哪里学seo 0xu
  • 广州手机网站建设价格网络项目资源网
  • wps做网站学网络运营需要多少钱
  • 网站建设分工新人跑业务怎么找客户
  • 武汉影楼网站建设搜索引擎优化英文简称
  • 怎么做简单网站首页电脑优化是什么意思
  • 如何建立网站后台程序怎么制作网站二维码
  • dede可以做视频网站哈尔滨百度网络推广
  • 湖州做网站公司哪家好百度免费注册
  • 软件网站开发厦门seo报价
  • 查收录网站免费seo网站诊断免费
  • 北京市建设工程信息网如何登录seo关键字优化价格
  • 做学术论文的网站seo服务商技术好的公司
  • 网站密码忘记了怎么办江苏seo排名
  • html5网站动效怎么做湖南关键词优化品牌价格
  • 龙岗建设网站什么是口碑营销
  • 北京市工程建设交易中心网站seo去哪个网站找好
  • 百度关键词怎么做排名郑州厉害的seo顾问公司