Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7636d9e0 authored by jabarros's avatar jabarros Committed by David A. Velasco
Browse files

Update ErrorMessageAdapter class to generate appropiate error messages for...

Update ErrorMessageAdapter class to generate appropiate error messages for operations failed due to lack of permissions (ResultCode.FORBIDDEN)
parent 0862c66b
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,8 @@ public class RemoteOperationResult implements Serializable {
        INVALID_CHARACTER_IN_NAME,
        INVALID_CHARACTER_IN_NAME,
        SHARE_NOT_FOUND,
        SHARE_NOT_FOUND,
		LOCAL_STORAGE_NOT_REMOVED,
		LOCAL_STORAGE_NOT_REMOVED,
		FORBIDDEN
		FORBIDDEN,
		SHARE_FORBIDDEN
    }
    }


    private boolean mSuccess = false;
    private boolean mSuccess = false;
+3 −0
Original line number Original line Diff line number Diff line
@@ -142,6 +142,9 @@ public class CreateRemoteShareOperation extends RemoteOperation {
				} else if (xmlParser.isFileNotFound()){
				} else if (xmlParser.isFileNotFound()){
					result = new RemoteOperationResult(ResultCode.SHARE_NOT_FOUND);
					result = new RemoteOperationResult(ResultCode.SHARE_NOT_FOUND);
					
					
				} else if (xmlParser.isFailure()) {
					result = new RemoteOperationResult(ResultCode.SHARE_FORBIDDEN);

				} else {
				} else {
					result = new RemoteOperationResult(false, status, post.getResponseHeaders());	
					result = new RemoteOperationResult(false, status, post.getResponseHeaders());	
				}
				}