Allow Services to be created through Dagger.
This is a significant change that allows Services to have their constructed injected into. This change includes DozeService as an example, injecting the FalsingManager into its constructor. Bug: 136279712 Test: atest SystemUITests Change-Id: Ib58f8763c996fbc2aea07ead56493d2d9e936f5b
This commit is contained in:
@@ -53,7 +53,7 @@ variants (like other form factors e.g. Car).
|
||||
### Adding injection to a new SystemUI object
|
||||
|
||||
Anything that depends on any `@Singleton` provider from SystemUIRootComponent
|
||||
should be declared as an `@Subcomponent` of the root component, this requires
|
||||
should be declared as a `@Subcomponent` of the root component. This requires
|
||||
declaring your own interface for generating your own modules or just the
|
||||
object you need injected. The subcomponent also needs to be added to
|
||||
SystemUIRootComponent in SystemUIFactory so it can be acquired.
|
||||
@@ -204,6 +204,13 @@ public CustomView(@Named(VIEW_CONTEXT) Context themedViewContext, AttributeSet a
|
||||
}
|
||||
```
|
||||
|
||||
## Updating Dagger2
|
||||
|
||||
Binaries can be downloaded from https://repo1.maven.org/maven2/com/google/dagger/ and then loaded
|
||||
into
|
||||
[/prebuilts/tools/common/m2/repository/com/google/dagger/](http://cs/android/prebuilts/tools/common/m2/repository/com/google/dagger/)
|
||||
|
||||
|
||||
## TODO List
|
||||
|
||||
- Eliminate usages of Dependency#get
|
||||
|
||||
Reference in New Issue
Block a user