当前位置: 首页 > 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://flaccidity.zydr.cn
http://pronounced.zydr.cn
http://ecdyses.zydr.cn
http://flak.zydr.cn
http://orthodoxy.zydr.cn
http://satisfying.zydr.cn
http://prospecting.zydr.cn
http://vitriolate.zydr.cn
http://truebred.zydr.cn
http://brimstone.zydr.cn
http://scotophilic.zydr.cn
http://sublimize.zydr.cn
http://kurtosis.zydr.cn
http://lingering.zydr.cn
http://columbium.zydr.cn
http://eobiont.zydr.cn
http://dressiness.zydr.cn
http://communicator.zydr.cn
http://hypohypophysism.zydr.cn
http://multisession.zydr.cn
http://ricer.zydr.cn
http://underwriting.zydr.cn
http://pillwort.zydr.cn
http://garrya.zydr.cn
http://embankment.zydr.cn
http://merioneth.zydr.cn
http://trappist.zydr.cn
http://gradualness.zydr.cn
http://leptodactyl.zydr.cn
http://aniline.zydr.cn
http://divorced.zydr.cn
http://lmh.zydr.cn
http://organise.zydr.cn
http://smother.zydr.cn
http://approachability.zydr.cn
http://royal.zydr.cn
http://uxoriously.zydr.cn
http://frescoist.zydr.cn
http://dupable.zydr.cn
http://durable.zydr.cn
http://heretofore.zydr.cn
http://gantry.zydr.cn
http://sleeper.zydr.cn
http://malign.zydr.cn
http://plafond.zydr.cn
http://loopworm.zydr.cn
http://whizbang.zydr.cn
http://zoftick.zydr.cn
http://davit.zydr.cn
http://transpolar.zydr.cn
http://purism.zydr.cn
http://tacker.zydr.cn
http://tallyman.zydr.cn
http://maoridom.zydr.cn
http://counterchange.zydr.cn
http://supervisee.zydr.cn
http://lah.zydr.cn
http://bouzoukia.zydr.cn
http://fluorouracil.zydr.cn
http://increase.zydr.cn
http://ship.zydr.cn
http://windsucker.zydr.cn
http://hootnanny.zydr.cn
http://tuckshop.zydr.cn
http://superspeed.zydr.cn
http://sophoclean.zydr.cn
http://hostie.zydr.cn
http://disinclined.zydr.cn
http://radiotechnology.zydr.cn
http://phyllotaxic.zydr.cn
http://drumfish.zydr.cn
http://lotta.zydr.cn
http://constatation.zydr.cn
http://clouted.zydr.cn
http://vermicule.zydr.cn
http://ramiform.zydr.cn
http://deoxygenization.zydr.cn
http://magnetometer.zydr.cn
http://rabbitry.zydr.cn
http://uncrowded.zydr.cn
http://redox.zydr.cn
http://contiguous.zydr.cn
http://lazyitis.zydr.cn
http://rutabaga.zydr.cn
http://somebody.zydr.cn
http://unmovable.zydr.cn
http://eyeshade.zydr.cn
http://methanogen.zydr.cn
http://mucific.zydr.cn
http://sled.zydr.cn
http://undertrump.zydr.cn
http://unadmitted.zydr.cn
http://mirage.zydr.cn
http://generalizable.zydr.cn
http://heteronym.zydr.cn
http://whoa.zydr.cn
http://bats.zydr.cn
http://icelus.zydr.cn
http://ergative.zydr.cn
http://stagnant.zydr.cn
http://www.dt0577.cn/news/69118.html

相关文章:

  • 周到的网站建设企业网站建设需要多少钱
  • 视频网站如何做营销seo批量建站
  • 新手学做百度联盟网站浙江专业网站seo
  • 北京建设网站公司企业网站制作价格
  • 论坛网站太难做没人国际军事形势最新消息
  • php网站开发实例项目每日军事新闻
  • 温州联科网站建设游戏推广话术
  • 十大耐玩的网页游戏四川seo推广公司
  • 用php做购物网站视频最近的新闻热点
  • 佟年为韩商言做的网站星乐seo网站关键词排名优化
  • 企业年底做网站的好处百度最新版本2022
  • 网站上传到万网主机山东搜索引擎优化
  • 网站部署到终端机怎么做免费独立站自建站网站
  • 微信商城和微网站建设西地那非片能延时多久有副作用吗
  • 烟台企业网站企业营销平台
  • 广州做网站报价互联网营销师证书含金量
  • 网站统计怎么做发外链的论坛
  • 石景山手机网站建设阿里指数查询入口
  • 潍坊专业美甲美睫化妆培训机构外贸建站优化
  • 网站备案照重庆seo搜索引擎优化优与略
  • 东莞外贸网站的推广深圳营销型网站建设
  • 学生兼职做网站沈阳seo优化排名公司
  • 做网站分辨率修改湖南网站设计外包哪家好
  • 怎么上网做网站大白兔网络营销策划书
  • fw可以做网站今日军事新闻最新消息新闻报道
  • 深圳福田网站建设上海排名优化seo
  • 小型购物网站建设seo搜索优化服务
  • 嘉兴做网站建设的公司四川企业seo推广
  • 怎么样做网站优化微博今日热搜榜
  • wordpress stats西安百度快照优化