From 27232c3aa430951cde0d05c1846250eaf6385e4a Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Thu, 30 Jan 2014 14:59:49 +0100 Subject: [PATCH] Allowed override of RemoteOperation#execute(...) methods and removed RemoteOperation#retry() methods --- .../operations/common/RemoteOperation.java | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/com/owncloud/android/lib/operations/common/RemoteOperation.java b/src/com/owncloud/android/lib/operations/common/RemoteOperation.java index 44c652bf..394396be 100644 --- a/src/com/owncloud/android/lib/operations/common/RemoteOperation.java +++ b/src/com/owncloud/android/lib/operations/common/RemoteOperation.java @@ -91,7 +91,7 @@ public abstract class RemoteOperation implements Runnable { * @param context Android context for the component calling the method. * @return Result of the operation. */ - public final RemoteOperationResult execute(Account account, Context context) { + public RemoteOperationResult execute(Account account, Context context) { if (account == null) throw new IllegalArgumentException("Trying to execute a remote operation with a NULL Account"); if (context == null) @@ -116,7 +116,7 @@ public abstract class RemoteOperation implements Runnable { * @param client Client object to reach an ownCloud server during the execution of the operation. * @return Result of the operation. */ - public final RemoteOperationResult execute(OwnCloudClient client) { + public RemoteOperationResult execute(OwnCloudClient client) { if (client == null) throw new IllegalArgumentException("Trying to execute a remote operation with a NULL OwnCloudClient"); mClient = client; @@ -135,7 +135,7 @@ public abstract class RemoteOperation implements Runnable { * @param listenerHandler Handler associated to the thread where the methods of the listener objects must be called. * @return Thread were the remote operation is executed. */ - public final Thread execute(Account account, Context context, OnRemoteOperationListener listener, Handler listenerHandler, Activity callerActivity) { + public Thread execute(Account account, Context context, OnRemoteOperationListener listener, Handler listenerHandler, Activity callerActivity) { if (account == null) throw new IllegalArgumentException("Trying to execute a remote operation with a NULL Account"); if (context == null) @@ -163,7 +163,7 @@ public abstract class RemoteOperation implements Runnable { * @param listenerHandler Handler associated to the thread where the methods of the listener objects must be called. * @return Thread were the remote operation is executed. */ - public final Thread execute(OwnCloudClient client, OnRemoteOperationListener listener, Handler listenerHandler) { + public Thread execute(OwnCloudClient client, OnRemoteOperationListener listener, Handler listenerHandler) { if (client == null) { throw new IllegalArgumentException("Trying to execute a remote operation with a NULL OwnCloudClient"); } @@ -184,29 +184,6 @@ public abstract class RemoteOperation implements Runnable { return runnerThread; } - /** - * Synchronously retries the remote operation using the same OwnCloudClient in the last call to {@link RemoteOperation#execute(OwnCloudClient)} - * - * @param listener Listener to be notified about the execution of the operation. - * @param listenerHandler Handler associated to the thread where the methods of the listener objects must be called. - * @return Thread were the remote operation is executed. - */ - public final RemoteOperationResult retry() { - return execute(mClient); - } - - /** - * Asynchronously retries the remote operation using the same OwnCloudClient in the last call to {@link RemoteOperation#execute(OwnCloudClient, OnRemoteOperationListener, Handler)} - * - * @param listener Listener to be notified about the execution of the operation. - * @param listenerHandler Handler associated to the thread where the methods of the listener objects must be called. - * @return Thread were the remote operation is executed. - */ - public final Thread retry(OnRemoteOperationListener listener, Handler listenerHandler) { - return execute(mClient, listener, listenerHandler); - } - - /** * Asynchronous execution of the operation * started by {@link RemoteOperation#execute(OwnCloudClient, OnRemoteOperationListener, Handler)},