summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Ats Jenk <atsjenk@google.com> 2022-11-30 14:22:59 -0800
committer Ats Jenk <atsjenk@google.com> 2022-12-05 23:41:13 +0000
commitbedb8136d358d6e3b2d002875d38fe2114c3fced (patch)
tree56c64ddd00d4e4bfc55a418a8bf4a116a9740201 /api/api.go
parentdae823a3b615c325287f4d4f131f3a431243b0f1 (diff)
Only create DesktopModeController when flag is on
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
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions