AmazeFileManager
AmazeFileManager copied to clipboard
Fix the fromContentUri null/short path causes substring crash
Description
- Implemented null-safety for
uri.getPath() - Added validation of the expected provider prefix before performing any substring operations to avoid unsafe assumptions about URI structure.
- Added
fallbackbehaviour for unexpected or short paths & improvedlogging - Prevented
crasheswhen the constructed file does not exist
Issue tracker
Fixes #4477
Automatic tests
- [ ] Added test cases
Manual tests
- [ ] Done
Build tasks success
Successfully running following tasks on local:
- [x]
./gradlew assembledebug - [x]
./gradlew spotlessCheck