Skip to content

Commit

Permalink
Fix refresh of access token for folder refresh in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
davivel committed Aug 14, 2017
1 parent edffdad commit ff5718d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.authentication.oauth.OAuth2Constants;
import com.owncloud.android.lib.common.authentication.oauth.OAuth2RefreshAccessTokenOperation;
import com.owncloud.android.lib.common.authentication.oauth.OAuth2GrantType;
import com.owncloud.android.lib.common.authentication.oauth.OAuth2Provider;
import com.owncloud.android.lib.common.authentication.oauth.OAuth2ProvidersRegistry;
import com.owncloud.android.lib.common.authentication.oauth.OAuth2RequestBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ protected RemoteOperationResult run(OwnCloudClient client) {
false,
false
);
syncOp.setSilentRefreshOfAccountCredentials(getSilentRefreshOfAccountCredentials());
result = syncOp.execute(client, getStorageManager());

sendLocalBroadcast(
Expand Down Expand Up @@ -199,6 +200,7 @@ private RemoteOperationResult refreshSharesForFolder(OwnCloudClient client) {
// remote request
GetRemoteSharesForFileOperation operation =
new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), true, true);
operation.setSilentRefreshOfAccountCredentials(getSilentRefreshOfAccountCredentials());
result = operation.execute(client);

if (result.isSuccess()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ private RemoteOperationResult fetchRemoteFolder(OwnCloudClient client) throws Op
}

ReadRemoteFolderOperation readFolderOperation = new ReadRemoteFolderOperation(mRemotePath);
readFolderOperation.setSilentRefreshOfAccountCredentials(true);
return readFolderOperation.execute(client);
}

Expand Down

0 comments on commit ff5718d

Please sign in to comment.