Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strictmode fixes #413

Merged
merged 8 commits into from Jan 14, 2019
Merged

Strictmode fixes #413

merged 8 commits into from Jan 14, 2019

Conversation

fractalwrench
Copy link
Contributor

Integration branch for #409, #410, and #411

on initialisation calculateFreeDisk was indirectly invoked, which performs IO on the main thread.
This change avoids calls to getDeviceData() which would trigger these calculations, and adds getters
for the necessary fields instead. This stops StrictMode violations being reported when initialising
the SDK.
JUnit offers a RunListener, which has a method that is invoked after each test is completed.
Specifying this is preferable to using @after for teardown, as we can cancel asynchronous tasks from
one place only in this manner.
By default, we should cache the result of whether the device is rooted or not, as the result is
unlikely to change between app launches and the calculation requires IO.
@fractalwrench fractalwrench merged commit bf32e3e into master Jan 14, 2019
@fractalwrench fractalwrench deleted the strictmode-fixes branch January 14, 2019 13:22
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.

None yet

1 participant