Skip to content
This repository was archived by the owner on Sep 10, 2020. It is now read-only.

Fix referencing TileService on older devices.#172

Open
NightlyNexus wants to merge 2 commits intoJakeWharton:masterfrom
NightlyNexus:eric.2018-02-08.fixy
Open

Fix referencing TileService on older devices.#172
NightlyNexus wants to merge 2 commits intoJakeWharton:masterfrom
NightlyNexus:eric.2018-02-08.fixy

Conversation

@NightlyNexus
Copy link
Contributor

Use a different component for 24+, and only reference this component on 24+.

Fixes #166.

interface Component {
void inject(TelecineApplication app);

DispatchingAndroidInjector<Service> injector();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is such a neat trick that Ron pointed out!

}

@dagger.Module
abstract class Module {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the saddest part i see. this module is unused, and i don't know if there's anything to do about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, let's not reference the generated module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(i used to be doing @Subcomponent(modules = TelecineTileService_Module_ContributeTelecineTileService.class).)

Use a different component for 24+, and only reference this component on 24+.
@NightlyNexus
Copy link
Contributor Author

for future searchers, you can use strings instead of classes for the keys as of Dagger 2.17 with the flag -Adagger.android.experimentalUseStringKeys.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant