Upgrade notifications on status bar when uploading to show proper message about fails due to lack of permissions and removed FailedUploaderActivity

This commit is contained in:
jabarros 2014-07-11 11:45:15 +02:00 committed by David A. Velasco
parent a28fa921c9
commit 61c8f7f083
2 changed files with 7 additions and 1 deletions

View file

@ -270,11 +270,12 @@
<string name="network_error_connect_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
<string name="network_host_not_available">The operation couldn\'t be completed, server is unavailable</string>
<string name="forbidden_permissions">You do not have permissions %s</string>
<string name="forbidden_permissions">You do not have permission %s</string>
<string name="forbidden_permissions_rename">to rename this file</string>
<string name="forbidden_permissions_delete">to delete this file</string>
<string name="share_link_forbidden_permissions">to share this file</string>
<string name="unshare_link_forbidden_permissions">to unshare this file</string>
<string name="forbidden_permissions_create">to create the file</string>
<string name="uploader_upload_forbidden_permissions">to upload in this folder</string>
</resources>

View file

@ -69,8 +69,13 @@ public class ErrorMessageAdapter {
/*
} else if (result.getCode() == ResultCode.QUOTA_EXCEEDED) {
message = res.getString(R.string.failed_upload_quota_exceeded_text);
<<<<<<< HEAD
*/
} else if (result.getCode() == ResultCode.FORBIDDEN) {
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.uploader_upload_forbidden_permissions));
} else {
message = String.format(res.getString(R.string.uploader_upload_failed_content_single),
((UploadFileOperation) operation).getFileName());