Close cursors in UploadStorageManager methods

This commit is contained in:
masensio 2015-12-29 13:22:31 +01:00
parent 540d123ad5
commit aeaa422fed

View file

@ -186,8 +186,13 @@ public class UploadsStorageManager extends Observable {
} else {
Log_OC.e(TAG, "Failed to update upload db.");
}
c.close();
return r;
}
c.close();
return 0;
}
/**
@ -212,6 +217,9 @@ public class UploadsStorageManager extends Observable {
if (c.getCount() != 1) {
Log_OC.e(TAG, c.getCount() + " items for path=" + filepath
+ " available in UploadDb. Expected 1. Failed to update upload db.");
c.close();
return 0;
}
return updateUploadInternal(c, status, result);
@ -278,6 +286,9 @@ public class UploadsStorageManager extends Observable {
}
} while (c.moveToNext());
}
c.close();
return list;
}
@ -295,6 +306,8 @@ public class UploadsStorageManager extends Observable {
file = createFileInstance(c);
}
c.close();
return file;
}