3/ Fix inverted ShellInit dependency order (no functional changes)
- We were previously initializing components manually because some startup
is order-dependent, which led to an increasing number of dependencies
from ShellTaskOrganizer on things that it really doesn't need to know
about. The initialization order actually matches the dependency order
pretty closely, so instead we can have these components add callbacks
in the order they are created and initalize in sequence.
- Also move some logic out of constructors to the init callback
- The other subtle issue is that the provider for ShellInitImpl was
implicitly also ensuring that certain shell components were created at
startup (since they aren't otherwise referenced by any SysUI component
directly or indirectly). Instead, separate that out into another
more explicit provider, with the @ShellCreateTrigger annotation, and
allow subclasses to provide a @ShellCreateTriggerOverride annotated
provider for product-specific initialization
Test: atest WMShellUnitTests
Test: atest SystemUITests
Bug: 238217847
Change-Id: I4a2583ceeaf469130ac07fc8c4e267c28843b7b8
Signed-off-by: Winson Chung <winsonc@google.com>
Loading
Please register or sign in to comment