千里马带你学framework:android 13 WM_SHELL_STARTING_WINDOW相关记录笔记

232 阅读1分钟

调试android的StartingWindow时候需要开相关日志:

test@test:~/aosp/frameworks$ adb shell wm logging enable-text  WM_SHELL_STARTING_WINDOW
Loaded 705 log definitions from /system/etc/protolog.conf.json.gz
No IProtoLogGroup named WM_SHELL_STARTING_WINDOW
Not handled, calling status bar with args: [enable-text, WM_SHELL_STARTING_WINDOW]
Starting logging on groups: [WM_SHELL_STARTING_WINDOW]

这里注意,明显用wm开启时候,和正常wm相关的打印输出也是不一样的,明显显示是No IProtoLogGroup named WM_SHELL_STARTING_WINDOW 但是后面又打印要calling status bar with args 即意思是windowmanagerservice处理不了,得statusbar服务来处理

这里是为啥阿,因为高版本StartingWindow已经移殖到了Systemui进程,让Systemui来负责窗口创建相关,所以自然就wms端处理不了,要跨进程让systemui处理

在这里插入图片描述

相当于wms帮我去systemui中打开logging

这个时候logcat -s WindowManager是没有这个shell相关打印,必须要

test@test:~$ adb logcat -s ShellStartingWindow

才可以打印出相关的Proto日志