Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pipeline:
test:
image: nextcloudci/android:android-32
image: nextcloudci/android:android-35
commands:
# uncomment gplay for Gplay, Modified only
- sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/.*com.google.*/s/^.*\\/\\///g' build.gradle; fi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,17 @@ public OCUpload[] getCurrentAndPendingUploadsForCurrentAccount() {
* Get all failed uploads.
*/
public OCUpload[] getFailedUploads() {
return getUploads(ProviderTableMeta.UPLOADS_STATUS + "== ?" +
return getUploads("(" + ProviderTableMeta.UPLOADS_STATUS + "== ?" +
" OR " + ProviderTableMeta.UPLOADS_LAST_RESULT +
"==" + UploadResult.DELAYED_FOR_WIFI.getValue() +
" OR " + ProviderTableMeta.UPLOADS_LAST_RESULT +
"==" + UploadResult.LOCK_FAILED.getValue() +
" OR " + ProviderTableMeta.UPLOADS_LAST_RESULT +
"==" + UploadResult.DELAYED_FOR_CHARGING.getValue() +
" OR " + ProviderTableMeta.UPLOADS_LAST_RESULT +
"==" + UploadResult.DELAYED_IN_POWER_SAVE_MODE.getValue()
"==" + UploadResult.DELAYED_IN_POWER_SAVE_MODE.getValue() +
" ) AND " + ProviderTableMeta.UPLOADS_LAST_RESULT +
"!= " + UploadResult.VIRUS_DETECTED.getValue()
, new String[]{String.valueOf(UploadStatus.UPLOAD_FAILED.value)});
}

Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/owncloud/android/db/UploadResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public enum UploadResult {
MAINTENANCE_MODE(12),
LOCK_FAILED(13),
DELAYED_IN_POWER_SAVE_MODE(14),
SSL_RECOVERABLE_PEER_UNVERIFIED(15);
SSL_RECOVERABLE_PEER_UNVERIFIED(15),
VIRUS_DETECTED(16);

private final int value;

Expand Down Expand Up @@ -86,6 +87,8 @@ public static UploadResult fromValue(int value) {
return DELAYED_IN_POWER_SAVE_MODE;
case 15:
return SSL_RECOVERABLE_PEER_UNVERIFIED;
case 16:
return VIRUS_DETECTED;
}
return null;
}
Expand Down Expand Up @@ -134,9 +137,10 @@ public static UploadResult fromOperationResult(RemoteOperationResult result) {
return UNKNOWN;
case LOCK_FAILED:
return LOCK_FAILED;
case VIRUS_DETECTED:
return VIRUS_DETECTED;
default:
return UNKNOWN;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ private String getStatusText(OCUpload upload) {
status = mParentActivity.getString(
R.string.uploads_view_upload_status_waiting_exit_power_save_mode);
break;
case VIRUS_DETECTED:
status = mParentActivity.getString(R.string.uploads_view_upload_status_virus_detected);
break;
default:
status = "New fail result but no description for the user";
break;
Expand Down
1 change: 1 addition & 0 deletions src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -783,4 +783,5 @@
<string name="upload_files">Upload files</string>
<string name="upload_content_from_other_apps">Upload content from other apps</string>
<string name="create_new_folder">Create new folder</string>
<string name="uploads_view_upload_status_virus_detected">Virus detected. Upload cannot be completed!</string>
</resources>