mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Close cursors in UploadStorageManager methods
This commit is contained in:
parent
540d123ad5
commit
aeaa422fed
1 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue