manstie opened a new pull request #775:
URL: https://github.com/apache/cordova-plugin-camera/pull/775


   ### Platforms affected
   
   Android
   
   ### Motivation and Context
   
   - "W/System: A resource failed to call close" is logged whenever a Cursor 
object is left unclosed in this file.
   - `android.content.ContentResolver.query` returns:
   ```
   A Cursor object, which is positioned before the first entry. May return null 
if the underlying content provider returns null, or if it crashes.
   ```
   So we should check for `null` Cursors after running `queryImgDB`
   
   ### Description
   
   - Added null checks before running functions on Cursor objects.
   - Close all cursor objects after they have been created and used.
   
   ### Testing
   
   I ran an app using this plugin in debug mode through Android Studio and 
confirmed the warnings no longer appear after these changes have been made.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to