Replace verbose @Provider with a private @Binds
The original version of the dagger code used a Provider so that the private SensitiveContentCoordinatorImpl class was not exposed as part of the public API signature (which would cause a compilation error). This change utilizes a quirk with Dagger Module "includes" where you are able to include a private Module inside of a public one. This private module is able to use the symbols private to the Kotlin file (in this case, SensitiveContentCoordinatorImpl). The downside here is that the tests have become slightly more verbose. Test: atest SensitiveContentCoordinatorTest Change-Id: I06d87e68e5b40f432bc39d1015b54c03f141fc4d
Loading
Please register or sign in to comment