Commit Graph

6 Commits

Author SHA1 Message Date
Dave Mankoff
ecfbd9b3aa 6/N Move everything into SysUIComponent.
It is far easier to move _everything_ into SysUIComponent, and then
selectively promote things back to GlobalScope and/or WMScope than
it is to try to do it one at a time. With this change, though lots
of files are touched, very little actually changes structurally.

After this change goes in, folks should stop using @Singleton quite
so freely. Most things should live in @SysuiSingleton. @Singleton
is due to quickly be replaced by @GlobalScope.

Bug: 162923491
Test: atest SystemUITests && manual
Change-Id: Idc31d3d83b030581fb1fa869f7fafc4f2d3a8828
2020-08-16 16:08:25 -04:00
Fabian Kozynski
5ca7a51c11 Finish migrating to BroadcastDispatcher
This CL migrates most of the remaining classes to use
BroadcastDispatcher. Some classes left are Views or created before the
BroadcastDispatcher can be injected.

Adds docs for instructions on using the BroadcastDispatcher.

Using the broadcast dispatcher, the time system_server spends
dispatching common intents to SystemUI like SCREEN_OFF and SCREEN_ON can
be seen to decrease from ~70-150ms (in a Q build) to ~2-4ms.

Additionally, once a broadcast is received by the dispatcher, time
until it is fully dispatched inside SystemUI is not impacted greatly.
Most broadcasts are fully dispatched after ~20ms with a few of them
taking ~100ms.

Test: atest SystemUITests no regressions
Test: build and boot
Test: tried some random broadcasts and they are properly dispatched
Test: BroadcastDispatch dump
Test: adb shell dumpsys activity broadcasts
Bug: 134566046

Change-Id: I26a592be66b053f25669b5481b58bf7f07bfd0da
2019-11-04 10:53:26 -05:00
Dave Mankoff
a5d8a39a62 Pass context into the constructor of SystemUI objects.
The next step is to remove `components` from the SystemUI objects
and replace them with Dagger injection.

Bug: 138786270
Test: atest SystemUITests
Change-Id: I27415a8fa8ba0378599356426d849c9cfb9879d2
2019-10-10 14:02:13 -04:00
Sunny Goyal
a21570c732 Adding null check when unregistering slice relay handler
Bug: 130324175
Test: atest SliceBroadcastRelayHandlerTest
Change-Id: I8dc923746f3ef3a3617951d85c6a6f5d11970fa2
2019-04-22 12:22:02 -07:00
Matthew Fritze
429d27dd0b Pass Uri in SliceBroadcastRelay
Add the Uri as an extra to the Intent broadcast in the relay.

Test: runtest systemui
Bug: 70622039
Change-Id: I4942ecc9780a7814e3ac436e80034f76cb7bc6db
2018-05-02 19:43:39 -07:00
Jason Monk
0b5e52ccd8 Add way to use sysui as a broadcast relay for slices
Test: runtest systemui
Bug: 78139069
Change-Id: I64c4d56cca005cec7204bf45215bb7b0015f4571
2018-04-20 12:36:31 +00:00