Skip to content

Allow Volley.newRequestQueue() to be called on main thread#274

Merged
jpd236 merged 6 commits intogoogle:masterfrom
Poligun:master
May 30, 2019
Merged

Allow Volley.newRequestQueue() to be called on main thread#274
jpd236 merged 6 commits intogoogle:masterfrom
Poligun:master

Conversation

@Poligun
Copy link
Copy Markdown
Contributor

@Poligun Poligun commented May 30, 2019

Currently the helper method calls context.getCacheDir() synchronously and causes strict mode violation when invoked on main thread. By using a supplier instead we can have it constructed lazily on the dispatcher's thread.

Poligun added 4 commits April 6, 2019 01:20
…structed lazily (and preferably within the initialize() method which is invoked by CacheDispatcher on a non-UI thread). Currently Volley.newRequestQueue() is causing strict mode violation when called on main thread.
Copy link
Copy Markdown
Collaborator

@jpd236 jpd236 left a comment

Choose a reason for hiding this comment

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

Generally this concept looks reasonable to me. Just a small suggestion for simplification.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants