From 508a326b5a9a09bc7c8c31617db00f16c86b3abb Mon Sep 17 00:00:00 2001 From: Tim Su Date: Tue, 14 Feb 2012 01:17:58 -0800 Subject: [PATCH] Stop calling close on a managed cursor --- .../com/todoroo/astrid/actfm/ActFmCameraModule.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmCameraModule.java b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmCameraModule.java index b857832de..33633dc5c 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmCameraModule.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmCameraModule.java @@ -137,14 +137,10 @@ public class ActFmCameraModule { String path; if(cursor != null) { - try { - int column_index = cursor - .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); - cursor.moveToFirst(); - path = cursor.getString(column_index); - } finally { - cursor.close(); - } + int column_index = cursor + .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); + cursor.moveToFirst(); + path = cursor.getString(column_index); } else { path = uri.getPath(); }