From: masensio Date: Thu, 27 Mar 2014 17:01:37 +0000 (+0100) Subject: Check the version number instead of the version string X-Git-Tag: oc-android-1.7.0_signed~355^2~5 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/53a27893260a6a70150dc8a87b6886bb713e77eb?ds=inline;hp=--cc Check the version number instead of the version string --- 53a27893260a6a70150dc8a87b6886bb713e77eb diff --git a/owncloud-android-library b/owncloud-android-library index 8d820f42..fc8191e2 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 8d820f42fb98af9ca69315b736730e260d5a6917 +Subproject commit fc8191e26841dc25407dd74cb50738ff9a3157a6 diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 4fab95da..8cbe7ad8 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -104,7 +104,6 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { private static final String KEY_AUTH_MESSAGE_TEXT = "AUTH_MESSAGE_TEXT"; private static final String KEY_HOST_URL_TEXT = "HOST_URL_TEXT"; private static final String KEY_OC_VERSION = "OC_VERSION"; - private static final String KEY_OC_VERSION_STRING = "OC_VERSION_STRING"; private static final String KEY_ACCOUNT = "ACCOUNT"; private static final String KEY_SERVER_VALID = "SERVER_VALID"; private static final String KEY_SERVER_CHECKED = "SERVER_CHECKED"; @@ -250,8 +249,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { /// retrieve extras from intent mAccount = getIntent().getExtras().getParcelable(EXTRA_ACCOUNT); if (mAccount != null) { - String ocVersion = mAccountMgr.getUserData(mAccount, Constants.KEY_OC_VERSION); - String ocVersionString = mAccountMgr.getUserData(mAccount, Constants.KEY_OC_VERSION_STRING); + String ocVersion = mAccountMgr.getUserData(mAccount, Constants.KEY_OC_VERSION); if (ocVersion != null) { mDiscoveredVersion = new OwnCloudVersion(ocVersion); } @@ -286,7 +284,6 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { /// server data String ocVersion = savedInstanceState.getString(KEY_OC_VERSION); - String ocVersionString = savedInstanceState.getString(KEY_OC_VERSION_STRING); if (ocVersion != null) { mDiscoveredVersion = new OwnCloudVersion(ocVersion); } @@ -464,7 +461,6 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { /// server data if (mDiscoveredVersion != null) { outState.putString(KEY_OC_VERSION, mDiscoveredVersion.getVersion()); - outState.putString(KEY_OC_VERSION_STRING, mDiscoveredVersion.getVersionString()); } outState.putString(KEY_HOST_URL_TEXT, mHostBaseUrl); @@ -1370,7 +1366,6 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { } /// add user data to the new account; TODO probably can be done in the last parameter addAccountExplicitly, or in KEY_USERDATA mAccountMgr.setUserData(mAccount, Constants.KEY_OC_VERSION, mDiscoveredVersion.getVersion()); - mAccountMgr.setUserData(mAccount, Constants.KEY_OC_VERSION_STRING, mDiscoveredVersion.getVersionString()); mAccountMgr.setUserData(mAccount, Constants.KEY_OC_BASE_URL, mHostBaseUrl); if (isSaml) { diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index f47ab519..5d500072 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -139,7 +139,6 @@ public class FileOperationsHelper { AccountManager accountManager = AccountManager.get(callerActivity); String version = accountManager.getUserData(callerActivity.getAccount(), Constants.KEY_OC_VERSION); - String versionString = accountManager.getUserData(callerActivity.getAccount(), Constants.KEY_OC_VERSION_STRING); return (new OwnCloudVersion(version)).isSharedSupported(); //return Boolean.parseBoolean(accountManager.getUserData(callerActivity.getAccount(), OwnCloudAccount.Constants.KEY_SUPPORTS_SHARE_API)); } diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index ca3297fd..9d2b4fa8 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -253,7 +253,6 @@ public class FileUploader extends Service implements OnDatatransferProgressListe AccountManager aMgr = AccountManager.get(this); String version = aMgr.getUserData(account, Constants.KEY_OC_VERSION); - String versionString = aMgr.getUserData(account, Constants.KEY_OC_VERSION_STRING); OwnCloudVersion ocv = new OwnCloudVersion(version); boolean chunked = FileUploader.chunkedUploadIsSupported(ocv); diff --git a/src/com/owncloud/android/operations/UpdateOCVersionOperation.java b/src/com/owncloud/android/operations/UpdateOCVersionOperation.java index d9d071f5..ddcd52c6 100644 --- a/src/com/owncloud/android/operations/UpdateOCVersionOperation.java +++ b/src/com/owncloud/android/operations/UpdateOCVersionOperation.java @@ -78,11 +78,9 @@ public class UpdateOCVersionOperation extends RemoteOperation { if (json != null && json.getString("version") != null) { String version = json.getString("version"); - String versionstring = json.getString("versionstring"); mOwnCloudVersion = new OwnCloudVersion(version); if (mOwnCloudVersion.isVersionValid()) { accountMngr.setUserData(mAccount, Constants.KEY_OC_VERSION, mOwnCloudVersion.getVersion()); - accountMngr.setUserData(mAccount, Constants.KEY_OC_VERSION_STRING, mOwnCloudVersion.getVersionString()); Log_OC.d(TAG, "Got new OC version " + mOwnCloudVersion.toString()); result = new RemoteOperationResult(ResultCode.OK); diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index d0c6069d..867e4cfe 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -19,8 +19,6 @@ package com.owncloud.android.ui.activity; import java.io.File; -import java.io.InvalidClassException; - import android.accounts.Account; import android.app.AlertDialog; import android.app.Dialog;