Skip to content

Avoid storing reference to ApplicationContext #3530

@cmelchior

Description

@cmelchior

Right now we store a reference in the ApplicationContext which should be avoided due to InstantRun.

Instead we could:

  • Just get the reference to context.getFilesDir() and save that
  • get AssetManager and save that
  • Register the network receiver on init() without saving the context

I don't think we use it for anything else, but this approach would also work for any future additions.

Perhaps we could wrap it in a AndroidContext<Wrapper/Facade/Mediator> class ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions