Skip to content

Commit

Permalink
Merge pull request #4627 from andrew659/develop
Browse files Browse the repository at this point in the history
fixed database cursor leaks
  • Loading branch information
nbradbury authored Oct 27, 2016
2 parents f3200df + 6fcfadb commit 5503849
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ public static Uri getLastRecordedVideoUri(Activity activity) {
CursorLoader loader = new CursorLoader(activity, contentUri, proj, null, null, sortOrder);
Cursor cursor = loader.loadInBackground();
cursor.moveToFirst();
long value = cursor.getLong(0);
SqlUtils.closeCursor(cursor);

return Uri.parse(contentUri.toString() + "/" + cursor.getLong(0));
return Uri.parse(contentUri.toString() + "/" + value);
}

/**
Expand Down

0 comments on commit 5503849

Please sign in to comment.