mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Merge pull request #2829 from nextcloud/capabilitiesTooOften
Capabilities are queried too often
This commit is contained in:
commit
7416082e4f
1 changed files with 0 additions and 16 deletions
|
@ -30,12 +30,8 @@ import android.support.annotation.Nullable;
|
|||
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
|
||||
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.operations.GetCapabilitiesOperarion;
|
||||
import com.owncloud.android.ui.activity.ManageAccountsActivity;
|
||||
|
||||
|
||||
|
@ -163,18 +159,6 @@ public class AccountUtils {
|
|||
if (found) {
|
||||
SharedPreferences.Editor appPrefs = PreferenceManager.getDefaultSharedPreferences(context).edit();
|
||||
appPrefs.putString(PREF_SELECT_OC_ACCOUNT, accountName);
|
||||
|
||||
// update credentials
|
||||
Thread t = new Thread(() -> {
|
||||
FileDataStorageManager storageManager = new FileDataStorageManager(account,
|
||||
context.getContentResolver());
|
||||
GetCapabilitiesOperarion getCapabilities = new GetCapabilitiesOperarion();
|
||||
RemoteOperationResult updateResult = getCapabilities.execute(storageManager, context);
|
||||
Log_OC.w(TAG, "Update Capabilities: " + updateResult.isSuccess());
|
||||
});
|
||||
|
||||
t.start();
|
||||
|
||||
appPrefs.apply();
|
||||
result = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue