mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #4137 from nextcloud/renameRemote
Use new convention "xyRemoteOperation"
This commit is contained in:
commit
b53018a86e
19 changed files with 60 additions and 63 deletions
|
@ -40,7 +40,7 @@ import com.owncloud.android.lib.common.UserInfo;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
@ -217,7 +217,7 @@ public class UserAccountManagerImpl implements UserAccountManager {
|
|||
Account[] ocAccounts = accountManager.getAccountsByType(MainApp.getAccountType(context));
|
||||
String userId;
|
||||
String displayName;
|
||||
GetRemoteUserInfoOperation remoteUserNameOperation = new GetRemoteUserInfoOperation();
|
||||
GetUserInfoRemoteOperation remoteUserNameOperation = new GetUserInfoRemoteOperation();
|
||||
|
||||
for (Account account : ocAccounts) {
|
||||
String storedUserId = accountManager.getUserData(account, com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID);
|
||||
|
|
|
@ -110,7 +110,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
import com.owncloud.android.operations.DetectAuthenticationMethodOperation.AuthenticationMethod;
|
||||
import com.owncloud.android.operations.GetServerInfoOperation;
|
||||
import com.owncloud.android.services.OperationsService;
|
||||
|
@ -1172,7 +1172,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
} // else nothing ; only the last check operation is considered;
|
||||
// multiple can be started if the user amends a URL quickly
|
||||
|
||||
} else if (operation instanceof GetRemoteUserInfoOperation) {
|
||||
} else if (operation instanceof GetUserInfoRemoteOperation) {
|
||||
onGetUserNameFinish(result);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.owncloud.android.lib.common.OwnCloudCredentials;
|
|||
import com.owncloud.android.lib.common.network.RedirectionPath;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class AuthenticatorAsyncTask extends AsyncTask<Object, Void, RemoteOpera
|
|||
|
||||
// Operation - get display name
|
||||
if (result.isSuccess()) {
|
||||
GetRemoteUserInfoOperation remoteUserNameOperation = new GetRemoteUserInfoOperation();
|
||||
GetUserInfoRemoteOperation remoteUserNameOperation = new GetUserInfoRemoteOperation();
|
||||
result = remoteUserNameOperation.execute(client);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ import com.owncloud.android.lib.common.OwnCloudClient;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.files.FileUtils;
|
||||
import com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation;
|
||||
import com.owncloud.android.lib.resources.shares.CreateShareRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetSharesForFileRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
@ -50,7 +50,7 @@ public class CreateShareViaLinkOperation extends SyncOperation {
|
|||
@Override
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
// Check if the share link already exists
|
||||
RemoteOperation operation = new GetRemoteSharesForFileOperation(path, false, false);
|
||||
RemoteOperation operation = new GetSharesForFileRemoteOperation(path, false, false);
|
||||
RemoteOperationResult result = operation.execute(client);
|
||||
|
||||
// Create public link if doesn't exist yet
|
||||
|
@ -66,7 +66,7 @@ public class CreateShareViaLinkOperation extends SyncOperation {
|
|||
}
|
||||
}
|
||||
if (!publicShareExists) {
|
||||
CreateRemoteShareOperation createOp = new CreateRemoteShareOperation(
|
||||
CreateShareRemoteOperation createOp = new CreateShareRemoteOperation(
|
||||
path,
|
||||
ShareType.PUBLIC_LINK,
|
||||
"",
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.owncloud.android.datamodel.OCFile;
|
|||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.files.FileUtils;
|
||||
import com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.CreateShareRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
@ -75,7 +75,7 @@ public class CreateShareWithShareeOperation extends SyncOperation {
|
|||
@Override
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
|
||||
CreateRemoteShareOperation operation = new CreateRemoteShareOperation(
|
||||
CreateShareRemoteOperation operation = new CreateShareRemoteOperation(
|
||||
path,
|
||||
shareType,
|
||||
shareeName,
|
||||
|
|
|
@ -21,7 +21,7 @@ package com.owncloud.android.operations;
|
|||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.status.GetRemoteCapabilitiesOperation;
|
||||
import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.status.OCCapability;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class GetCapabilitiesOperation extends SyncOperation {
|
|||
|
||||
@Override
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
GetRemoteCapabilitiesOperation getCapabilities = new GetRemoteCapabilitiesOperation();
|
||||
GetCapabilitiesRemoteOperation getCapabilities = new GetCapabilitiesRemoteOperation();
|
||||
RemoteOperationResult result = getCapabilities.execute(client);
|
||||
|
||||
if (result.isSuccess()
|
||||
|
|
|
@ -29,7 +29,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperation;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.status.GetRemoteStatusOperation;
|
||||
import com.owncloud.android.lib.resources.status.GetStatusRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.operations.DetectAuthenticationMethodOperation.AuthenticationMethod;
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class GetServerInfoOperation extends RemoteOperation {
|
|||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
|
||||
// first: check the status of the server (including its version)
|
||||
GetRemoteStatusOperation getStatus = new GetRemoteStatusOperation(mContext);
|
||||
GetStatusRemoteOperation getStatus = new GetStatusRemoteOperation(mContext);
|
||||
|
||||
RemoteOperationResult result = getStatus.execute(client);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.owncloud.android.operations;
|
|||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetSharesForFileRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
|
@ -34,16 +34,16 @@ import java.util.ArrayList;
|
|||
* Provide a list shares for a specific file.
|
||||
*/
|
||||
public class GetSharesForFileOperation extends SyncOperation {
|
||||
|
||||
|
||||
private static final String TAG = GetSharesForFileOperation.class.getSimpleName();
|
||||
|
||||
|
||||
private String mPath;
|
||||
private boolean mReshares;
|
||||
private boolean mSubfiles;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*
|
||||
* @param path Path to file or folder
|
||||
* @param reshares If set to false (default), only shares from the current user are returned
|
||||
* If set to true, all shares from the given file are returned
|
||||
|
@ -58,8 +58,8 @@ public class GetSharesForFileOperation extends SyncOperation {
|
|||
|
||||
@Override
|
||||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
GetRemoteSharesForFileOperation operation = new GetRemoteSharesForFileOperation(mPath,
|
||||
mReshares, mSubfiles);
|
||||
GetSharesForFileRemoteOperation operation = new GetSharesForFileRemoteOperation(mPath,
|
||||
mReshares, mSubfiles);
|
||||
RemoteOperationResult result = operation.execute(client);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.owncloud.android.lib.common.OwnCloudClient;
|
|||
import com.owncloud.android.lib.common.UserInfo;
|
||||
import com.owncloud.android.lib.common.accounts.AccountUtils;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ public class GetUserProfileOperation extends SyncOperation {
|
|||
protected RemoteOperationResult run(OwnCloudClient client) {
|
||||
|
||||
// get display name
|
||||
GetRemoteUserInfoOperation getDisplayName = new GetRemoteUserInfoOperation();
|
||||
GetUserInfoRemoteOperation getDisplayName = new GetUserInfoRemoteOperation();
|
||||
RemoteOperationResult result = getDisplayName.execute(client);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
|
|||
import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.files.model.RemoteFile;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetSharesForFileRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.syncadapter.FileSyncAdapter;
|
||||
|
@ -567,8 +567,8 @@ public class RefreshFolderOperation extends RemoteOperation {
|
|||
RemoteOperationResult result;
|
||||
|
||||
// remote request
|
||||
GetRemoteSharesForFileOperation operation =
|
||||
new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), true, true);
|
||||
GetSharesForFileRemoteOperation operation =
|
||||
new GetSharesForFileRemoteOperation(mLocalFolder.getRemotePath(), true, true);
|
||||
result = operation.execute(client);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCo
|
|||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.RemoveRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.RemoveShareRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
|
@ -68,8 +68,8 @@ public class UnshareOperation extends SyncOperation {
|
|||
|
||||
if (share != null) {
|
||||
OCFile file = getStorageManager().getFileByPath(mRemotePath);
|
||||
RemoveRemoteShareOperation operation =
|
||||
new RemoveRemoteShareOperation((int) share.getRemoteId());
|
||||
RemoveShareRemoteOperation operation =
|
||||
new RemoveShareRemoteOperation((int) share.getRemoteId());
|
||||
result = operation.execute(client);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
|
|
@ -24,9 +24,9 @@ package com.owncloud.android.operations;
|
|||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetShareRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.UpdateRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.UpdateShareRemoteOperation;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
|
||||
|
@ -52,12 +52,12 @@ public class UpdateNoteForShareOperation extends SyncOperation {
|
|||
return new RemoteOperationResult(RemoteOperationResult.ResultCode.SHARE_NOT_FOUND);
|
||||
}
|
||||
|
||||
UpdateRemoteShareOperation updateOperation = new UpdateRemoteShareOperation(share.getRemoteId());
|
||||
UpdateShareRemoteOperation updateOperation = new UpdateShareRemoteOperation(share.getRemoteId());
|
||||
updateOperation.setNote(note);
|
||||
RemoteOperationResult result = updateOperation.execute(client);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
RemoteOperation getShareOp = new GetRemoteShareOperation(share.getRemoteId());
|
||||
RemoteOperation getShareOp = new GetShareRemoteOperation(share.getRemoteId());
|
||||
result = getShareOp.execute(client);
|
||||
if (result.isSuccess()) {
|
||||
getStorageManager().saveShare((OCShare) result.getData().get(0));
|
||||
|
|
|
@ -27,9 +27,9 @@ import com.owncloud.android.lib.common.OwnCloudClient;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.files.FileUtils;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetShareRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.UpdateRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.UpdateShareRemoteOperation;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -72,14 +72,14 @@ public class UpdateSharePermissionsOperation extends SyncOperation {
|
|||
path = share.getPath();
|
||||
|
||||
// Update remote share with password
|
||||
UpdateRemoteShareOperation updateOp = new UpdateRemoteShareOperation(share.getRemoteId());
|
||||
UpdateShareRemoteOperation updateOp = new UpdateShareRemoteOperation(share.getRemoteId());
|
||||
updateOp.setPassword(password);
|
||||
updateOp.setPermissions(permissions);
|
||||
updateOp.setExpirationDate(expirationDateInMillis);
|
||||
RemoteOperationResult result = updateOp.execute(client);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
RemoteOperation getShareOp = new GetRemoteShareOperation(share.getRemoteId());
|
||||
RemoteOperation getShareOp = new GetShareRemoteOperation(share.getRemoteId());
|
||||
result = getShareOp.execute(client);
|
||||
if (result.isSuccess()) {
|
||||
share = (OCShare) result.getData().get(0);
|
||||
|
|
|
@ -25,10 +25,10 @@ import com.owncloud.android.lib.common.OwnCloudClient;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.resources.files.FileUtils;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetShareRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.lib.resources.shares.UpdateRemoteShareOperation;
|
||||
import com.owncloud.android.lib.resources.shares.UpdateShareRemoteOperation;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -67,7 +67,7 @@ public class UpdateShareViaLinkOperation extends SyncOperation {
|
|||
return new RemoteOperationResult(RemoteOperationResult.ResultCode.SHARE_NOT_FOUND);
|
||||
}
|
||||
|
||||
UpdateRemoteShareOperation updateOp = new UpdateRemoteShareOperation(publicShare.getRemoteId());
|
||||
UpdateShareRemoteOperation updateOp = new UpdateShareRemoteOperation(publicShare.getRemoteId());
|
||||
updateOp.setPassword(password);
|
||||
updateOp.setExpirationDate(expirationDateInMillis);
|
||||
updateOp.setPublicUploadOnFolder(publicUploadOnFolder);
|
||||
|
@ -77,7 +77,7 @@ public class UpdateShareViaLinkOperation extends SyncOperation {
|
|||
|
||||
if (result.isSuccess()) {
|
||||
// Retrieve updated share / save directly with password? -> no; the password is not to be saved
|
||||
RemoteOperation getShareOp = new GetRemoteShareOperation(publicShare.getRemoteId());
|
||||
RemoteOperation getShareOp = new GetShareRemoteOperation(publicShare.getRemoteId());
|
||||
result = getShareOp.execute(client);
|
||||
if (result.isSuccess()) {
|
||||
OCShare share = (OCShare) result.getData().get(0);
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.owncloud.android.R;
|
|||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteShareesOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetShareesRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
|
||||
|
@ -189,7 +189,7 @@ public class UsersAndGroupsSearchProvider extends ContentProvider {
|
|||
String userQuery = lastPathSegment.toLowerCase(Locale.ROOT);
|
||||
|
||||
// request to the OC server about users and groups matching userQuery
|
||||
GetRemoteShareesOperation searchRequest = new GetRemoteShareesOperation(userQuery, REQUESTED_PAGE,
|
||||
GetShareesRemoteOperation searchRequest = new GetShareesRemoteOperation(userQuery, REQUESTED_PAGE,
|
||||
RESULTS_PER_PAGE);
|
||||
RemoteOperationResult result = searchRequest.execute(account, getContext());
|
||||
List<JSONObject> names = new ArrayList<>();
|
||||
|
@ -232,10 +232,10 @@ public class UsersAndGroupsSearchProvider extends ContentProvider {
|
|||
item = namesIt.next();
|
||||
dataUri = null;
|
||||
displayName = null;
|
||||
String userName = item.getString(GetRemoteShareesOperation.PROPERTY_LABEL);
|
||||
JSONObject value = item.getJSONObject(GetRemoteShareesOperation.NODE_VALUE);
|
||||
ShareType type = ShareType.fromValue(value.getInt(GetRemoteShareesOperation.PROPERTY_SHARE_TYPE));
|
||||
String shareWith = value.getString(GetRemoteShareesOperation.PROPERTY_SHARE_WITH);
|
||||
String userName = item.getString(GetShareesRemoteOperation.PROPERTY_LABEL);
|
||||
JSONObject value = item.getJSONObject(GetShareesRemoteOperation.NODE_VALUE);
|
||||
ShareType type = ShareType.fromValue(value.getInt(GetShareesRemoteOperation.PROPERTY_SHARE_TYPE));
|
||||
String shareWith = value.getString(GetShareesRemoteOperation.PROPERTY_SHARE_WITH);
|
||||
|
||||
switch (type) {
|
||||
case GROUP:
|
||||
|
|
|
@ -54,7 +54,7 @@ import com.owncloud.android.lib.resources.files.RestoreFileVersionRemoteOperatio
|
|||
import com.owncloud.android.lib.resources.files.model.FileVersion;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
import com.owncloud.android.operations.CheckCurrentCredentialsOperation;
|
||||
import com.owncloud.android.operations.CopyFileOperation;
|
||||
import com.owncloud.android.operations.CreateFolderOperation;
|
||||
|
@ -641,7 +641,7 @@ public class OperationsService extends Service {
|
|||
break;
|
||||
|
||||
case ACTION_GET_USER_NAME:
|
||||
operation = new GetRemoteUserInfoOperation();
|
||||
operation = new GetUserInfoRemoteOperation();
|
||||
break;
|
||||
|
||||
case ACTION_RENAME:
|
||||
|
|
|
@ -61,7 +61,6 @@ import com.nextcloud.client.onboarding.FirstRunActivity;
|
|||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
import com.owncloud.android.authentication.PassCodeManager;
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
||||
import com.owncloud.android.datamodel.ExternalLinksProvider;
|
||||
|
@ -80,7 +79,7 @@ import com.owncloud.android.lib.resources.files.SearchRemoteOperation;
|
|||
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
|
||||
import com.owncloud.android.lib.resources.status.OCCapability;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
import com.owncloud.android.operations.GetCapabilitiesOperation;
|
||||
import com.owncloud.android.ui.TextDrawable;
|
||||
import com.owncloud.android.ui.activities.ActivitiesActivity;
|
||||
|
@ -856,10 +855,10 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
* @param usedSpace the used space
|
||||
* @param totalSpace the total space
|
||||
* @param relative the percentage of space already used
|
||||
* @param quotaValue {@link GetRemoteUserInfoOperation#SPACE_UNLIMITED} or other to determinate state
|
||||
* @param quotaValue {@link GetUserInfoRemoteOperation#SPACE_UNLIMITED} or other to determinate state
|
||||
*/
|
||||
private void setQuotaInformation(long usedSpace, long totalSpace, int relative, long quotaValue) {
|
||||
if (GetRemoteUserInfoOperation.SPACE_UNLIMITED == quotaValue) {
|
||||
if (GetUserInfoRemoteOperation.SPACE_UNLIMITED == quotaValue) {
|
||||
mQuotaTextPercentage.setText(String.format(
|
||||
getString(R.string.drawer_quota_unlimited),
|
||||
DisplayUtils.bytesToHumanReadable(usedSpace)));
|
||||
|
@ -998,7 +997,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
}
|
||||
|
||||
final Context context = MainApp.getAppContext();
|
||||
RemoteOperationResult result = new GetRemoteUserInfoOperation().execute(currentAccount, context);
|
||||
RemoteOperationResult result = new GetUserInfoRemoteOperation().execute(currentAccount, context);
|
||||
|
||||
if (result.isSuccess() && result.getData() != null) {
|
||||
final UserInfo userInfo = (UserInfo) result.getData().get(0);
|
||||
|
@ -1013,8 +1012,8 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (quotaValue > 0 || quotaValue == GetRemoteUserInfoOperation.SPACE_UNLIMITED
|
||||
|| quotaValue == GetRemoteUserInfoOperation.QUOTA_LIMIT_INFO_NOT_AVAILABLE) {
|
||||
if (quotaValue > 0 || quotaValue == GetUserInfoRemoteOperation.SPACE_UNLIMITED
|
||||
|| quotaValue == GetUserInfoRemoteOperation.QUOTA_LIMIT_INFO_NOT_AVAILABLE) {
|
||||
/*
|
||||
* show quota in case
|
||||
* it is available and calculated (> 0) or
|
||||
|
|
|
@ -62,7 +62,7 @@ import com.owncloud.android.lib.common.UserInfo;
|
|||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
||||
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation;
|
||||
import com.owncloud.android.ui.events.TokenPushEvent;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.PushUtils;
|
||||
|
@ -415,7 +415,7 @@ public class UserInfoActivity extends FileActivity implements Injectable {
|
|||
|
||||
private void fetchAndSetData() {
|
||||
Thread t = new Thread(() -> {
|
||||
RemoteOperation getRemoteUserInfoOperation = new GetRemoteUserInfoOperation();
|
||||
RemoteOperation getRemoteUserInfoOperation = new GetUserInfoRemoteOperation();
|
||||
RemoteOperationResult result = getRemoteUserInfoOperation.execute(account, this);
|
||||
|
||||
if (result.isSuccess() && result.getData() != null) {
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
package com.owncloud.android.ui.fragment;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.accounts.AuthenticatorException;
|
||||
import android.accounts.OperationCanceledException;
|
||||
import android.app.Activity;
|
||||
|
@ -56,7 +55,6 @@ import com.nextcloud.client.di.Injectable;
|
|||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
|
@ -71,7 +69,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
|
|||
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.files.SearchRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.files.ToggleFavoriteRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetRemoteSharesOperation;
|
||||
import com.owncloud.android.lib.resources.shares.GetSharesRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.status.OCCapability;
|
||||
import com.owncloud.android.ui.activity.FileActivity;
|
||||
import com.owncloud.android.ui.activity.FileDisplayActivity;
|
||||
|
@ -1546,7 +1544,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
remoteOperation = new SearchRemoteOperation(event.getSearchQuery(), event.getSearchType(),
|
||||
searchOnlyFolders);
|
||||
} else {
|
||||
remoteOperation = new GetRemoteSharesOperation();
|
||||
remoteOperation = new GetSharesRemoteOperation();
|
||||
}
|
||||
|
||||
remoteOperationAsyncTask = new AsyncTask() {
|
||||
|
|
Loading…
Reference in a new issue