[
https://issues.apache.org/jira/browse/CB-4633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13744801#comment-13744801
]
Aliceljm.liu commented on CB-4633:
----------------------------------
I edit the code like this ,it run ok
private void checkForDuplicateImage(int type) {
int diff = 1;
Uri contentStore = whichContentStore();
Cursor cursor = queryImgDB(contentStore);
int currentNumOfImages = cursor.getCount();
if (type == FILE_URI && this.saveToPhotoAlbum) {
diff = 2;
}
// delete the duplicate file if the difference is 2 for file URI or 1
for Data URL
if ((currentNumOfImages - numPics) == diff) {
cursor.moveToLast();
int id =
Integer.valueOf(cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media._ID)));
if (diff == 2) {
id--;
}
Uri uri = Uri.parse(contentStore + "/" + id);
this.cordova.getActivity().getContentResolver().delete(uri, null,
null);
cursor.close();
}
}
> org.apache.cordova.CameraLauncher.checkForDuplicateImage Shold close the
> cursor
> -------------------------------------------------------------------------------
>
> Key: CB-4633
> URL: https://issues.apache.org/jira/browse/CB-4633
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 3.0.0
> Environment: win7 android4.0 phonegap3.0
> Reporter: Aliceljm.liu
> Assignee: Joe Bowser
>
> When i use the FileTransfer to upload a camera picture the eclipse logcat
> show that。 error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira