Anki-Android
Anki-Android copied to clipboard
lint: Rule for openInputStreamSafe
Purpose / Description
Add a new Lint rule (OpenInputStreamSafeDetector) that enforces the use of openInputStreamSafe().
Fixes
- Fixes #19663
Approach
Reports the UnsafeOpenInputStream issue and provides a quick-fix to replace the call with openInputStreamSafe().
How Has This Been Tested?
Added unit tests for the same
Checklist
Please, go through these checks before submitting the PR.
- [x] You have a descriptive commit message with a short title (first line, max 50 chars).
- [x] You have commented your code, particularly in hard-to-understand areas
- [x] You have performed a self-review of your own code
- [x] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [x] UI Changes: You have tested your change using the Google Accessibility Scanner
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.
CI is failing. Comments haven't been answered