This commit rewrites the onActivityResult() method in order to handle possible NullPointerExceptions that can occur when accessing data.getData(). The changes include adding try-catch blocks to handle exceptions gracefully and prevent app crashes. Additionally, comments have been added to the method to explain what each block of code is doing.
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
If there are any UI change, please include the screenshots also.
Fixes #1117
Type of change
Just put an x in the [] which are valid.
[ x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
[ ] ./gradlew assembleDebug assembleRelease
[ ] ./gradlew checkstyle
Checklist:
[ ] My code follows the style guidelines of this project
[ x] I have performed a self-review of my own code
[ x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
This commit rewrites the onActivityResult() method in order to handle possible NullPointerExceptions that can occur when accessing data.getData(). The changes include adding try-catch blocks to handle exceptions gracefully and prevent app crashes. Additionally, comments have been added to the method to explain what each block of code is doing.
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change. If there are any UI change, please include the screenshots also.
Fixes #1117
Type of change
Just put an x in the [] which are valid.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
./gradlew assembleDebug assembleRelease
./gradlew checkstyle
Checklist: