SystemUI GlobalActions plugin解析

news/2024/10/22 15:27:57/

com.android.systemui.action.PLUGIN_GLOBAL_ACTIONS

系统的默认实现为GlobalActionsImpl:

在这里插入图片描述

是谁发送了showShutdownUi指令?

在这里插入图片描述

GlobalActionsImpl 是通过inject的方式创建的

GlobalActionsComponent是一个system UI services,配置在config.xml中,
内容如下:

    <string-array name="config_systemUIServiceComponents" translatable="false"><item>com.android.systemui.util.NotificationChannels</item><item>com.android.systemui.keyguard.KeyguardViewMediator</item><item>com.android.systemui.recents.Recents</item><item>com.android.systemui.volume.VolumeUI</item><item>com.android.systemui.stackdivider.Divider</item><item>com.android.systemui.statusbar.phone.StatusBar</item><item>com.android.systemui.usb.StorageNotification</item><item>com.android.systemui.power.PowerUI</item><item>com.android.systemui.media.RingtonePlayer</item><item>com.android.systemui.keyboard.KeyboardUI</item><item>com.android.systemui.pip.PipUI</item><item>com.android.systemui.shortcut.ShortcutKeyDispatcher</item><item>@string/config_systemUIVendorServiceComponent</item><item>com.android.systemui.util.leak.GarbageMonitor$Service</item><item>com.android.systemui.LatencyTester</item><item>com.android.systemui.globalactions.GlobalActionsComponent</item><item>com.android.systemui.ScreenDecorations</item><item>com.android.systemui.biometrics.AuthController</item><item>com.android.systemui.SliceBroadcastRelayHandler</item><item>com.android.systemui.SizeCompatModeActivityController</item><item>com.android.systemui.statusbar.notification.InstantAppNotifier</item><item>com.android.systemui.theme.ThemeOverlayController</item><item>com.android.systemui.accessibility.WindowMagnification</item><item>com.android.systemui.accessibility.SystemActions</item><item>com.android.systemui.toast.ToastUI</item></string-array>

CommandQueue 会转发handleShowShutdownUi到GlobalActionsComponent,
GlobalActionsComponent 转发到GlobalActions的plugin。系统提供默认的plugin是GlobalActionsImpl.

SystemUIApplication

When SystemUIApplication starts up, it will start up the services listed in
config_systemUIServiceComponents or config_systemUIServiceComponentsPerUser.

Each of these services extend SystemUI. SystemUI provides them with a Context
and gives them callbacks for onConfigurationChanged (this historically was
the main path for onConfigurationChanged, now also happens through
ConfigurationController). They also receive a callback for onBootCompleted
since these objects may be started before the device has finished booting.

Each SystemUI service is expected to be a major part of system ui and the
goal is to minimize communication between them. So in general they should be
relatively silo’d.

启动 SystemUI service服务的流程为:

在这里插入图片描述


http://www.ppmy.cn/news/1435812.html

相关文章

2024最新版JavaScript逆向爬虫教程-------基础篇之深入JavaScript运行原理以及内存管理

目录 一、JavaScript运行原理1.1 前端需要掌握的三大技术1.2 为什么要学习JavaScript1.3 浏览器的工作原理1.4 浏览器的内核1.5 浏览器渲染过程1.6 认识JavaScript引擎1.7 V8引擎以及JavaScript的执行过程1.8 V8引擎执行过程 二、JavaScript的执行过程2.1 初始化全局对象2.2 执…

AAAI-24 | EarnHFT:针对高频交易的分层强化学习(RL)框架 附代码实现

AAAI-24 | EarnHFT:针对高频交易的分层强化学习&#xff08;RL&#xff09;框架 摘要(Abstract):高频交易&#xff08;HFT&#xff09;使用计算机算法在短时间内&#xff08;例如秒级&#xff09;做出交易决策&#xff0c;在加密货币市场&#xff08;例如比特币&#xff09;中…

【蓝桥杯2025备赛】集合求和

集合求和 题目描述 给定一个集合 s s s&#xff08;集合元素数量 ≤ 30 \le 30 ≤30&#xff09;&#xff0c;求出此集合所有子集元素之和。 输入格式 集合中的元素&#xff08;元素 ≤ 1000 \le 1000 ≤1000&#xff09; 输出格式 s s s 所有子集元素之和。 样例 #1 …

【AI学习】有关“长文本 vs RAG”

随着最近几个月&#xff0c;长文本技术的发展&#xff0c;“RAG vs 长文本”成了一个热闹的话题。 长文本有很多好处&#xff0c;从我使用kimi的实际感受来说&#xff0c;长文本确实很有用&#xff0c;在多轮对话中表现的非常好。我使用kimi主要是读论文&#xff0c;针对一篇论…

wasm 系列之 WebAssembly 和 emscripten 暴力上手

wasm 是什么&#xff1f; wasm 是 WebAssembly 的缩写。wasm 不是传统意义上的汇编语言&#xff0c;而是一种编译的中间字节码&#xff0c;可以在浏览器和其他 wasm runtime 上运行非 JavaScript 类型的语言&#xff0c;只要能被编译成 wasm&#xff0c;譬如 kotlin/wasm、Rus…

mybatis-3.5.0使用插件拦截sql以及通用字段赋值

1、添加插件配置类 import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.FieldUtils; import org.apache.ibatis.executor.Executor; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; imp…

XiaodiSec day013 Learn Note 小迪安全学习笔记

XiaodiSec day013 Learn Note 小迪安全学习笔记 记录得比较凌乱&#xff0c;不尽详细 day13 文件上传 代码自主写 编辑器引用 ueditor 文件下载 直连下载 传参下载 直连下载 中间件决定下载文件类型 直连一般没有问题 传参下载可能存在安全问题 文件删除 文件删除目录…

自定义数据 微调CLIP (结合paper)

CLIP 是 Contrastive Language-Image Pre-training 的缩写&#xff0c;是一个擅长理解文本和图像之间关系的模型&#xff0c;下面是一个简单的介绍&#xff1a; 优点&#xff1a; CLIP 在零样本学习方面特别强大&#xff0c;它可以&#xff08;用自然语言&#xff09;给出图像…