Skip to content

Commit

Permalink
Dagger2 demo retrofit2 activity
Browse files Browse the repository at this point in the history
#22
- do not get @singleton in subcomponent
  • Loading branch information
eurosecom committed Jul 16, 2017
1 parent 3379ff3 commit 5604cc5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class MyActivityModule {
public MyActivityModule(DemoDaggerSubActivity activity) { this.activity = activity; }

@Provides
// do not get @Singleton in subcomponent
@MyActivityScope
SharedPreferences providesSharedPreferences(Application application) {
return PreferenceManager.getDefaultSharedPreferences(application);
Expand Down

0 comments on commit 5604cc5

Please sign in to comment.