Fix up request

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-29 10:18:10 +01:00
parent 4880e783bf
commit 18ad2d858b

View file

@ -26,6 +26,7 @@ import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.support.annotation.Nullable;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.db.OCUpload;
@ -322,7 +323,7 @@ public class UploadsStorageManager extends Observable {
}
private OCUpload[] getUploads(String selection, String[] selectionArgs) {
private OCUpload[] getUploads(String selection, @Nullable String[] selectionArgs) {
OCUpload[] list;
Cursor c = getDB().query(
@ -411,9 +412,8 @@ public class UploadsStorageManager extends Observable {
* Get all failed uploads.
*/
public OCUpload[] getFailedUploads() {
return getUploads(
ProviderTableMeta.UPLOADS_STATUS + "==" + UploadStatus.UPLOAD_FAILED.value, null);
return getUploads(ProviderTableMeta.UPLOADS_STATUS + "== ?", new String[]{String.valueOf(UploadStatus.UPLOAD_FAILED
.value)});
}
public OCUpload[] getFinishedUploadsForCurrentAccount() {