Commit Graph

7 Commits

Author SHA1 Message Date
Dave Mankoff
1a0e382745 Allow Services to be created through Dagger.
This is a significant change that allows Services to have their
constructed injected into.

The DozeService is now labeled as injectable (thought it takes no arguments).
At least one Service has to be marked as injectable for Dagger to be happy
compiling this code.

Bug: 138787339
Test: atest SystemUITests
Change-Id: I0ec92e01dd236bcee3083c8f8744c53b7ccc92d3
Merged-In: Ib58f8763c996fbc2aea07ead56493d2d9e936f5b
2019-08-14 14:52:41 -04:00
Evan Laird
15b3599256 Touchup the dagger.md docs
I was going through the documentation saw that it could use some love

Test: visual
Change-Id: I837220364f63878fe5d751d000f414c01c9de419
2019-03-06 16:40:18 -05:00
Jason Monk
55fd968ac8 Add link to dagger user guide
Test: gitiles
Change-Id: I9c2ab16bf049ee1398d5761e06aa9c6f556d9722
2018-12-27 07:46:57 -05:00
Jason Monk
196d639875 Clean up DependencyProvider a bit
Create DependencyBinder which is abstract and can tell dagger how
to convert directly between interfaces and implementations without
requiring code for it.

Test: compile (which runs dagger)
Change-Id: I7013ee12d37172441e2c70cf2fe36f707975c821
2018-12-21 09:02:13 -05:00
Jason Monk
ea54e8a756 Sysui: Add support for view injection
Test: Existing tests pass
Change-Id: Ic6931ebec38ca9514e9368239dd9502ae2dee33c
2018-12-20 10:22:47 -05:00
Jason Monk
9424af7315 Add support for dagger injection with fragments
Convert NavigationBarFragment as a proof of concept and remove all
references to Dependency from NavigationBarFragment.

Test: atest SystemUITests
Change-Id: I0cdb5bc6ac455fce91e67b9e449cb7b78b1da9a4
2018-12-19 16:07:46 -05:00
Jason Monk
27d01a624d Start using some dagger 2
Early days as we start migration, so lots of duplication between
Dependency and dagger2, but can be removed when migration is done.

Test: existing tests.
Change-Id: I00c3da6ebbd46a26e512d8a7aa1e2b828e08f33f
2018-12-19 09:47:37 -05:00