Skip to content

Injecting shared prefs uses activity when not available #137

@dbachelder

Description

@dbachelder

I am attempting to inject SharedPreferences into a @Provides method in my Module but it's generating this broken code:

PreferenceManager.getDefaultSharedPreferences(this.getActivity())

when it should be reaching for the application scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions