Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
accessibility/accessibilitymenu/ | 14-Jan-2024 | - | 6,444 | 5,238 | ||
aconfig/ | 15-Dec-2024 | - | 1,335 | 1,170 | ||
animation/ | 15-Dec-2024 | - | 10,905 | 6,662 | ||
checks/ | 15-Dec-2024 | - | 4,988 | 3,890 | ||
common/ | 15-Dec-2024 | - | 201 | 91 | ||
compose/ | 15-Dec-2024 | - | 38,551 | 27,572 | ||
customization/ | 15-Dec-2024 | - | 5,425 | 2,818 | ||
docs/ | 15-Dec-2024 | - | 3,637 | 2,757 | ||
log/ | 15-Dec-2024 | - | 1,009 | 477 | ||
multivalentTests/src/com/android/ | 15-Dec-2024 | - | 99,048 | 75,017 | ||
multivalentTestsForDevice/src/com/android/ | 15-Dec-2024 | - | ||||
multivalentTestsForDeviceless/src/com/android/ | 15-Dec-2024 | - | ||||
plugin/ | 15-Dec-2024 | - | 4,232 | 1,975 | ||
plugin_core/ | 15-Dec-2024 | - | 651 | 197 | ||
res/ | 15-Dec-2024 | - | 213,837 | 176,742 | ||
res-keyguard/ | 15-Dec-2024 | - | 20,691 | 16,461 | ||
res-product/ | 14-Jan-2024 | - | 6,135 | 4,437 | ||
schemas/com.android.systemui.communal.data.db.CommunalDatabase/ | 15-Dec-2024 | - | 79 | 79 | ||
scripts/ | 14-Jan-2024 | - | 4,921 | 4,592 | ||
shared/ | 15-Dec-2024 | - | 13,280 | 8,315 | ||
src/com/android/ | 14-Jan-2024 | - | 615,325 | 428,251 | ||
src-debug/com/android/systemui/ | 14-Jan-2024 | - | 257 | 129 | ||
src-release/com/android/systemui/ | 14-Jan-2024 | - | 192 | 101 | ||
tests/ | 15-Dec-2024 | - | 374,739 | 273,475 | ||
tools/lint/ | 14-Jan-2024 | - | 89,949 | 88,962 | ||
unfold/ | 15-Dec-2024 | - | 3,165 | 1,895 | ||
utils/ | 15-Dec-2024 | - | 304 | 68 | ||
Android.bp | D | 15-Dec-2024 | 43.6 KiB | 968 | 924 | |
AndroidManifest-res.xml | D | 14-Jan-2024 | 719 | 19 | 4 | |
AndroidManifest.xml | D | 15-Dec-2024 | 53.5 KiB | 1,120 | 821 | |
CleanSpec.mk | D | 14-Jan-2024 | 2.4 KiB | 51 | 2 | |
MODULE_LICENSE_APACHE2 | D | 14-Jan-2024 | 0 | |||
NOTICE | D | 14-Jan-2024 | 10.4 KiB | 191 | 158 | |
OWNERS | D | 15-Dec-2024 | 2.2 KiB | 119 | 115 | |
README.md | D | 14-Jan-2024 | 7 KiB | 171 | 113 | |
TEST_MAPPING | D | 15-Dec-2024 | 4.1 KiB | 161 | 154 | |
flag_check.py | D | 15-Dec-2024 | 4.4 KiB | 139 | 96 | |
lint-baseline.xml | D | 15-Dec-2024 | 1.7 MiB | 32,216 | 29,337 | |
lint.xml | D | 14-Jan-2024 | 106 | 4 | 4 | |
proguard.flags | D | 15-Dec-2024 | 238 | 8 | 5 | |
proguard_common.flags | D | 15-Dec-2024 | 2.2 KiB | 55 | 46 | |
proguard_kotlin.flags | D | 15-Dec-2024 | 2 KiB | 38 | 32 |
README.md
1# SystemUI 2 3“Everything you see in Android that's not an app” 4 5SystemUI is a persistent process that provides UI for the system but outside 6of the system_server process. 7 8Inputs directed at sysui (as opposed to general listeners) generally come in 9through IStatusBar. Outputs from sysui are through a variety of private APIs to 10the android platform all over. 11 12## SystemUIApplication 13 14When SystemUIApplication starts up, it instantiates a Dagger graph from which 15various pieces of the application are built. 16 17To support customization, SystemUIApplication relies on the AndroidManifest.xml 18having an `android.app.AppComponentFactory` specified. Specifically, it relies 19on an `AppComponentFactory` that subclases `SystemUIAppComponentFactoryBase`. 20Implementations of this abstract base class must override 21`#createSystemUIInitializer(Context)` which returns a `SystemUIInitializer`. 22`SystemUIInitializer` primary job in turn is to intialize and return the Dagger 23root component back to the `SystemUIApplication`. 24 25Writing a custom `SystemUIAppComponentFactoryBase` and `SystemUIInitializer`, 26should be enough for most implementations to stand up a customized Dagger 27graph, and launch a custom version of SystemUI. 28 29## Dagger / Dependency Injection 30 31See [dagger.md](docs/dagger.md) and https://dagger.dev/. 32 33## CoreStartable 34 35The starting point for most of SystemUI code is a list of classes that 36implement `CoreStartable` that are started up by SystemUIApplication. 37CoreStartables are like miniature services. They have their `#start` method 38called after being instantiated, and a reference to them is stored inside 39SystemUIApplication. They are in charge of their own behavior beyond this, 40registering and unregistering with the rest of the system as needed. 41 42`CoreStartable` also receives a callback for `#onBootCompleted` 43since these objects may be started before the device has finished booting. 44 45`CoreStartable` is an ideal place to add new features and functionality 46that does not belong directly under the umbrella of an existing feature. 47It is better to define a new `CoreStartable` than to stick unrelated 48initialization code together in catch-all methods. 49 50CoreStartables are tied to application startup via Dagger: 51 52```kotlin 53class FeatureStartable 54@Inject 55constructor( 56 /* ... */ 57) : CoreStartable { 58 override fun start() { 59 // ... 60 } 61} 62 63@Module 64abstract class FeatureModule { 65 @Binds 66 @IntoMap 67 @ClassKey(FeatureStartable::class) 68 abstract fun bind(impl: FeatureStartable): CoreStartable 69} 70``` 71 72Including `FeatureModule` in the Dagger graph such as this will ensure that 73`FeatureStartable` gets constructed and that its `#start` method is called. 74 75## IStatusBar 76 77CommandQueue is the object that receives all of the incoming events from the 78system_server. It extends IStatusBar and dispatches those callbacks back any 79number of listeners. The system_server gets a hold of the IStatusBar when 80StatusBar calls IStatusBarService#registerStatusBar, so if StatusBar is not 81included in the XML service list, it will not be registered with the OS. 82 83CommandQueue posts all incoming callbacks to a handler and then dispatches 84those messages to each callback that is currently registered. CommandQueue 85also tracks the current value of disable flags and will call #disable 86immediately for any callbacks added. 87 88There are a few places where CommandQueue is used as a bus to communicate 89across sysui. Such as when StatusBar calls CommandQueue#recomputeDisableFlags. 90This is generally used a shortcut to directly trigger CommandQueue rather than 91calling StatusManager and waiting for the call to come back to IStatusBar. 92 93### [com.android.systemui.util.NotificationChannels](/packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java) 94 95Creates/initializes the channels sysui uses when posting notifications. 96 97### [com.android.systemui.keyguard.KeyguardViewMediator](/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java) 98 99Manages keyguard view state. 100 101### [com.android.systemui.recents.Recents](/packages/SystemUI/src/com/android/systemui/recents/Recents.java) 102 103Recents tracks all the data needed for recents and starts/stops the recents 104activity. It provides this cached data to RecentsActivity when it is started. 105 106### [com.android.systemui.volume.VolumeUI](/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java) 107 108Registers all the callbacks/listeners required to show the Volume dialog when 109it should be shown. 110 111### [com.android.systemui.status.phone.CentralSurfaces](/packages/SystemUI/src/com/android/systemui/status/phone/CentralSurfaces.java) 112 113This shows the UI for the status bar and the notification shade it contains. 114It also contains a significant amount of other UI that interacts with these 115surfaces (keyguard, AOD, etc.). CentralSurfaces also contains a notification listener 116to receive notification callbacks. 117 118### [com.android.systemui.usb.StorageNotification](/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java) 119 120Tracks USB status and sends notifications for it. 121 122### [com.android.systemui.power.PowerUI](/packages/SystemUI/src/com/android/systemui/power/PowerUI.java) 123 124Tracks power status and sends notifications for low battery/power saver. 125 126### [com.android.systemui.media.RingtonePlayer](/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java) 127 128Plays ringtones. 129 130### [com.android.systemui.keyboard.KeyboardUI](/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java) 131 132Shows UI for keyboard shortcuts (triggered by keyboard shortcut). 133 134### [com.android.systemui.shortcut.ShortcutKeyDispatcher](/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java) 135 136Dispatches shortcut to System UI components. 137 138### @string/config_systemUIVendorServiceComponent 139 140Component allowing the vendor/OEM to inject a custom component. 141 142### [com.android.systemui.util.leak.GarbageMonitor$Service](/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java) 143 144Tracks large objects in sysui to see if there are leaks. 145 146### [com.android.systemui.LatencyTester](/packages/SystemUI/src/com/android/systemui/LatencyTester.java) 147 148Class that only runs on debuggable builds that listens to broadcasts that 149simulate actions in the system that are used for testing the latency. 150 151### [com.android.systemui.globalactions.GlobalActionsComponent](/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java) 152 153Shows the global actions dialog (long-press power). 154 155### [com.android.systemui.ScreenDecorations](/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java) 156 157Draws decorations about the screen in software (e.g. rounded corners, cutouts). 158 159### [com.android.systemui.biometrics.BiometricDialogImpl](/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogImpl.java) 160 161Biometric UI. 162 163### [com.android.systemui.wmshell.WMShell](/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java) 164 165Delegates SysUI events to WM Shell controllers. 166 167--- 168 169 * [Plugins](/packages/SystemUI/docs/plugins.md) 170 * [Demo Mode](/packages/SystemUI/docs/demo_mode.md) 171