-
Notifications
You must be signed in to change notification settings - Fork 549
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
Aws S3 StrictMode policy violation #603
Comments
Hello @niqo01 Thanks for reporting this issue. We will look into this. Thanks, |
Hello @niqo01 Is it possible to provide a code snippet of how you are using the S3 library in your application? In the SDK we try to not create extra threads and use the ones which are available. Thanks, |
@niqo01 Sorry for the delayed response. The following code from // invoke on main thread
mainHandler.post(new Runnable() {
@Override
public void run() {
for (final TransferListener l : list) {
l.onStateChanged(id, newState);
}
// remove all LISTENERS when the transfer is in a final state so
// as to release resources ASAP.
if (TransferState.COMPLETED.equals(newState)
|| TransferState.FAILED.equals(newState)
|| TransferState.CANCELED.equals(newState)) {
list.clear();
}
if (TransferState.COMPLETED.equals(newState)) {
removeTransferRecordFromDB(id);
}
}
}); However as you pointed out, we are doing a disk operation to remove the transfer record from the database in the main handler. I am working on to move this disk operation outside the main thread. Will post an update once the fix is made. Thank you for bringing this to our attention. |
@niqo01 This issue has been fixed in the version |
Closing this issue as there is no activity and the bug fix is released. Please open a new issue if you are still encountering problems. |
Thank you for pointing this issue. We have fixed it. If you still encounter a new problem in the latest SDK, please feel free to open a new issue, |
Describe the bug
The AWS S3 SDK is doing IO operation on the main thread which is reported by strict mode
To Reproduce
Steps to reproduce the behavior:
'client': "com.amazonaws:aws-android-sdk-mobile-client:2.8.5",
's3': "com.amazonaws:aws-android-sdk-s3:2.8.5"
Which AWS service(s) are affected?
Aws S3 SDK
Expected behavior
No warning using strictmode
Screenshots
If applicable, add screenshots to help explain your problem.
Environment(please complete the following information):
'client': "com.amazonaws:aws-android-sdk-mobile-client:2.8.5",
's3': "com.amazonaws:aws-android-sdk-s3:2.8.5"
The text was updated successfully, but these errors were encountered: