Skip to content

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

Merged
davidmotson merged 3 commits into
firebase:mainfrom
gubatron:fix/unbuffered-io-violation-android-14-resubmission
Apr 15, 2025
Merged

fix: avoid android.os.strictmode.UnbufferedIoViolation (resubmission of PR #6565)#6822
davidmotson merged 3 commits into
firebase:mainfrom
gubatron:fix/unbuffered-io-violation-android-14-resubmission

Conversation

@gubatron

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Original Issue: #6564

@davidmotson

Copy link
Copy Markdown
Contributor

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

gubatron commented Apr 4, 2025

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

rebased and amended commits to be signed.

@davidmotson davidmotson merged commit 19c8c7f into firebase:main Apr 15, 2025
@gubatron gubatron deleted the fix/unbuffered-io-violation-android-14-resubmission branch April 21, 2025 22:56
@firebase firebase locked and limited conversation to collaborators May 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants