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 阅读更多 →

最新新闻

微博舆情分析全流程:爬虫、LDA主题建模与情感分析实战

微博舆情分析全流程:爬虫、LDA主题建模与情感分析实战

简介:基于微博数据的舆情分析项目,整合微博爬虫、LDA主题分析与情感分析三大模块,面向计算机、通信、人工智能等专业学生及从业者,适用于课程设计、大作业或毕业设计等场景。资源包内含三十九个文件,以Python脚本、Mar…

2026/10/13 0:42:10 阅读更多 →
图像抠图技术全解析:从传统算法到深度学习实战

图像抠图技术全解析:从传统算法到深度学习实战

1. 图像抠图到底在解决什么问题图像抠图(Image Matting)这个方向,我在实际项目里断断续续接触了快六年,从最早用Photoshop插件批量处理商品图,到后来自己写算法做视频会议背景替换,踩过的坑比想象中多得多。…

2026/10/13 0:41:08 阅读更多 →
数据仓库架构选型与维度建模实战:从分层设计到模型上线全流程

数据仓库架构选型与维度建模实战:从分层设计到模型上线全流程

1. 数仓架构选型:为什么你的第一个决定就决定了后面三年的维护成本很多团队在启动数据仓库项目时,第一反应是“先跑起来再说”,结果半年后数据口径混乱、报表对不上、开发效率断崖式下跌。我见过太多这样的案例,根源往往不在技术本…

2026/10/13 0:41:08 阅读更多 →
改进鲸鱼算法优化双向LSTM做时间序列预测的Matlab实战

改进鲸鱼算法优化双向LSTM做时间序列预测的Matlab实战

简介:面向时间序列预测与智能优化算法结合需求的Matlab用户,这套代码提供了改进鲸鱼算法优化双向长短期记忆网络(IWOA-BILSTM)与标准BILSTM的完整对比实验方案。优化范围涵盖迭代次数、隐藏层节点个数、学习率及正则化参数&#x…

2026/10/13 0:40:07 阅读更多 →
PSO-BP神经网络预测实战:小样本回归建模指南

PSO-BP神经网络预测实战:小样本回归建模指南

简介:本资源是一份面向机器学习初学者与MATLAB实践者的PSO-BP混合预测模型完整实现代码包,聚焦解决传统BP神经网络易陷局部极小、收敛慢、泛化能力弱等核心问题。通过粒子群优化算法全局搜索最优权重与阈值,显著提升时间序列预测精度与训练效…

2026/10/13 0:40:07 阅读更多 →
Shiro登录回跳原理与SavedRequest机制详解

Shiro登录回跳原理与SavedRequest机制详解

1. 项目概述:为什么“登录后回跳”不是个小功能,而是权限系统的关键粘合剂在做基于Shiro的Web系统时,我见过太多团队把“用户登录成功后跳转到哪”当成一个随手写两行代码就能搞定的边角需求。直到某次上线后,运营同事反馈&#x…

2026/10/13 0:40:07 阅读更多 →

日新闻

物联网系统集成避坑指南:从选型到验收的关键要点

物联网系统集成避坑指南:从选型到验收的关键要点

做了这么多年物联网系统集成的项目,我最大的感受是,大部分坑不是出在技术前沿,而是出在一些看起来很平常的地方。设备选了便宜的、协议没问清楚、现场没摸透、验收标准写得含糊——这些细枝末节,最后都会变成延期、超支和扯皮的大…

2026/10/13 0:00:57 阅读更多 →
ESP32舵机控制全攻略:从PWM原理到高级玩法与常见故障排查

ESP32舵机控制全攻略:从PWM原理到高级玩法与常见故障排查

如果你玩ESP32有一阵子了,很难不碰到舵机控制这道坎。做智能小车要转方向,做机械臂要抬关节,做云台要偏航俯仰,背后都是同一个东西在干活:舵机。而我见过太多人卡在“代码能编译、舵机就是不听话”这个阶段&#xff0c…

2026/10/13 0:00:57 阅读更多 →
CAN总线原理与STM32实战:抗干扰、仲裁、错误处理全解析

CAN总线原理与STM32实战:抗干扰、仲裁、错误处理全解析

1. 为什么CAN总线至今仍是工业现场的“硬通货”?——从汽车底盘到智能温室的真实需求你有没有拆过一辆老款燃油车的中控台?或者调试过某高校实验室里那台跑着Modbus协议却频频丢帧的PLC控制柜?又或者,在某个农业物联网项目里&…

2026/10/13 0:00:57 阅读更多 →

周新闻

流感时间序列预测实战: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/12 21:05:09 阅读更多 →
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 阅读更多 →