Swati4star / Images-to-PDF

An app to convert images to PDF file!
GNU General Public License v3.0
1.17k stars 790 forks source link

Refactor onActivityResult() method to handle NullPointerExceptions #1117

Closed Giulia9999 closed 1 year ago

Giulia9999 commented 1 year ago

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.

Checklist:

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit 648d5a10 and detected 0 issues on this pull request.

View more on Code Climate.

Swati4star commented 1 year ago

There are merge conflicts. Can you fetch the latest and update the changes accordingly?