Change SysemUIFactory to SystemUIInitializer.
This change allows variants of SystemUI to remove the reflection traditionally used to startup systemui and instead directly stand up the code that they need. Specifically, it introduces two primary pieces: - SystemUIInitializer A rename of the SystemUIFactory along with some modest refactoring. It is now an abstract class that new SystemUI build targets should implement themselves. Implementations use this class to specify a root Dagger component used to stand up the rest of SystemUI. A default SystemUIInitializerImpl is provided that starts up AOSP. - SystemUIAppComponentFactoryBase An abstract implementation of AppComponentFactory that is used to decide what SystemUIInitializer should be loaded. Implementers should return a SystemUIInitializer instance of their choice in #createSystemUIInitializer. The implementation of SystemUIAppComponentFactoryBase should in turn be specified in AndroidManifest.xml's Application.android:appComponentFactory attribute. The default SystemUIAppComponentFactory loads the SystemUIInitializer implementation reflectively. This should be considered deprecated behavior and may be removed in a future release. Please define your own SystemUIAppComponentFactoryBase implementation and return a specific SystemUIInitializer implementation from it. Currently, AOSP, TV, and Pixel specific builds still rely on the reflective loader. Other internal builds have been moved off of the reflective loader. Bug: 235624311 Test: manual Change-Id: I7029fb2960f54fb29e08b96ee49170f150a1d0b6
Loading
Please register or sign in to comment