Android14 WMS-IWindow介绍
IWindow是很重要的官方介绍是API back to a client window that the Window Manager uses to inform it of interesting things happening.也就是说是是用于WMS回调客户端的当窗口有一些改变时WMS及时调用客户端接口让客户端窗口立即更新。IWindow.aidl - OpenGrok cross reference for /frameworks/base/core/java/android/view/IWindow.aidl/** * API back to a client window that the Window Manager uses to inform it of * interesting things happening. * * {hide} */ oneway interface IWindow { /** * NOTICE * The first method must remain the first method. Scripts * and tools rely on their transaction number to work properly. */ /** * Invoked by the view server to tell a window to execute the specified * command. Any response from the receiver must be sent through the * specified file descriptor. */ void executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor); void resized(in ClientWindowFrames frames, boolean reportDraw, in MergedConfiguration newMergedConfiguration, in InsetsState insetsState, boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, int syncSeqId, boolean dragResizing); /** * Called when this window retrieved control over a specified set of insets sources. */ void insetsControlChanged(in InsetsState insetsState, in InsetsSourceControl[] activeControls); /** * Called when a set of insets source window should be shown by policy. * * param types internal insets types (WindowInsets.Type.InsetsType) to show * param fromIme true if this request originated from IME (InputMethodService). * param statsToken the token tracking the current IME show request or {code null} otherwise. */ void showInsets(int types, boolean fromIme, in nullable ImeTracker.Token statsToken); /** * Called when a set of insets source window should be hidden by policy. * * param types internal insets types (WindowInsets.Type.InsetsType) to hide * param fromIme true if this request originated from IME (InputMethodService). * param statsToken the token tracking the current IME hide request or {code null} otherwise. */ void hideInsets(int types, boolean fromIme, in nullable ImeTracker.Token statsToken); void moved(int newX, int newY); void dispatchAppVisibility(boolean visible); void dispatchGetNewSurface(); void closeSystemDialogs(String reason); /** * Called for wallpaper windows when their offsets or zoom level change. */ void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync); void dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras, boolean sync); /** * Drag/drop events */ void dispatchDragEvent(in DragEvent event); /** * Pointer icon events */ void updatePointerIcon(float x, float y); /** * Called for non-application windows when the enter animation has completed. */ void dispatchWindowShown(); /** * Called when Keyboard Shortcuts are requested for the window. */ void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId); /** * Called when Scroll Capture support is requested for a window. * * param callbacks to receive responses */ void requestScrollCapture(in IScrollCaptureResponseListener callbacks); }IWindow是怎么赋值并一步步传入WMS端的呢由下面代码可以看出它是在ViewRootImpl中进行赋值的//定义 ​ final W mWindow; ... public ViewRootImpl(UiContext Context context, Display display, IWindowSession session, WindowLayout windowLayout) { ... mWindow new W(this); ... } W如下 static class W extends IWindow.Stub { private final WeakReferenceViewRootImpl mViewAncestor; private final IWindowSession mWindowSession; W(ViewRootImpl viewAncestor) { mViewAncestor new WeakReferenceViewRootImpl(viewAncestor); mWindowSession viewAncestor.mWindowSession; } ... public void setView(View view, WindowManager.LayoutParams attrs, View panelParentView, int userId) { //此时将mWindow传入这个方法会一步步调用到Server端WMS中 res mWindowSession.addToDisplayAsUser(mWindow, mWindowAttributes, getHostVisibility(), mDisplay.getDisplayId(), userId, mInsetsController.getRequestedVisibleTypes(), inputChannel, mTempInsets, mTempControls, attachedFrame, compatScale); ​

相关新闻

Android14 WMS-窗口添加流程(二)-Server端

Android14 WMS-窗口添加流程(二)-Server端

Android14 WMS-窗口添加流程(一)-Client端-CSDN博客 本文接着上文"Android14 WMS-窗口添加流程(一)-Client端"往下讲。也就是WindowManagerService#addWindow流程。 目录 一. WindowManagerService#addWindow 标志1:mPolicy.checkAddPermission 标志…

2026/10/12 19:12:39 阅读更多 →
Unity接入IAP内购(Android,IOS)最新流程,第三篇 后台对购买结果的验证以及发货(Android)

Unity接入IAP内购(Android,IOS)最新流程,第三篇 后台对购买结果的验证以及发货(Android)

文章目录欢迎进入Unity内购系列第三篇 后台对购买结果的验证以及发货(Android)一、基本流程二、GooglePlay后台设置三、PHP代码实现总结欢迎进入Unity内购系列 你好! 这将是一个系列的文章 第一篇 介绍客户端里支付的调起以及购买。 第二篇 …

2026/10/12 18:16:51 阅读更多 →
手把手教你构建Clojure MCP自定义服务器:工厂函数模式全解析

手把手教你构建Clojure MCP自定义服务器:工厂函数模式全解析

手把手教你构建Clojure MCP自定义服务器:工厂函数模式全解析 【免费下载链接】clojure-mcp Clojure MCP 项目地址: https://gitcode.com/gh_mirrors/cl/clojure-mcp Clojure MCP(clojure-mcp)是一个把 LLM 客户端(如 Claud…

2026/10/12 19:54:35 阅读更多 →

最新新闻

在手机上玩转 Claude Code:用 Termux 把安卓变成「掌上 IDE」(含国内模型配置)

在手机上玩转 Claude Code:用 Termux 把安卓变成「掌上 IDE」(含国内模型配置)

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 19:57:15 阅读更多 →
OctoFlow开源工作流引擎实测:事件驱动架构与热加载能力解析

OctoFlow开源工作流引擎实测:事件驱动架构与热加载能力解析

最近开源圈子里冒出一个被我盯了很久的项目,叫OctoFlow。起因是某互联网大厂开源了自家内部的工作流自动化工具,代码一放出来社区直接炸了,紧接着就有开发者基于它的设计思路,打磨出了这个更轻量、更开放的 OctoFlow。我前后花了一…

2026/10/12 19:57:15 阅读更多 →
KVM domain XML 深度解析:从骨架到实战配置

KVM domain XML 深度解析:从骨架到实战配置

1. 为什么你需要吃透 domain XML搞 KVM 虚拟化的朋友,十有八九都经历过这样的场景:虚拟机起不来,日志里一堆报错,最后定位到某个 XML 字段写错了;或者想给虚机加个网卡、挂块盘,用virt-manager图形界面点半…

2026/10/12 19:57:15 阅读更多 →
Ubuntu 18.04下MATLAB 2018b调用CUDA 10.1与NVCC编译实战

Ubuntu 18.04下MATLAB 2018b调用CUDA 10.1与NVCC编译实战

1. 项目背景与整体设计思路搞深度学习或者做大规模数值计算的朋友,大概率都遇到过这样一个场景:手头有一台装了 Ubuntu 18.04 的机器,MATLAB 版本是 2018b,显卡是 NVIDIA 的,想用 GPU 加速,结果一查发现 MA…

2026/10/12 19:57:15 阅读更多 →
用Python动手实现可调试的DFA状态机

用Python动手实现可调试的DFA状态机

1. 这不是教科书里的“自动机”,而是你真正能动手搭出来的状态机器“形式语言与自动机——第二章 自动机”这个标题,乍一看像极了某高校计算机专业课的PPT封面,冷、硬、带着点拒人千里的学术气息。但如果你正坐在实验室调试一个嵌入式设备的状…

2026/10/12 19:57:15 阅读更多 →
浏览器取证实战指南:从SQLite数据定位到时间线重建

浏览器取证实战指南:从SQLite数据定位到时间线重建

干了这么多年数字取证,我最大的感受就是:只要嫌疑人用过电脑,不管他多小心,都会留下痕迹。而浏览器,恰恰是这些痕迹最集中、最密集的集散地。可以说,一个浏览器就能还原一个人最近几十天的网络行为轨迹。今…

2026/10/12 19:56:14 阅读更多 →

日新闻

复古胶片颗粒感噪点合成器:Canvas ImageData 像素高斯杂色注入算法

复古胶片颗粒感噪点合成器:Canvas ImageData 像素高斯杂色注入算法

在数码相机、高清显示屏与现代矢量图形技术高度发达的今天,画面可以做到绝对的锐利、平滑与无瑕。然而,当一张秋日手账插画或拍立得照片过于“平整无瑕”时,往往会散发出一种冰冷生硬的“数码塑料感(Digital Plasticity&#xff0…

2026/10/12 0:00:59 阅读更多 →
活字印刷古籍线装排版:Canvas 竖排文字与栏线自适应算法

活字印刷古籍线装排版:Canvas 竖排文字与栏线自适应算法

在现代网页与移动端设计中,横排(Horizontal Layout)早已经成为了绝对的主流。然而,当我们翻开泛黄的线装古籍、宋版木刻诗集,或是欣赏一张茶道雅集的手写便签时,那种**自上而下纵向书写、自右向左逐列铺展&…

2026/10/12 0:00:59 阅读更多 →
周日晚间的“精神松绑减震器”:无压力情绪倾倒箱与温和轻声陪伴

周日晚间的“精神松绑减震器”:无压力情绪倾倒箱与温和轻声陪伴

每到周日的晚上八点到十点,很多人心里都会悄悄亮起一盏警示灯。 在心理学上,这种现象有一个专门的称谓——“周日夜晚焦虑症(Sunday Scaries)”。明天又是周一,闹钟又要重新在七点响彻卧房;脑海里仿佛有一个…

2026/10/12 0:00:59 阅读更多 →

周新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/12 0:16:30 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/12 0:16:38 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/12 0:16:43 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/11 10:45:37 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 14:48:49 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 18:11:17 阅读更多 →