mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 07:56:19 +00:00
Fix crash when client is revoked from web UI
This commit is contained in:
parent
4a9eb24d69
commit
0f1f232c16
@ -334,7 +334,6 @@ public class OwnCloudClient extends HttpClient {
|
||||
if (invalidated) {
|
||||
if (getCredentials().authTokenCanBeRefreshed() &&
|
||||
repeatCounter < MAX_REPEAT_COUNT_WITH_FRESH_CREDENTIALS) {
|
||||
|
||||
try {
|
||||
mAccount.loadCredentials(getContext());
|
||||
// if mAccount.getCredentials().length() == 0 --> refresh failed
|
||||
@ -342,7 +341,9 @@ public class OwnCloudClient extends HttpClient {
|
||||
credentialsWereRefreshed = true;
|
||||
|
||||
} catch (AccountsException | IOException e) {
|
||||
Timber.e(e, "Error while trying to refresh auth token for %s", mAccount.getSavedAccount().name);
|
||||
Timber.e(e, "Error while trying to refresh auth token for %s",
|
||||
mAccount.getSavedAccount().name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,7 @@ public class OwnCloudClientFactory {
|
||||
* @param context Android context where the OwnCloudClient is being created.
|
||||
* @return A OwnCloudClient object ready to be used
|
||||
*/
|
||||
public static OwnCloudClient createOwnCloudClient(Uri uri, Context context,
|
||||
boolean followRedirects) {
|
||||
public static OwnCloudClient createOwnCloudClient(Uri uri, Context context, boolean followRedirects) {
|
||||
OwnCloudClient client = new OwnCloudClient(uri);
|
||||
|
||||
client.setFollowRedirects(followRedirects);
|
||||
|
Loading…
x
Reference in New Issue
Block a user