+11
−10
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Ensure that DesktopModeController and DesktopModeTaskRepository are only created when they are needed, when the desktop mode flag is on. With the previous dagger configuration WMShellBaseModule relied on submodules to provide an implementation if one exists. If the submodule does have the implementation defined, it is always created and supplied to WMShellBaseModule provider method. Provider method in WMShellBaseModule then decides, based on flags, whether to return that implementation or not. But the instance is always created, regardless of that flag check. This change ensures that DesktopModeController and DesktopModeTaskRepository are only instantiated if WMShellBaseModule provider methods will provide a corresponding instance. This is achieved by relying on lazy instance creation by dagger. If the instances won't be provided due to flags being off, the instances won't be created. Bug: 260908558 Test: build and run sysui with desktop mode flag off, observe DesktopModeController object is not instatiated Change-Id: Ia155b8e079072e543c98463a58ab1907729db7b0