本文主要是介绍SystemUI GlobalActions plugin解析,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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服务的流程为:
这篇关于SystemUI GlobalActions plugin解析的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!