mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
Merge branch 'reliable_uploads_actions_uploads_view' of https://github.com/owncloud/android into reliable_uploads_actions_uploads_view
This commit is contained in:
commit
bf1d0fbe89
4 changed files with 11 additions and 12 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 0a693f2b4e4f36414eae5d8c7d2d9e9d3c4700e5
|
||||
Subproject commit bab814d1ae77658cc4b2fc1b33b55727b9b8075f
|
|
@ -25,7 +25,6 @@ package com.owncloud.android.authentication;
|
|||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
|
@ -66,6 +65,8 @@ import android.widget.Toast;
|
|||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
|
||||
import com.owncloud.android.lib.common.OwnCloudCredentials;
|
||||
import com.owncloud.android.lib.common.OwnCloudCredentialsFactory;
|
||||
import com.owncloud.android.lib.common.accounts.AccountTypeUtils;
|
||||
|
@ -1027,10 +1028,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
onGetUserNameFinish(result);
|
||||
}
|
||||
|
||||
if (result.isSuccess() && mAction == ACTION_UPDATE_EXPIRED_TOKEN) {
|
||||
setResult(Activity.RESULT_OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void onGetUserNameFinish(RemoteOperationResult result) {
|
||||
|
@ -1425,9 +1422,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
}
|
||||
|
||||
if (success) {
|
||||
if (mAction == ACTION_UPDATE_EXPIRED_TOKEN) {
|
||||
setResult(Activity.RESULT_OK);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
|
@ -1474,6 +1468,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
* the new credentials when needed.
|
||||
*/
|
||||
private void updateAccountAuthentication() throws AccountNotFoundException {
|
||||
|
||||
|
||||
|
||||
Bundle response = new Bundle();
|
||||
response.putString(AccountManager.KEY_ACCOUNT_NAME, mAccount.name);
|
||||
|
@ -1498,6 +1494,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
response.putString(AccountManager.KEY_AUTHTOKEN, mPasswordInput.getText().toString());
|
||||
mAccountMgr.setPassword(mAccount, mPasswordInput.getText().toString());
|
||||
}
|
||||
|
||||
// remove managed clients for this account to enforce creation with fresh credentials
|
||||
OwnCloudAccount ocAccount = new OwnCloudAccount(mAccount, this);
|
||||
OwnCloudClientManagerFactory.getDefaultSingleton().removeClientFor(ocAccount);
|
||||
|
||||
setAccountAuthenticatorResult(response);
|
||||
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ public class UploadsStorageManager extends Observable {
|
|||
* @return upload id, -1 if the insert process fails.
|
||||
*/
|
||||
public long storeUpload(OCUpload ocUpload) {
|
||||
Log_OC.e(TAG, "Inserting " + ocUpload.getLocalPath() + " with status=" + ocUpload.getUploadStatus());
|
||||
Log_OC.v(TAG, "Inserting " + ocUpload.getLocalPath() + " with status=" + ocUpload.getUploadStatus());
|
||||
|
||||
ContentValues cv = new ContentValues();
|
||||
cv.put(ProviderTableMeta.UPLOADS_LOCAL_PATH, ocUpload.getLocalPath());
|
||||
|
|
|
@ -1083,8 +1083,6 @@ public class FileUploader extends Service
|
|||
PendingIntent.FLAG_ONE_SHOT
|
||||
));
|
||||
|
||||
mUploadClient = null;
|
||||
// grant that future retries on the same account will get the fresh credentials
|
||||
} else {
|
||||
mNotificationBuilder.setContentText(content);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue