Skip to content

Commit 1147ebc

Browse files
authored
Merge pull request #4654 from owncloud/fix/re-login_not_working_properly
[FIX] Re-login not working properly when credentials expire
2 parents 569f4b0 + 55e4ea0 commit 1147ebc

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ownCloud admins and users.
3939

4040
* Bugfix - Crash from Google Play Console in TransferListFragment: [#4650](https://github.com/owncloud/android/issues/4650)
4141
* Bugfix - Mini-fab for creating new document not always available: [#7277](https://github.com/owncloud/enterprise/issues/7277)
42+
* Bugfix - Re-login not working properly when credentials expire: [#7277](https://github.com/owncloud/enterprise/issues/7277)
4243

4344
## Details
4445

@@ -60,6 +61,14 @@ ownCloud admins and users.
6061
https://github.com/owncloud/enterprise/issues/7277
6162
https://github.com/owncloud/android/pull/4649
6263

64+
* Bugfix - Re-login not working properly when credentials expire: [#7277](https://github.com/owncloud/enterprise/issues/7277)
65+
66+
The startActivityForResult method has been replaced with startActivity to make
67+
re-login work properly when credentials expire.
68+
69+
https://github.com/owncloud/enterprise/issues/7277
70+
https://github.com/owncloud/android/pull/4654
71+
6372
# Changelog for ownCloud Android Client [4.6.0] (2025-07-22)
6473

6574
The following sections list the changes in ownCloud Android Client 4.6.0 relevant to

changelog/unreleased/4654

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugfix: Re-login not working properly when credentials expire
2+
3+
The startActivityForResult method has been replaced with startActivity
4+
to make re-login work properly when credentials expire.
5+
6+
https://github.com/owncloud/enterprise/issues/7277
7+
https://github.com/owncloud/android/pull/4654

owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ import com.owncloud.android.presentation.files.removefile.RemoveFilesDialogFragm
7676
import com.owncloud.android.presentation.files.removefile.RemoveFilesDialogFragment.Companion.TAG_REMOVE_FILES_DIALOG_FRAGMENT
7777
import com.owncloud.android.presentation.files.renamefile.RenameFileDialogFragment
7878
import com.owncloud.android.presentation.files.renamefile.RenameFileDialogFragment.Companion.FRAGMENT_TAG_RENAME_FILE
79-
import com.owncloud.android.ui.activity.FileActivity.REQUEST_CODE__UPDATE_CREDENTIALS
8079
import com.owncloud.android.ui.activity.FileDisplayActivity
8180
import com.owncloud.android.ui.fragment.FileFragment
8281
import com.owncloud.android.ui.preview.PreviewAudioFragment
@@ -172,7 +171,7 @@ class FileDetailsFragment : FileFragment() {
172171
putExtra(EXTRA_ACTION, ACTION_UPDATE_EXPIRED_TOKEN)
173172
addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
174173
}
175-
startActivityForResult(updateAccountCredentials, REQUEST_CODE__UPDATE_CREDENTIALS)
174+
startActivity(updateAccountCredentials)
176175
}.show()
177176
} else {
178177
showErrorInSnackbar(R.string.sync_fail_ticker, uiResult.error)

owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
* @author Christian Schabesberger
77
* @author Abel García de Prada
88
* @author Aitor Ballesteros Pavón
9+
* @author Jorge Aguado Recio
910
* <p>
1011
* Copyright (C) 2011 Bartek Przybylski
11-
* Copyright (C) 2024 ownCloud GmbH.
12+
* Copyright (C) 2025 ownCloud GmbH.
1213
* <p>
1314
* This program is free software: you can redistribute it and/or modify
1415
* it under the terms of the GNU General Public License version 2,
@@ -321,7 +322,7 @@ protected void requestCredentialsUpdate(Account account) {
321322
AuthenticatorConstants.EXTRA_ACTION,
322323
AuthenticatorConstants.ACTION_UPDATE_EXPIRED_TOKEN);
323324
updateAccountCredentials.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
324-
startActivityForResult(updateAccountCredentials, REQUEST_CODE__UPDATE_CREDENTIALS);
325+
startActivity(updateAccountCredentials);
325326
}
326327

327328
/**

0 commit comments

Comments
 (0)