SystemUI流程

目录

SystemUI类图

SystemUI流程一:SystemUI启动流程

SystemUI流程二:StatusBar创建流程

SystemUI流程三:系统Notification实现流程

附:应用Notification实现流程


        源码基于 Android 12。

        SystemUI 是 Android 的系统界面,在 Andorid 系统源码中,系统内置 app 一般放在 package/apps下,例如 settings,camera,Phone,Message 等等。而在 framework/base/package 下,它们也是系统的 app,SystemUI 就在此目录下。SystemUI 是系统应用,由 SystemServer 进程进行启动,入口 Application 为SystemUIApplication。常用UI组件有如下几个:

  • 状态栏 StatusBar
  • 通知栏 NotificationPanel
  • 导航栏 NavigationBar
  • 最近任务 Recent
  • 键盘锁 Keyguard
  • 快捷按键栏 QSPanel

SystemUI类图

SystemUI流程一:SystemUI启动流程

SystemUI流程二:StatusBar创建流程

SystemUI流程三:系统Notification实现流程

  • 根布局:super_status_bar.xml;
  • 顶上状态栏: status_bar.xml, 通过CollapsedStatusBarFragment.java加载,PhoneStatusBarView(FrameLayout,)是里面的父控件,对应 R.id.status_bar_container ;
  • 下拉状态栏:(包括通知为status_bar_expanded.xml),最外层布局NotificationPanelView。

通知显示过程:

  1. super_status_bar.xml
  2. status_bar.xml
  3. super_notification_shade.xml
  4. status_bar_expanded.xml
  5. NotificationPanelView
  6. NotificationsQuickSettingsContainer
  7. NotificationStackScrollLayout

        以上从 SystemUI 大概类图,以及自身启动流程开始,到 StatusBar 创建流程,再到系统 Notification 实现流程,一步步去理解 SystemUI 的相关流程。

附:应用Notification实现流程

猜你喜欢

转载自blog.csdn.net/Agg_bin/article/details/130252705