Commit Graph

5 Commits

Author SHA1 Message Date
Sunny Goyal
55dc2d1c31 Moving DisplayController to dagger
Separating various overrides to individual modules so that they can be reused in tests

Removing ContextualEduStatsManager and directly using SysUiProxy as all the usescases
are only in quickstep/
This avoids additional Module definition and delegation

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I096459d638553991ed01766002b874589c6b976e
2025-01-14 11:40:35 -08:00
Sunny Goyal
60bad051c4 Fixing module inheritence when overriding Launcher component
Bug: 361850561
Flag: EXEMPT dagger migration
Test: Presubmit
Change-Id: I1f726e9895f6872d0294a11ab0c52c6c619c2a3f
2024-12-18 10:38:00 -08:00
Anushree Ganjam
26a5f65afd Make sandboxContext extend LauncherApplication (4/n)
See
https://docs.google.com/drawings/d/1JHFi_nhmQt2xPT1N3FB_1mnaRK5TVqKZ9-fSl3EA7sU/edit?usp=sharing
and
https://docs.google.com/drawings/d/1bx4WURP4uHZGzZ1bWQgpw701jkTkVqlNfA02Yt-ZtSI/edit?usp=sharing&resourcekey=0-oySjsnaCsOSrNIPqqEa0gw
for design details.

We need to make SandboxContext extend LauncherApplication because we
want create MainThreadInitializedObjects in SandboxContext's
AppComponent scope. Since MainThreadInitiliazedObjects are closed in
SandboxContext's OnDestroy() , we need to replicate same thing using
dagger as well.

- DaggerSingletonObject is same as MainThreadInitializedObject but is
  used for fetching the dagger created singletons so that we can avoid
  major refactors for accessing singletons. This will be deleted soon.

- DaggerSingletonTracker to track dagger created singletons and call
  close() on those singleton objects created in SandboxContext scope.

- Annotate the singleton object SettingsChangeLogger constructor with @Inject and execute the statements in Main thread.
- Added createSandboxContextForTest(only for Test) to avoid creation of
  dagger component in test. As follow up, I will delete this method and
  introduce fakeDaggerComponents in test.

Bug: 361850561
Test: Manual
Flag: NONE Dagger Integration

Change-Id: I2d3762ea64e53baa4de190790568aec750b54201
2024-09-19 11:20:30 -07:00
Anushree Ganjam
fbc0f97410 Add LauncherAppSingleton & LauncherActivityScope to dagger graph (3/n)
* Add ApplicationContext qualifier and binding the application context instance so
that this context is available across dagger graph.

* Add QuickStepModule and LoggingModule
* Provide SettingsChangeLogger in dagger way. We are depending on
  MainThreadInitializedObject for cleanup. We need to define a way
  explicitly see how we can destroy singleton objects.

Bug: 361850561
Test: Manual
Flag: NONE Dagger Integration
Change-Id: Ia10cc500edb1d88adcca540119651f59b9bc8dc8
2024-09-11 13:56:23 -07:00
Anushree Ganjam
14721d1e3a Dagger codeswap setup between Quickstep and NexusLauncher (2/n)
Bug: 361850561
Test: Manual
Flag: NONE Dagger Integration
Change-Id: Ic552091d91b991b2fdaf5c3eaa73f394328889e3
2024-08-29 10:05:12 -07:00