mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
apply codereviews
This commit is contained in:
parent
56e003139f
commit
9fb69ce38d
@ -302,7 +302,7 @@ public class AccountUtils {
|
|||||||
public static class Constants {
|
public static class Constants {
|
||||||
/**
|
/**
|
||||||
* Version should be 3 numbers separated by dot so it can be parsed by
|
* Version should be 3 numbers separated by dot so it can be parsed by
|
||||||
* {@link com.owncloud.android.lib.resources.status.OwnCloudVersion}
|
* {@link OwnCloudVersion}
|
||||||
*/
|
*/
|
||||||
public static final String KEY_OC_VERSION = "oc_version";
|
public static final String KEY_OC_VERSION = "oc_version";
|
||||||
/**
|
/**
|
@ -52,7 +52,7 @@ import static com.owncloud.android.lib.common.operations.RemoteOperationResult.R
|
|||||||
* @author David González Verdugo
|
* @author David González Verdugo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetRemoteStatusOperation extends RemoteOperation<com.owncloud.android.lib.resources.status.OwnCloudVersion> {
|
public class GetRemoteStatusOperation extends RemoteOperation<OwnCloudVersion> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum time to wait for a response from the server when the connection is being tested,
|
* Maximum time to wait for a response from the server when the connection is being tested,
|
||||||
@ -67,7 +67,7 @@ public class GetRemoteStatusOperation extends RemoteOperation<com.owncloud.andro
|
|||||||
private static final String HTTPS_PREFIX = "https://";
|
private static final String HTTPS_PREFIX = "https://";
|
||||||
private static final String HTTP_PREFIX = "http://";
|
private static final String HTTP_PREFIX = "http://";
|
||||||
|
|
||||||
private RemoteOperationResult<com.owncloud.android.lib.resources.status.OwnCloudVersion> mLatestResult;
|
private RemoteOperationResult<OwnCloudVersion> mLatestResult;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
public GetRemoteStatusOperation(Context context) {
|
public GetRemoteStatusOperation(Context context) {
|
||||||
@ -122,7 +122,7 @@ public class GetRemoteStatusOperation extends RemoteOperation<com.owncloud.andro
|
|||||||
RemoteOperationResult.ResultCode.INSTANCE_NOT_CONFIGURED);
|
RemoteOperationResult.ResultCode.INSTANCE_NOT_CONFIGURED);
|
||||||
} else {
|
} else {
|
||||||
String version = respJSON.getString(NODE_VERSION);
|
String version = respJSON.getString(NODE_VERSION);
|
||||||
com.owncloud.android.lib.resources.status.OwnCloudVersion ocVersion = new com.owncloud.android.lib.resources.status.OwnCloudVersion(version);
|
OwnCloudVersion ocVersion = new OwnCloudVersion(version);
|
||||||
/// the version object will be returned even if the version is invalid, no error code;
|
/// the version object will be returned even if the version is invalid, no error code;
|
||||||
/// every app will decide how to act if (ocVersion.isVersionValid() == false)
|
/// every app will decide how to act if (ocVersion.isVersionValid() == false)
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ public class GetRemoteStatusOperation extends RemoteOperation<com.owncloud.andro
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RemoteOperationResult<com.owncloud.android.lib.resources.status.OwnCloudVersion> run(OwnCloudClient client) {
|
protected RemoteOperationResult<OwnCloudVersion> run(OwnCloudClient client) {
|
||||||
if (!isOnline()) {
|
if (!isOnline()) {
|
||||||
return new RemoteOperationResult<>(RemoteOperationResult.ResultCode.NO_NETWORK_CONNECTION);
|
return new RemoteOperationResult<>(RemoteOperationResult.ResultCode.NO_NETWORK_CONNECTION);
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user