From: jabarros Date: Fri, 11 Jul 2014 09:45:15 +0000 (+0200) Subject: Upgrade notifications on status bar when uploading to show proper message about fails... X-Git-Tag: oc-android-1.7.0_signed~245^2~3 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/61c8f7f0830db4da9654d9644151df7412247e62?ds=inline;hp=--cc Upgrade notifications on status bar when uploading to show proper message about fails due to lack of permissions and removed FailedUploaderActivity --- 61c8f7f0830db4da9654d9644151df7412247e62 diff --git a/res/values/strings.xml b/res/values/strings.xml index 42743bff..e66c2d16 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -270,11 +270,12 @@ An error occurred while waiting for the server, the operation couldn\'t have been done The operation couldn\'t be completed, server is unavailable - You do not have permissions %s + You do not have permission %s to rename this file to delete this file to share this file to unshare this file to create the file + to upload in this folder diff --git a/src/com/owncloud/android/utils/ErrorMessageAdapter.java b/src/com/owncloud/android/utils/ErrorMessageAdapter.java index ec0ddd8b..25a0dfeb 100644 --- a/src/com/owncloud/android/utils/ErrorMessageAdapter.java +++ b/src/com/owncloud/android/utils/ErrorMessageAdapter.java @@ -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());