Skip to content

fix: avoid android.os.strictmode.UnbufferedIoViolation (resubmission of PR #6565) #6822

New issue

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

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

Already on GitHub? # to your account

Conversation

gubatron
Copy link
Contributor

  • Wrap InputStream with BufferedInputStream to ensure buffered I/O and prevent UnbufferedIoViolation in Android 14 (SDK 34).
  • Use try-with-resources to automatically close streams, improving resource management.
  • Retain existing functionality for converting InputStream to a UTF-8 string.

This change ensures compliance with Android 14's stricter I/O policies.

@gubatron
Copy link
Contributor Author

Original Issue: #6564

@davidmotson
Copy link
Collaborator

Hi, unsure if this is a different repo than your previous PR, but remember to add the same Firebase json secret as before to get these test passing!

@gubatron
Copy link
Contributor Author

gubatron commented Apr 4, 2025

same repo, will check the settings. Perhaps I have to recreate the whole firebase secret thing again

…redInputStream

- Wrap InputStream with BufferedInputStream to ensure buffered I/O and
  prevent UnbufferedIoViolation in Android 14 (SDK 34).
- Use try-with-resources to automatically close streams, improving resource management.
- Retain existing functionality for converting InputStream to a UTF-8 string.

This change ensures compliance with Android 14's stricter I/O policies.
@gubatron gubatron force-pushed the fix/unbuffered-io-violation-android-14-resubmission branch from 46d473b to 293962b Compare April 11, 2025 15:20
@gubatron
Copy link
Contributor Author

rebased and amended commits to be signed.

@davidmotson davidmotson merged commit 19c8c7f into firebase:main Apr 15, 2025
26 of 29 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants