Compare commits

..
1192 Commits
Author SHA1 Message Date
Nextcloud Android Bot bfa85c3c5b daily dev 20261107
Revert "fix garm runner label"
fix garm runner label
Better way to retrieve folder name
Actionbar should alway show current folder name
fix(l10n): Update translations from Transifex
Better fix for picker navigation affecting all file list fragments
Avoid picker navigation to affect main file list's one
fix fastlane
min supported version is nc 23
refactor(file-operation-helper): kotlin
Rename .java to .kt
fix(l10n): Update translations from Transifex
notify upload list
recover from exceed state
use lib
add quota check for auto upload
add quota check for all uploads
🔄 synced local '.' with remote 'config/root/'
🔄 synced local 'fastlane/' with remote 'config/fastlane/'
wip
wip
wip
fix(metadata): cancellation
wip
wip
Symmetrix fix for unshare
Add sharee to file immediately to avoid the list being shown without the sharee icon until next folder sync
further fastlane
adjust naming
update test according to feedback
preserve corner after rotating and make it accessible
dont recreate activity on config changes
adopt changes for app scan activity
split into smaller classes
convert to kotlin
Rename .java to .kt
use dao functions
Fix unreadable text on system bar
Theme activity to have matching color between system bars and layout
Clear system insets in widget config view
fix deletion
optimize imports
fix upsert
simplify
simplify
simplify
simplify
remove theme color utils
convert to kotlin
convert to kotlin
Rename .java to .kt
Fix back navigation to forbidden folder in file picker
Spotless
Oneliner with null casting for setHasFooter
Fixed empty view not triggered in Media due to EmptyRecyclerView still expecting a footer
better translation
add cancel button
fix download cancel
fix lint
Update androidPluginVersion to v9.5.0 (#17928)
fix(l10n): Update translations from Transifex
fix(l10n): Update translations from Transifex
Fixed back navigation in upload screen
fix(file-list): flicker
remove dead code
fix(navigation): all files
use correct variable name for request code
wip
move logic inside enum
unify fab state logic
refactor(error-message-adapter): kotlin
Rename .java to .kt
Add unit tests for DateFormatPattern
Update Nextcloud Android library
2026-11-07 05:06:49 +00:00
Nextcloud Android Bot 7ef664ef7a Merge remote-tracking branch 'origin/master' into dev 2026-11-07 05:03:03 +00:00
alperozturk96andClaude Opus 5.5 2d0c23c6fe Revert "fix garm runner label"
This reverts commit d21dbf664f.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 19:44:57 +01:00
alperozturk96 d21dbf664f fix garm runner label
Signed-off-by: alperozturk96 <[email protected]>
2026-11-06 19:43:35 +01:00
Alper Öztürk 36cb08291b Merge pull request #17975 from nextcloud/fix/internal-71016-file-name-in-actionbar-when-notif-clicked
Actionbar should alway show current folder name
2026-11-06 19:10:32 +03:00
Daniele VerducciandAlper Öztürk a8ef34a4b5 Better way to retrieve folder name
Co-authored-by: Alper Öztürk <[email protected]>
Signed-off-by: Daniele Verducci <[email protected]>
2026-11-06 14:59:30 +01:00
daniele-verducci 24a40214b2 Actionbar should alway show current folder name
Signed-off-by: daniele-verducci <[email protected]>
2026-11-06 14:59:30 +01:00
Tobias Kaminsky 39219060c3 Merge pull request #17964 from nextcloud/fix/fastlane
fix fastlane
2026-11-06 09:01:27 +01:00
Nextcloud bot 2553d082b4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-11-06 07:16:20 +00:00
Alper Öztürk 2735487fff Merge pull request #17956 from nextcloud/refactor/file-operation-helper-kotlin
refactor(file-operation-helper): kotlin
2026-11-06 08:48:29 +03:00
Alper Öztürk 7972a8e03c Merge pull request #17958 from nextcloud/fix/internal-109054-picker-navigation-brougth-to-main-files-list
Avoid picker navigation to affect main file list's one
2026-11-05 15:16:07 +03:00
daniele-verducci 3f4417d374 Better fix for picker navigation affecting all file list fragments
Signed-off-by: daniele-verducci <[email protected]>
2026-11-05 11:15:09 +01:00
daniele-verducci 6f2b9ce8b2 Avoid picker navigation to affect main file list's one
Signed-off-by: daniele-verducci <[email protected]>
2026-11-05 11:15:09 +01:00
alperozturk96 7fe6bde6ed fix fastlane
Signed-off-by: alperozturk96 <[email protected]>
2026-11-05 11:15:14 +03:00
Alper Öztürk 413ddaa77b Merge pull request #17960 from nextcloud/min-supported-version-nc23
min supported version is nc 23
2026-11-05 10:00:24 +03:00
Alper Öztürk d04ec2ae3d Merge pull request #17961 from nextcloud/fix/ci-5
fix ci
2026-11-05 09:53:26 +03:00
alperozturk96 c0b53f894a fix ci
Signed-off-by: alperozturk96 <[email protected]>
2026-11-05 09:07:50 +03:00
alperozturk96 d3dd3aac16 min supported version is nc 23
Signed-off-by: alperozturk96 <[email protected]>
2026-11-05 09:01:50 +03:00
alperozturk96 1b3da2686e refactor(file-operation-helper): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-11-05 08:49:05 +03:00
alperozturk96 996ce970e6 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-11-05 08:49:05 +03:00
Alper Öztürk 61b01b666b Merge pull request #17935 from nextcloud/feat/document-scanner-tablet-support
feat(scan): orientation support
2026-11-05 08:39:51 +03:00
Alper Öztürk 88148f3743 Merge pull request #17812 from nextcloud/feat/check-upload-quota
feat(upload): quota check
2026-11-05 08:36:19 +03:00
Alper Öztürk ecf31ffd22 Merge pull request #17957 from nextcloud/fix/ci-2
fix ci
2026-11-05 08:35:53 +03:00
Nextcloud bot 7046830a1e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-11-05 03:49:23 +00:00
alperozturk96 2dc40b1836 fix ci
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 18:39:05 +03:00
alperozturk96 03a2fbeb6f notify upload list
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 15:46:40 +03:00
alperozturk96 25f5fd4d9c recover from exceed state
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 15:46:40 +03:00
alperozturk96 a82067a2bb use lib
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	gradle/libs.versions.toml
2026-11-04 15:46:40 +03:00
alperozturk96 66a2b6d56b add quota check for auto upload
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 15:46:40 +03:00
alperozturk96 bac9e1c5a1 add quota check for all uploads
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 15:46:40 +03:00
Alper Öztürk 152108a7c3 Merge pull request #17940 from nextcloud/fix/metadata-worker-cancellation
fix(metadata): cancellation
2026-11-04 15:29:49 +03:00
Tobias Kaminsky bec39ce821 Merge pull request #17924 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2026-11-04 13:23:09 +01:00
nextcloud-android-bot 23f4c60c2c 🔄 synced local '.' with remote 'config/root/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-11-04 11:55:02 +00:00
nextcloud-android-bot dc4e0e94f6 🔄 synced local 'fastlane/' with remote 'config/fastlane/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-11-04 11:55:02 +00:00
nextcloud-android-bot a9dc993969 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-11-04 11:55:02 +00:00
Alper Öztürk f09acb1803 Merge pull request #17945 from nextcloud/refactor/drawer-activity-kotlin
refactor(drawer-activity): kotlin
2026-11-04 14:36:39 +03:00
Alper Öztürk 33ed8d00f7 Merge pull request #17949 from nextcloud/refactor/abstract-it-kotlin
refactor(abstract-it): kotlin
2026-11-04 14:36:28 +03:00
alperozturk96 d466b7802e wip
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 14:21:18 +03:00
alperozturk96 0c8ec9e2b1 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 14:21:18 +03:00
alperozturk96 33014e63b4 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 14:21:18 +03:00
alperozturk96 928461697d fix(metadata): cancellation
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java
2026-11-04 14:21:18 +03:00
Alper Öztürk bb45b7fa38 Merge pull request #17932 from nextcloud/fix/download-cancel
fix(download): cancel
2026-11-04 14:20:15 +03:00
Alper Öztürk 144b70b8e5 Merge pull request #17917 from nextcloud/fix/navigation-flicker
fix(file-list): flicker
2026-11-04 13:26:37 +03:00
Alper Öztürk ae1397630e Merge pull request #17919 from nextcloud/fix/17915-missing-share-icon
Fix missing share icon for newly-created files until a folder sync happens
2026-11-04 13:19:06 +03:00
Alper Öztürk a9b083ede1 Merge pull request #17913 from nextcloud/fix/fab-state
fix(fab): state
2026-11-04 13:13:04 +03:00
Alper Öztürk 62dca7aa6b Merge pull request #17916 from nextcloud/fix/navigation-to-all-files-from-upload-screen
fix(navigation): all files
2026-11-04 12:58:42 +03:00
alperozturk96 bbf06013cb wip
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 12:35:58 +03:00
alperozturk96 63d4560c5e wip
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 12:35:26 +03:00
daniele-verducci 31ebe1e6a4 Symmetrix fix for unshare
Signed-off-by: daniele-verducci <[email protected]>
2026-11-04 12:34:25 +03:00
daniele-verducci 04226699a5 Add sharee to file immediately to avoid the list being shown without the sharee icon until next folder sync
Signed-off-by: daniele-verducci <[email protected]>

# Conflicts:
#	app/src/main/java/com/nextcloud/utils/extensions/OCFileExtensions.kt
2026-11-04 12:34:20 +03:00
Tobias Kaminsky 7091fc859d Merge pull request #17950 from nextcloud/fastlane2
further fastlane
2026-11-04 10:21:26 +01:00
tobiasKaminsky 7dde2537ba further fastlane
Signed-off-by: tobiasKaminsky <[email protected]>
2026-11-04 10:11:09 +01:00
alperozturk96 29f20c1efc simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 09:50:33 +03:00
alperozturk96 8d88042da4 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 09:45:12 +03:00
alperozturk96 a72dc25c55 convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 09:37:20 +03:00
alperozturk96 98faff15cd Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-11-04 09:37:19 +03:00
Alper Öztürk 3b53419d08 Merge pull request #17873 from Ruby20-50/add-date-format-pattern-test
Add unit tests for DateFormatPattern
2026-11-04 08:32:02 +03:00
Ruby20-50 c00ccf726f Merge branch 'add-date-format-pattern-test' of https://github.com/Ruby20-50/android into add-date-format-pattern-test 2026-11-04 02:27:43 +01:00
Ruby20-50 64b90f11b0 adjust naming
Signed-off-by: Ruby20-50 <[email protected]>
2026-11-04 02:24:05 +01:00
Ruba 4688d114d6 Merge branch 'master' into add-date-format-pattern-test 2026-11-03 21:55:32 +01:00
Ruby20-50 b6e7414e25 update test according to feedback
Signed-off-by: Ruby20-50 <[email protected]>
2026-11-03 21:37:31 +01:00
alperozturk96 29f82ab766 preserve corner after rotating and make it accessible
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 17:39:25 +03:00
alperozturk96 cbe895f258 dont recreate activity on config changes
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 17:28:29 +03:00
alperozturk96 3b4ceb77df adopt changes for app scan activity
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 17:03:55 +03:00
alperozturk96 9e2f2181a9 split into smaller classes
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 16:44:00 +03:00
alperozturk96 2a03185aaa convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 16:44:00 +03:00
alperozturk96 29c9b6201b Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 16:44:00 +03:00
Alper Öztürk caf6c2ca5e Merge pull request #17941 from nextcloud/fix/file-data-storage-manager-operations
fix(file-data-storage-manager): operations
2026-11-03 16:25:34 +03:00
Alper Öztürk a6b90e4c99 Merge pull request #17942 from nextcloud/fix/clear-system-insets-in-widget-config
Clear system insets in widget config
2026-11-03 15:20:20 +03:00
alperozturk96 e5d38cf0bf use dao functions
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 15:01:56 +03:00
daniele-verducci a74e9af79b Fix unreadable text on system bar
Signed-off-by: daniele-verducci <[email protected]>
2026-11-03 12:40:41 +01:00
daniele-verducci edd4afdc07 Theme activity to have matching color between system bars and layout
Signed-off-by: daniele-verducci <[email protected]>
2026-11-03 12:36:19 +01:00
daniele-verducci 612fdfba12 Clear system insets in widget config view
Signed-off-by: daniele-verducci <[email protected]>
2026-11-03 12:28:48 +01:00
alperozturk96 8ad26c9f5e fix deletion
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 13:58:08 +03:00
alperozturk96 d6796e31b6 optimize imports
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 13:58:08 +03:00
alperozturk96 a9d7451ae4 fix upsert
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 13:58:08 +03:00
Alper Öztürk c2618ba512 Merge pull request #17899 from nextcloud/refactor/error-message-adapter-kotlin
refactor(error-message-adapter): kotlin
2026-11-03 13:16:43 +03:00
Alper Öztürk 145c7c2570 Merge pull request #17938 from nextcloud/refactor/toolbar-activity-kotlin
refactor(toolbar-activity): kotlin
2026-11-03 13:06:13 +03:00
alperozturk96 0ec85602e7 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 11:16:33 +03:00
alperozturk96 858ecf8ddb simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 11:10:49 +03:00
alperozturk96 a6b3895031 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 10:35:24 +03:00
alperozturk96 9e5c932574 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 10:35:24 +03:00
alperozturk96 03a219dbaf remove theme color utils
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 10:35:24 +03:00
alperozturk96 0d1c6357ca convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 10:35:24 +03:00
alperozturk96 50a0eb7635 convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 10:35:24 +03:00
alperozturk96 6ba61b0b70 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-11-03 10:35:24 +03:00
Alper Öztürk ca9f4ecc56 Merge pull request #17937 from nextcloud/fix/picker-back-navigation-to-forbidden-folder
Fix back navigation to forbidden folder in file picker
2026-11-03 10:15:48 +03:00
daniele-verducci 7f8c416572 Fix back navigation to forbidden folder in file picker
Signed-off-by: daniele-verducci <[email protected]>
2026-11-03 09:42:54 +03:00
Alper Öztürk b70acc3cfd Merge pull request #17920 from nextcloud/fix/internal-109155-media-missing-empty-indicator-after-folder-deletion
Fixed empty view not shown in Media
2026-11-03 08:30:23 +03:00
Alper Öztürk d402f3acdb Merge pull request #17884 from nextcloud/improv/updateLibraryHash
Small improvement in update library script
2026-11-03 08:28:40 +03:00
daniele-verducci 8cba126120 Prevent script from failing it running on a macine with the git hooks configured as documented in CONTRIBUTING.md
Signed-off-by: daniele-verducci <[email protected]>
2026-11-02 17:44:52 +01:00
daniele-verducci 6a5224788f Early fail with clear message on updateLibraryHash to prevent confusion
Signed-off-by: daniele-verducci <[email protected]>
2026-11-02 17:44:52 +01:00
daniele-verducci 3ec1c781d9 Spotless
Signed-off-by: daniele-verducci <[email protected]>
2026-11-02 17:42:07 +01:00
Daniele VerducciandAlper Öztürk fec574b981 Oneliner with null casting for setHasFooter
Co-authored-by: Alper Öztürk <[email protected]>
Signed-off-by: Daniele Verducci <[email protected]>
2026-11-02 16:24:48 +01:00
daniele-verducci 2fc9fa2807 Fixed empty view not triggered in Media due to EmptyRecyclerView still expecting a footer
Signed-off-by: daniele-verducci <[email protected]>
2026-11-02 16:24:48 +01:00
alperozturk96 9875eb5303 better translation
Signed-off-by: alperozturk96 <[email protected]>
2026-11-02 14:46:22 +03:00
alperozturk96 a0d9a0c3b6 add cancel button
Signed-off-by: alperozturk96 <[email protected]>
2026-11-02 14:46:22 +03:00
alperozturk96 e7fee59135 fix download cancel
Signed-off-by: alperozturk96 <[email protected]>
2026-11-02 14:46:22 +03:00
Alper Öztürk a1ed32bf7b Merge pull request #17933 from nextcloud/fix/lint
fix lint
2026-11-02 14:45:44 +03:00
alperozturk96 aef268c7d7 fix lint
Signed-off-by: alperozturk96 <[email protected]>
2026-11-02 12:36:22 +03:00
renovate[bot] 3b0f7bb0d4 Update ubuntu:resolute Docker digest to 6a06111 (#17930)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-02 06:54:25 +00:00
86bc3a62a4 Update androidPluginVersion to v9.5.0 (#17928)
* Update androidPluginVersion to v9.5.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tobias Kaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Tobias Kaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tobias Kaminsky <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-02 06:47:34 +00:00
Alper Öztürk 9eadf8ed4d Merge pull request #17921 from nextcloud/fix/upload-activity-back-navigation
Fixed back navigation in upload screen
2026-11-02 09:19:05 +03:00
Nextcloud bot 3499350263 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-11-02 04:19:42 +00:00
Andy Scherzinger 3145d45531 Merge pull request #17927 from nextcloud/renovate/gradle-actions-6.x
Update gradle/actions action to v6.4.1
2026-11-01 15:43:23 +01:00
renovate[bot] fde49354af Update gradle/actions action to v6.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-01 14:40:08 +00:00
Nextcloud bot 6362bae384 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-11-01 03:54:54 +00:00
Nextcloud Android Bot d5daee61b0 daily dev 20261031
fix(l10n): Update translations from Transifex
fix ci
get rid of magic number
resolve conflict
wip
wip
handle Image that isn't downloaded via -> fileOnItemClick -> previewImageWithSearchContext        Downloaded text file via -> fileOnItemClick -> previewFile -> startTextPreview        Downloaded audio file via > fileOnItemClick -> previewFile -> startAudioPreview
only sync when user get in directory
print results
simplify startContentSynchronizations
fix spotbugs: (This write of this shared primitive variable may not be visible to other threads)
simplify openFile function
Check local eTag if it's outdated then run SynchronizeFileOperation else skip.
Only add when user open the folder first time not every 10 seconds.
reduce auto folder refresh to 10 seconds
use kotlin durations
remove sync in progress dialog
add missing items for mFilesToSyncContents
wip
fix spotbugs and convert cursor implm to kotlin
Rename .java to .kt
use injections
optimize imports
restructure package
refactor(document-storage-provider): kotlin
Rename .java to .kt
Update dependency com.google.code.gson:gson to v2.15.0 (#17894)
Update dependency fastlane to v2.241.1
simplify
refactor
refactor
2026-10-31 05:03:54 +00:00
Nextcloud Android Bot 4ba83c8e75 Merge remote-tracking branch 'origin/master' into dev 2026-10-31 05:00:22 +00:00
Nextcloud bot 23baa00e31 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-31 03:43:38 +00:00
daniele-verducci 0578c7299c Fixed back navigation in upload screen
Signed-off-by: daniele-verducci <[email protected]>
2026-10-30 19:27:59 +01:00
alperozturk96 6533ecd576 fix(file-list): flicker
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 17:01:20 +03:00
alperozturk96 8b491d86a8 remove dead code
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 16:08:44 +03:00
alperozturk96 54a8f0a495 fix(navigation): all files
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 16:01:08 +03:00
alperozturk96 01ce97e453 use correct variable name for request code
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 15:39:35 +03:00
Alper Öztürk 593d7e09fb Merge pull request #17725 from nextcloud/feat/remove-retrieve-last-version
feat(open-file): remove syncing dialog
2026-10-30 15:20:36 +03:00
Alper Öztürk 58ef1b9a6d Merge pull request #17910 from nextcloud/refactor/document-storage-provider-kotlin
refactor(document-storage-provider): kotlin
2026-10-30 15:16:33 +03:00
alperozturk96 908a7e3d05 fix ci
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:46:44 +03:00
alperozturk96 ddefc90ed8 get rid of magic number
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:44:06 +03:00
alperozturk96 4b6a7b0c59 resolve conflict
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:39:37 +03:00
alperozturk96 ce7f23d282 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:26 +03:00
alperozturk96 cc7a22e8b7 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:26 +03:00
alperozturk96 0151b454a6 handle Image that isn't downloaded via -> fileOnItemClick -> previewImageWithSearchContext
Downloaded text file via -> fileOnItemClick -> previewFile -> startTextPreview
       Downloaded audio file via > fileOnItemClick -> previewFile -> startAudioPreview

Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:21 +03:00
alperozturk96 91af72e96c only sync when user get in directory
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:17 +03:00
alperozturk96 e0f7094c90 print results
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:14 +03:00
alperozturk96 10d1f99526 simplify startContentSynchronizations
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:13 +03:00
alperozturk96 a4f82c1df6 fix spotbugs: (This write of this shared primitive variable may not be visible to other threads)
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:12 +03:00
alperozturk96 bf430c7265 simplify openFile function
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:22:07 +03:00
alperozturk96 c17763d2c6 Check local eTag if it's outdated then run SynchronizeFileOperation else skip.
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/nextcloud/utils/extensions/OCFileExtensions.kt
2026-10-30 14:22:07 +03:00
alperozturk96 288c4d81d0 Only add when user open the folder first time not every 10 seconds.
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt
2026-10-30 14:22:06 +03:00
alperozturk96 9d2c134bb7 reduce auto folder refresh to 10 seconds
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:21:56 +03:00
alperozturk96 2271bb9f35 use kotlin durations
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:21:56 +03:00
alperozturk96 db29c5d677 remove sync in progress dialog
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:21:56 +03:00
alperozturk96 b998db6394 add missing items for mFilesToSyncContents
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 14:21:55 +03:00
alperozturk96 3a82580828 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:37:05 +03:00
alperozturk96 cfb75c64e1 move logic inside enum
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:36:01 +03:00
alperozturk96 232fa2ea6e unify fab state logic
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt
2026-10-30 13:35:58 +03:00
Alper Öztürk 3f73de97ef Merge pull request #17902 from nextcloud/refactor/file-display-activity
refactor(file-display-activity)
2026-10-30 13:34:49 +03:00
alperozturk96 84122f24e4 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:54 +03:00
alperozturk96 93d1eeb8ce fix spotbugs and convert cursor implm to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
alperozturk96 722823c9c4 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
alperozturk96 60be5044ea use injections
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
alperozturk96 ecefd79e91 optimize imports
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
alperozturk96 528bd1f191 restructure package
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
alperozturk96 ed2bfb4599 refactor(document-storage-provider): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
alperozturk96 020edd6500 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-30 13:29:28 +03:00
renovate[bot] 26f565510d Update dependency com.google.code.gson:gson to v2.15.0 (#17894)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-30 09:29:26 +00:00
Tobias Kaminsky 8aefbb1d58 Merge pull request #17907 from nextcloud/renovate/fastlane-2.x-lockfile
Update dependency fastlane to v2.241.1
2026-10-30 09:28:30 +01:00
Nextcloud Android Bot 5d3e00ee2d daily dev 20261030
fix(l10n): Update translations from Transifex
update lib
wip
refactor(get-public-key): rename to get certificate
🔄 synced local '.' with remote 'config/root/'
🔄 synced local 'fastlane/' with remote 'config/fastlane/'
Update library to 2026-10-29
increase long method to 120
improve ContentUriLastModifiedResolver
add fallback to OS.fstat via ContentUriLastModifiedResolver
fix(copy-upload): modification date
refactor document storage provider
fix null path and concurrent modification issue
fix wrote
add more logs
check parent folder existance
adopt latest changes from master
build(fastlane): disable R8 optimization for release builds
remove codacy
2026-10-30 05:07:29 +00:00
Nextcloud Android Bot 2fb01ffcd4 Merge remote-tracking branch 'origin/master' into dev 2026-10-30 05:03:36 +00:00
Nextcloud bot fb4cb3421f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-30 03:48:09 +00:00
Alper Öztürk cc16cd5075 Merge pull request #17860 from nextcloud/remove-confusion-for-e2ee-operations
refactor(get-public-key): rename to get certificate
2026-10-29 17:18:19 +03:00
alperozturk96 25efb018de update lib
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 17:08:00 +03:00
alperozturk96 4fc858e987 wip
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	gradle/libs.versions.toml
2026-10-29 17:02:36 +03:00
alperozturk96 97fe7e99e1 refactor(get-public-key): rename to get certificate
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	gradle/libs.versions.toml
2026-10-29 17:02:26 +03:00
Alper Öztürk 72483540ae Merge pull request #17841 from nextcloud/update-fastlane
build(fastlane): disable R8 optimization for release builds
2026-10-29 16:18:34 +03:00
Alper Öztürk 3348df5cf8 Merge pull request #17704 from nextcloud/fix/modification-date
fix(copy-upload): modification date
2026-10-29 16:13:47 +03:00
Alper Öztürk 58673046f2 Merge pull request #17890 from nextcloud/fix/document-storage-provider
fix(document-storage-provider): exceptions
2026-10-29 16:11:29 +03:00
renovate[bot] 62d234e059 Update dependency fastlane to v2.241.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 11:47:28 +00:00
Tobias Kaminsky a6a217cf9b Merge pull request #17904 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2026-10-29 12:45:37 +01:00
Tobias Kaminsky 6a0f80be69 Merge pull request #17903 from nextcloud/update-library-2026-10-29
Update library to 2026-10-29
2026-10-29 10:33:24 +01:00
nextcloud-android-bot 23f18c3f6d 🔄 synced local '.' with remote 'config/root/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-10-29 08:00:20 +00:00
nextcloud-android-bot c1ca00ec7b 🔄 synced local 'fastlane/' with remote 'config/fastlane/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-10-29 08:00:20 +00:00
nextcloud-android-bot 1e45fd05c1 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-10-29 08:00:20 +00:00
Tobias Kaminsky 101ad50866 Merge pull request #17868 from nextcloud/remove-codacy
chore: remove codacy
2026-10-29 08:48:35 +01:00
Nextcloud Android Bot b166304f9a daily dev 20261029
fix(l10n): Update translations from Transifex
fix(player): in favorite
Fix QR login when enforced servers are not defined
split into child classes to simplify logic
split into child classes to simplify logic
convert tests to kotlin
convert async task to coroutines
refactor(authenticator-activity): kotlin
Rename .java to .kt
wip
refactor PreviewTextFileFragment convert to kotlin
refactor PreviewTextFileFragment convert to kotlin
refactor PreviewTextFileFragment convert to kotlin
Rename .java to .kt
refactor(file-actions): unify preview fragments
refactor(file-actions): unify preview fragments
fix(l10n): Update translations from Transifex
simplify
simplify
refactor(oc-file-list-fragment): kotlin
Rename .java to .kt
Update dependency org.conscrypt:conscrypt-android to v2.8.0 (#17875)
clarify semVer
extract Fastlane
Fix SpotBugs LITERAL_STRING_COMPARISON
Implemented MOVE WebDAV method in InputStreamBinder to make it available trough Android-SingleSignOn lib
fix(i18n): Fix typo in gallery unsupported file message
fix double duplicate snackbar
add better error message for weak password
fix enforce password check
Update Nextcloud Android library
2026-10-29 07:21:39 +00:00
Nextcloud Android Bot 3644ddc8ed Merge remote-tracking branch 'origin/master' into dev 2026-10-29 07:18:38 +00:00
Tobias Kaminsky 24e07557ee Merge pull request #17898 from nextcloud/extractHashCheck
library hash check is extracted to daily check on server
2026-10-29 08:11:58 +01:00
Nextcloud Android Bot 28c97540f6 Update library to 2026-10-29
Signed-off-by: Nextcloud Android Bot <[email protected]>
2026-10-29 07:11:33 +00:00
alperozturk96 8f25744c93 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 09:25:18 +03:00
Alper Öztürk e85d31cc1c Merge pull request #17900 from nextcloud/fix/qrcode-login-when-no-enforced-servers
Fix QR login
2026-10-29 09:12:15 +03:00
alperozturk96 ec37270835 refactor
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 09:09:26 +03:00
alperozturk96 79a6424d74 refactor
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 09:09:00 +03:00
alperozturk96 54d67a271e increase long method to 120
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:49:43 +03:00
alperozturk96 9f8916e5d9 improve ContentUriLastModifiedResolver
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:45:02 +03:00
alperozturk96 e60810d66a add fallback to OS.fstat via ContentUriLastModifiedResolver
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:45:02 +03:00
alperozturk96 e038907f76 fix(copy-upload): modification date
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:45:02 +03:00
alperozturk96 fac406c2ec refactor document storage provider
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:43:50 +03:00
alperozturk96 e7f4dea232 fix null path and concurrent modification issue
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:43:50 +03:00
alperozturk96 a1da79b441 fix wrote
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:43:50 +03:00
alperozturk96 5241e7308c add more logs
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:43:50 +03:00
alperozturk96 d3f4305a87 check parent folder existance
Signed-off-by: alperozturk96 <[email protected]>
2026-10-29 08:43:50 +03:00
Nextcloud bot f9c3e5e617 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-29 03:50:00 +00:00
Andy Scherzinger e5117680ac Merge pull request #17876 from nextcloud/rakekniven-patch-2
fix(i18n): Fix typo in gallery unsupported file message
2026-10-28 20:33:51 +01:00
alperozturk96 bf09016f26 adopt latest changes from master
Signed-off-by: alperozturk96 <[email protected]>
2026-10-28 19:25:35 +03:00
alperozturk96 07488b2e8e build(fastlane): disable R8 optimization for release builds
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	fastlane/Fastfile
2026-10-28 19:21:24 +03:00
tobiasKaminsky 002c021319 library hash check is extracted to daily check on server
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-28 19:16:23 +03:00
Alper Öztürk 535e7b737b Merge pull request #17901 from nextcloud/fix/player-in-favorite
fix(player): in favorite
2026-10-28 19:13:33 +03:00
alperozturk96 c0d3da9368 fix(player): in favorite
Signed-off-by: alperozturk96 <[email protected]>
2026-10-28 16:57:13 +03:00
daniele-verducci ee6fa543a1 Fix QR login when enforced servers are not defined
Signed-off-by: daniele-verducci <[email protected]>
2026-10-28 14:43:24 +01:00
alperozturk96 119916bb03 refactor(error-message-adapter): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-28 16:37:46 +03:00
alperozturk96 11045a2549 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-28 16:37:46 +03:00
Alper Öztürk 4b7a08757d Merge pull request #17891 from nextcloud/refactor/authenticator-activity-kotlin
refactor(authenticator-activity): kotlin
2026-10-28 16:23:31 +03:00
Alper Öztürk 29ba77473b Merge pull request #17848 from nextcloud/fix/sharing-enforce-protection-for-public-links
fix(share): enforce protection for public links
2026-10-28 12:03:23 +03:00
alperozturk96 3fd412d838 split into child classes to simplify logic
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 19:35:35 +03:00
alperozturk96 5e02399b1c split into child classes to simplify logic
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 19:31:58 +03:00
alperozturk96 0b6bc33285 convert tests to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 19:31:42 +03:00
alperozturk96 a6b6e59d11 convert async task to coroutines
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 19:19:15 +03:00
alperozturk96 19cbac87c2 refactor(authenticator-activity): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 19:14:27 +03:00
alperozturk96 f0fb4a044c Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 19:14:26 +03:00
alperozturk96 9bff11a311 remove codacy
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 16:18:07 +01:00
Alper Öztürk 0688788230 Merge pull request #17867 from nextcloud/refactor/unify-file-action
refactor(file-actions): unify preview fragments
2026-10-27 16:01:47 +01:00
alperozturk96 962de1d4c8 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 17:03:11 +03:00
alperozturk96 b194dee07b refactor PreviewTextFileFragment convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 17:03:11 +03:00
alperozturk96 a23160b4e4 refactor PreviewTextFileFragment convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 17:03:11 +03:00
alperozturk96 9f5dcd7116 refactor PreviewTextFileFragment convert to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 17:03:11 +03:00
alperozturk96 4057b4ccd1 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-27 17:03:11 +03:00
alperozturk96 632396f0f7 refactor(file-actions): unify preview fragments
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
2026-10-27 17:03:11 +03:00
alperozturk96 9bf5602c2d refactor(file-actions): unify preview fragments
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/preview/media/PreviewMediaFragment.kt
2026-10-27 17:03:10 +03:00
Alper Öztürk 2e628d8f62 Merge pull request #17886 from nextcloud/refactor/oc-file-list-fragment-kotlin
refactor(oc-file-list-fragment): kotlin
2026-10-27 14:53:49 +01:00
Tobias Kaminsky a8c54accbd Merge pull request #17852 from nextcloud/feat/support-move-method
Implemented MOVE WebDAV method for SSO requests
2026-10-27 10:12:31 +01:00
Nextcloud bot 3679c7f2c2 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-27 03:52:42 +00:00
alperozturk96 1d9bbe9c55 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-26 19:47:21 +03:00
alperozturk96 27f706f257 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-26 19:26:57 +03:00
alperozturk96 e25410438f refactor(oc-file-list-fragment): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-26 19:13:30 +03:00
alperozturk96 afb55de964 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-26 19:13:29 +03:00
renovate[bot]andTobias Kaminsky 2997278f40 Update dependency org.conscrypt:conscrypt-android to v2.8.0 (#17875)
* Update dependency org.conscrypt:conscrypt-android to v2.8.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Signed-off-by: Tobias Kaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Tobias Kaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tobias Kaminsky <[email protected]>
2026-10-26 15:59:24 +00:00
Tobias Kaminsky 1795cde04f Merge pull request #17731 from nextcloud/extractFastlane
extract Fastlane
2026-10-26 16:40:19 +01:00
tobiasKaminsky 4ea5d865ce clarify semVer
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-26 16:18:08 +01:00
tobiasKaminsky 85604bbe85 extract Fastlane
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-26 16:18:05 +01:00
Nextcloud Android Bot ebab8624fa daily dev 20261026
Update dependency androidx.webkit:webkit to v1.18.0 (#17879)
Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.12.0 (#17872)
Update library to 2026-10-26
fix(l10n): Update translations from Transifex
Update dependency com.google.firebase:firebase-messaging to v26.0.1
fix(l10n): Update translations from Transifex
fix(l10n): Update translations from Transifex
Update Gradle to v9.8.2
chore(detekt): relax rules and drop obsolete suppressions
fix lint
fix(l10n): Update translations from Transifex
fix error: cannot find symbol     import androidx.lifecycle.ProcessLifecycleOwner;
abi optimization for build and remove data binding and is fork
disable data binding
use in file actions bottom sheet
introduce reusable filenameview
fix(file-list): renew after upload
simplify
simplify
migrate oc file list fragment
migrate file detail actions to file action handler
use app consts
fix dir observation
fix icon changes
set current folder id
add file download progress in current folder sync
use worker instead local broadcast manager
fix kotlin spotless bug
fix kotlin spotless bug
Wait for proxy only if there's a proxy configured
refactor(web-view-util): use ProxyController
rebase
Fix: areImageDimensionsSame remote file check is now symmetric to local one (it doesn't fail when dimensions are unknown)
replace deprecated api with display metrics
deduplicate display size logic
refactor(thumbail-cache-manager): resized image generation
remove dead code
fix(ical4j): match nullable getTzId() return type from ical4j 4.4.0
fix verification-metadata.xml
fix verification-metadata.xml
fix verification-metadata.xml
fix verification-metadata.xml
Update dependency com.github.albfernandez:juniversalchardet to v2.5.1
Update dependency org.mnode.ical4j:ical4j to v4.4.0
fix verification-metadata.xml
Update dependency com.diffplug.spotless to v8.10.4
2026-10-26 13:42:10 +00:00
Nextcloud Android Bot 1832b9f9c7 Merge remote-tracking branch 'origin/master' into dev 2026-10-26 13:38:12 +00:00
daniele-verducci 1984c94a85 Fix SpotBugs LITERAL_STRING_COMPARISON
Signed-off-by: daniele-verducci <[email protected]>
2026-10-26 14:10:57 +01:00
daniele-verducci c8bcb9c1d8 Implemented MOVE WebDAV method in InputStreamBinder to make it available trough Android-SingleSignOn lib
Signed-off-by: daniele-verducci <[email protected]>
2026-10-26 13:07:53 +01:00
Alper Öztürk 71c112b0d4 Merge pull request #17866 from nextcloud/feat/provide-long-name-in-file-action-bottom-sheet
feat(file-actions): show long file names on up to three lines
2026-10-26 12:50:49 +01:00
Tobias Kaminsky 9f73851e5f Merge pull request #17882 from nextcloud/update-library-2026-10-26_2
Update library to 2026-10-26
2026-10-26 12:45:43 +01:00
Alper Öztürk 3b653e73f1 Merge pull request #17870 from nextcloud/adjust-detekt
chore(detekt): relax rules and drop obsolete suppressions
2026-10-26 11:59:50 +01:00
renovate[bot]andTobias Kaminsky bc844bc023 Update dependency androidx.webkit:webkit to v1.18.0 (#17879)
* Update dependency androidx.webkit:webkit to v1.18.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Signed-off-by: Tobias Kaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Tobias Kaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tobias Kaminsky <[email protected]>
2026-10-26 10:31:25 +00:00
renovate[bot] 72ba1d8d46 Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.12.0 (#17872)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-26 10:50:07 +01:00
daniele-verducci 516934fc91 Update library to 2026-10-26
Signed-off-by: daniele-verducci <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-26 10:33:33 +01:00
Tobias Kaminsky 2804ff620f Merge pull request #17877 from nextcloud/renovate/firebasemessagingversion
Update dependency com.google.firebase:firebase-messaging to v26.0.1
2026-10-26 08:42:51 +01:00
Tobias Kaminsky 05d28f8872 Merge pull request #17871 from nextcloud/renovate/gradle-9.x
Update Gradle to v9.8.2
2026-10-26 08:42:13 +01:00
Nextcloud bot 0bbf14e92c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-26 03:54:11 +00:00
Andy Scherzinger eacb7e4dc0 Merge pull request #17878 from nextcloud/renovate/github-codeql-action-4.x
Update github/codeql-action action to v4.39.1
2026-10-25 22:05:50 +01:00
renovate[bot] 7ba1a758b8 Update github/codeql-action action to v4.39.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-25 18:39:38 +00:00
renovate[bot] e12b988158 Update dependency com.google.firebase:firebase-messaging to v26.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-25 18:39:24 +00:00
rakekniven 7cc0c88983 fix(i18n): Fix typo in gallery unsupported file message
Reported at Transifex

Signed-off-by: rakekniven <[email protected]>
2026-10-25 18:03:27 +01:00
Nextcloud bot 364883a6ec fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-25 04:17:57 +00:00
Ruby20-50 7a5c48a9f0 Add unit tests for DateFormatPattern
Format a fixed date with each pattern and compare the result with the example given in the pattern's documentation.

Signed-off-by: Ruby20-50 <[email protected]>
2026-10-24 10:56:46 +02:00
Nextcloud bot cae2070490 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-24 03:49:12 +00:00
renovate[bot] 54e6dd4432 Update Gradle to v9.8.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-23 18:30:38 +00:00
alperozturk96 8b3f38c610 chore(detekt): relax rules and drop obsolete suppressions
Signed-off-by: alperozturk96 <[email protected]>
2026-10-23 12:01:50 +02:00
Alper Öztürk d57fdc8981 Merge pull request #17869 from nextcloud/fix/lint
fix lint
2026-10-23 11:46:41 +02:00
alperozturk96 5a761b28f3 fix lint
Signed-off-by: alperozturk96 <[email protected]>
2026-10-23 11:27:34 +02:00
Tobias Kaminsky 580b4203a2 Merge pull request #17737 from nextcloud/renovate/spotless
Update dependency com.diffplug.spotless to v8.10.4
2026-10-23 10:01:31 +02:00
Tobias Kaminsky dd64c29490 Merge pull request #17820 from nextcloud/renovate/juniversalchardetversion
Update dependency com.github.albfernandez:juniversalchardet to v2.5.1
2026-10-23 10:01:14 +02:00
Tobias Kaminsky 868922abcd Merge pull request #17859 from nextcloud/renovate/ubuntu-26.x
Update dependency ubuntu to v26
2026-10-23 10:01:01 +02:00
Tobias Kaminsky 83727c2834 Merge pull request #17779 from nextcloud/renovate/ical4jversion
Update dependency org.mnode.ical4j:ical4j to v4.4.0
2026-10-23 09:03:59 +02:00
tobiasKaminsky 866709070e fix kvm
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-23 08:50:15 +02:00
renovate[bot] 760f573edb Update dependency ubuntu to v26
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-23 08:48:26 +02:00
Nextcloud bot f15b2f9dc4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-23 03:55:00 +00:00
alperozturk96 6558f45f6e fix error: cannot find symbol
import androidx.lifecycle.ProcessLifecycleOwner;

Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 16:15:05 +02:00
alperozturk96 2bbb2d386e abi optimization for build and remove data binding and is fork
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 15:29:45 +02:00
alperozturk96 40a4a27fe4 disable data binding
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 15:24:12 +02:00
Alper Öztürk c4932a7046 Merge pull request #17864 from nextcloud/refactor/unify-file-actions
refactor(file-actions): unify
2026-10-22 14:42:30 +02:00
Alper Öztürk 4f732286bb Merge pull request #17865 from nextcloud/fix/file-list-update
fix(file-list): renew after upload
2026-10-22 14:36:24 +02:00
alperozturk96 741a9eea3e use in file actions bottom sheet
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 14:30:39 +02:00
alperozturk96 af2643eee2 introduce reusable filenameview
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 14:30:31 +02:00
alperozturk96 9a73d3a712 fix(file-list): renew after upload
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 11:40:59 +02:00
alperozturk96 6e49655948 simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 10:35:53 +02:00
alperozturk96 2d61551c8a simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 10:05:38 +02:00
alperozturk96 f1e4f35abe migrate oc file list fragment
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 10:01:39 +02:00
Alper Öztürk 6e7bbf4178 Merge pull request #17842 from nextcloud/observe-file-downloads-in-folder
feat(folder-download): observe file downloads
2026-10-22 09:46:08 +02:00
alperozturk96 347cf282ba migrate file detail actions to file action handler
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 09:26:12 +02:00
Alper Öztürk 5cfdf3089f Merge pull request #17850 from nextcloud/refactor/web-view-util
refactor(web-view-util): use proxy controller
2026-10-22 09:02:12 +02:00
alperozturk96 b5ec4f4769 use app consts
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:57:07 +02:00
alperozturk96 d87ea8dd3a fix dir observation
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:57:07 +02:00
alperozturk96 c621738ae7 fix icon changes
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:57:07 +02:00
alperozturk96 d98ce8454c set current folder id
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:57:07 +02:00
alperozturk96 8f9cb4f7a9 add file download progress in current folder sync
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:57:07 +02:00
alperozturk96 56ee9fdb43 use worker instead local broadcast manager
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:57:07 +02:00
Alper Öztürk b68e602800 Merge pull request #17826 from nextcloud/fix/internal-105127
Fix local/remote image file comparison
2026-10-22 08:55:45 +02:00
Alper Öztürk 71881954dc Merge pull request #17851 from nextcloud/refactor/resized-image-generation-task
refactor(thumbail-cache-manager): resized image generation
2026-10-22 08:52:41 +02:00
alperozturk96 8ff8cd8be1 fix kotlin spotless bug
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:27:54 +02:00
alperozturk96 760bd4d79d fix kotlin spotless bug
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:25:03 +02:00
daniele-verducci ceb1d38c48 Wait for proxy only if there's a proxy configured
Signed-off-by: daniele-verducci <[email protected]>
2026-10-22 08:20:03 +02:00
alperozturk96 28a8672443 refactor(web-view-util): use ProxyController
Signed-off-by: alperozturk96 <[email protected]>
2026-10-22 08:20:03 +02:00
Nextcloud Android Bot 3639769347 daily dev 20261022
fix(l10n): Update translations from Transifex
Updated android-library
feat(navigator): synced folder activity
feat(navigator): synced folder activity
feat(navigator): synced folder activity
feat(navigator): synced folder activity
Update dependency androidx.annotation:annotation to v1.11.0 (#17721)
refactor: reorganize dialog package structure
fix verification-metadata.xml
fix verification-metadata.xml
refactor(file-detail-fragment): kotlin
Rename .java to .kt
refactor(preview): package structure
refactor(preview): image rename to media
adds more logs to clearly follow execution flow in the logs
use kotlinx instead of gson
handle restore pending login flow and cancel button
Update androidCommonLibraryVersion to
Update dependency androidx.webkit:webkit to v1.17.1
Update Nextcloud Android library
2026-10-22 05:07:23 +00:00
Nextcloud Android Bot 744d1837af Merge remote-tracking branch 'origin/master' into dev 2026-10-22 05:03:52 +00:00
Nextcloud bot 671c4df2d3 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-22 03:48:09 +00:00
daniele-verducci 332f6f58ce Refactored tests
Signed-off-by: daniele-verducci <[email protected]>
2026-10-21 17:15:33 +02:00
alperozturk96 62e06864a1 rebase
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 17:15:33 +02:00
daniele-verducci 5d84351639 Implemented tests
Signed-off-by: daniele-verducci <[email protected]>

# Conflicts:
#	app/src/main/java/com/nextcloud/utils/extensions/RemoteFileExtensions.kt
2026-10-21 17:15:33 +02:00
daniele-verducci 300eb6fd4c Fix: areImageDimensionsSame remote file check is now symmetric to local one (it doesn't fail when dimensions are unknown)
Signed-off-by: daniele-verducci <[email protected]>
2026-10-21 17:15:33 +02:00
Alper Öztürk 6645a685d4 Merge pull request #17863 from nextcloud/update-library-2026-10-21
Updated android-library
2026-10-21 17:12:29 +02:00
daniele-verducci c586fecd3e Updated android-library
Signed-off-by: daniele-verducci <[email protected]>
2026-10-21 17:06:22 +02:00
alperozturk96 75c655a544 replace deprecated api with display metrics
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 16:55:14 +02:00
alperozturk96 e00baeca70 deduplicate display size logic
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 16:55:14 +02:00
alperozturk96 9a331f76f0 refactor(thumbail-cache-manager): resized image generation
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 16:55:14 +02:00
alperozturk96 2c2c8cd1b9 remove dead code
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 16:54:36 +02:00
Alper Öztürk 3f9d8d4878 Merge pull request #17844 from nextcloud/refactor/file-detail-fragment-kotlin
refactor(file-detail-fragment): kotlin
2026-10-21 16:53:03 +02:00
Alper Öztürk a2596d220c Merge pull request #17824 from nextcloud/improve-login-flow
Improve login flow
2026-10-21 16:51:16 +02:00
Alper Öztürk e0630f0bed Merge pull request #17854 from nextcloud/feat/navigator-synced-folders-activity
feat(navigator): synced folder activity
2026-10-21 15:21:28 +02:00
alperozturk96 ab74cf7ba2 feat(navigator): synced folder activity
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 14:37:31 +02:00
alperozturk96 9703cb10ad feat(navigator): synced folder activity
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 14:37:31 +02:00
alperozturk96 8d149f3a00 feat(navigator): synced folder activity
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 14:37:31 +02:00
alperozturk96 43b3ba870f feat(navigator): synced folder activity
Signed-off-by: alperozturk96 <[email protected]>
2026-10-21 14:37:31 +02:00
Alper Öztürk f738ac0621 Merge pull request #17840 from nextcloud/refactor/resolve-naming-confusion
refactor(preview): structure, naming
2026-10-21 11:24:53 +02:00
Alper Öztürk df13e8b5cd Merge pull request #17853 from nextcloud/refactor/reorganize-package-structure
refactor: reorganize dialog package structure
2026-10-21 11:19:27 +02:00
Tobias Kaminsky ee9b8b5380 fix(ical4j): match nullable getTzId() return type from ical4j 4.4.0
ical4j 4.4.0 annotates TimeZoneRegistry.getTzId() as @Nullable (it can
return null when the zone id has no mapping). Update the override to
match, fixing a Kotlin compile error introduced by the ical4j bump.

Signed-off-by: Tobias Kaminsky <[email protected]>
2026-10-21 11:07:47 +02:00
Tobias Kaminsky 12d5fc543f fix verification-metadata.xml
Signed-off-by: Tobias Kaminsky <[email protected]>
2026-10-21 10:30:46 +02:00
Tobias Kaminsky e74ed7f033 fix verification-metadata.xml
Signed-off-by: Tobias Kaminsky <[email protected]>
2026-10-21 10:30:43 +02:00
tobiasKaminsky 37c595bae9 fix verification-metadata.xml
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-21 09:31:51 +02:00
tobiasKaminsky b45f336aef fix verification-metadata.xml
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-21 09:11:52 +02:00
renovate[bot] b819e8081f Update dependency com.github.albfernandez:juniversalchardet to v2.5.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 09:11:49 +02:00
renovate[bot] cd3cee246b Update dependency org.mnode.ical4j:ical4j to v4.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 09:10:42 +02:00
tobiasKaminsky 872bf3f95a fix verification-metadata.xml
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-21 09:04:03 +02:00
renovate[bot] 10cd0fa39a Update dependency com.diffplug.spotless to v8.10.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 09:04:03 +02:00
renovate[bot]andtobiasKaminsky 844c268e01 Update dependency androidx.annotation:annotation to v1.11.0 (#17721)
* Update dependency androidx.annotation:annotation to v1.11.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Signed-off-by: tobiasKaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: tobiasKaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: tobiasKaminsky <[email protected]>
2026-10-21 06:35:15 +00:00
Tobias Kaminsky 6ad4226d37 Merge pull request #17858 from nextcloud/renovate/ubuntu-resolute
Update ubuntu:resolute Docker digest to c098726
2026-10-21 08:02:38 +02:00
Tobias Kaminsky f790ef71a9 Merge pull request #17720 from nextcloud/renovate/webkitversion
Update dependency androidx.webkit:webkit to v1.17.1
2026-10-21 08:02:03 +02:00
renovate[bot] b8c4886a57 Update ubuntu:resolute Docker digest to c098726
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 05:46:34 +00:00
Tobias Kaminsky 4e5ce14e26 Merge pull request #17673 from nextcloud/renovate/major-androidcommonlibraryversion
Update androidCommonLibraryVersion to (major)
2026-10-21 07:44:55 +02:00
renovate[bot] 86bf8ce18b Update actions/setup-java action to v6.1.0 (#17857)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 05:20:26 +00:00
Nextcloud Android Bot 791b822b2c daily dev 20261021
fix(l10n): Update translations from Transifex
Update dependency com.google.android.gms:play-services-base to v18.11.1 (#17855)
Update dependency com.github.spotbugs to v6.5.12 (#17747)
Update kotlin monorepo to v2.4.21 (#17831)
Update dependency com.google.firebase:firebase-messaging to v26 (#17833)
update android lib
refactor(app): time constants
update unsupported text
move view logic to the xmls
use gallery cell instead of introducing another index
feat(gallery): indicate unsupported media
Update Nextcloud Android library
2026-10-21 05:07:27 +00:00
Nextcloud Android Bot 2800af748c Merge remote-tracking branch 'origin/master' into dev 2026-10-21 05:02:11 +00:00
Nextcloud bot 8174f063c6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-21 03:39:01 +00:00
renovate[bot] d510714670 Update dependency com.google.android.gms:play-services-base to v18.11.1 (#17855)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-20 19:45:58 +00:00
alperozturk96 196853c84c refactor: reorganize dialog package structure
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 13:36:03 +02:00
renovate[bot]andtobiasKaminsky c6551ff3f5 Update dependency com.github.spotbugs to v6.5.12 (#17747)
* Update dependency com.github.spotbugs to v6.5.13

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Signed-off-by: tobiasKaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: tobiasKaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: tobiasKaminsky <[email protected]>
2026-10-20 10:23:22 +00:00
renovate[bot]andtobiasKaminsky 665b42d027 Update kotlin monorepo to v2.4.21 (#17831)
* Update kotlin monorepo to v2.4.21

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Signed-off-by: tobiasKaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: tobiasKaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: tobiasKaminsky <[email protected]>
2026-10-20 10:20:09 +00:00
tobiasKaminsky b757fdd662 fix verification-metadata.xml
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-20 10:56:21 +02:00
tobiasKaminsky 8ed232923a fix verification-metadata.xml
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-20 10:51:43 +02:00
renovate[bot]andtobiasKaminsky d9ba67eb05 Update dependency com.google.firebase:firebase-messaging to v26 (#17833)
* Update dependency com.google.firebase:firebase-messaging to v26

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix verification-metadata.xml

Signed-off-by: tobiasKaminsky <[email protected]>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: tobiasKaminsky <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: tobiasKaminsky <[email protected]>
2026-10-20 08:40:34 +00:00
alperozturk96 d034ef94ad fix double duplicate snackbar
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 08:54:00 +02:00
alperozturk96 4f4e403fd7 add better error message for weak password
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 08:47:31 +02:00
alperozturk96 9bf6a7be02 fix enforce password check
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 08:41:11 +02:00
Alper Öztürk 6003baf295 Merge pull request #17796 from nextcloud/feat/show-unsupported-files-in-media
feat(gallery): indicate unsupported media
2026-10-20 07:34:57 +02:00
alperozturk96 4082cc635d refactor(file-detail-fragment): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 07:33:53 +02:00
alperozturk96 e2c412c0d4 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 07:33:53 +02:00
Alper Öztürk 1a747ce089 Merge pull request #17847 from nextcloud/upgrade-lib
update android lib
2026-10-20 07:33:30 +02:00
alperozturk96 f7040b4f6a update android lib
Signed-off-by: alperozturk96 <[email protected]>
2026-10-20 07:33:05 +02:00
Alper Öztürk 7b9ec18ded Merge pull request #17843 from nextcloud/refactor/app-constants
refactor(app): time constants
2026-10-20 07:23:22 +02:00
Nextcloud Android Bot 4d5a68d395 daily dev 20261020
fix(l10n): Update translations from Transifex
fix(l10n): Update translations from Transifex
Keep screen on while video is playing
Video/Image player: hide all system bars when going fullscreen instead of leaving the top system bar in place
2026-10-20 05:03:46 +00:00
Nextcloud Android Bot 512b8866e4 Merge remote-tracking branch 'origin/master' into dev 2026-10-20 05:00:10 +00:00
Nextcloud bot 6c9e7d4cae fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-20 03:50:24 +00:00
alperozturk96 8636d2f589 refactor(app): time constants
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 15:16:02 +02:00
alperozturk96 2b7002e8df update unsupported text
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 15:11:54 +02:00
alperozturk96 8671504052 move view logic to the xmls
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 15:09:59 +02:00
alperozturk96 18e9648ac3 use gallery cell instead of introducing another index
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 15:09:59 +02:00
alperozturk96 26fafa3dd4 feat(gallery): indicate unsupported media
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 15:09:58 +02:00
alperozturk96 f0086b64f3 refactor(preview): package structure
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 09:38:24 +02:00
alperozturk96 1e674fcc10 refactor(preview): image rename to media
Signed-off-by: alperozturk96 <[email protected]>
2026-10-19 09:34:27 +02:00
Alper Öztürk 0ae8a0be73 Merge pull request #17830 from nextcloud/fix/17825-video-player-timeout-fullscreen
Video player: fullscreen now hides system status bar, keep screen on while video is playing
2026-10-19 09:31:16 +02:00
Nextcloud bot c7545d8c80 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-19 03:48:58 +00:00
Nextcloud Android Bot b679c46d4f daily dev 20261018
fix(l10n): Update translations from Transifex
fix(l10n): Update translations from Transifex
Update dependency fastlane to v2.241.0
fix(l10n): Update translations from Transifex
Update Nextcloud Android library
2026-10-18 05:03:51 +00:00
Nextcloud Android Bot 59aa9b3f19 Merge remote-tracking branch 'origin/master' into dev 2026-10-18 05:00:13 +00:00
Nextcloud bot ef4a2de0d2 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-18 03:50:10 +00:00
Nextcloud bot 908900dd66 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-17 03:52:50 +00:00
Andy Scherzinger 987bfcd7fa Merge pull request #17832 from nextcloud/renovate/fastlane-2.x-lockfile
Update dependency fastlane to v2.241.0
2026-10-16 18:48:53 +02:00
renovate[bot] 3e2b6489ba Update dependency fastlane to v2.241.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-16 16:02:56 +00:00
daniele-verducci bf6a0ce441 Keep screen on while video is playing
Signed-off-by: daniele-verducci <[email protected]>
2026-10-16 17:14:24 +02:00
daniele-verducci cce5f77c63 Video/Image player: hide all system bars when going fullscreen instead of leaving the top system bar in place
Signed-off-by: daniele-verducci <[email protected]>
2026-10-16 17:14:24 +02:00
Andy Scherzinger 0dc932709a Merge pull request #17829 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2026-10-16 09:05:44 +02:00
nextcloud-android-bot 9d78e7267a 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-10-16 06:43:15 +00:00
Nextcloud bot b2fb75b4bd fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-16 03:51:47 +00:00
Nextcloud Android Bot a1edefff2b daily dev 20261015
fix(l10n): Update translations from Transifex
fix padding
wip
add HeaderFirstNestedScrollView
make widget images rounded as well
fix kotlin spotless
handle picture drawable as well
add monochrome icon support and use correct size for unified search
update glide
update widget calls
unify widget icon sizes
decode SVG
update item id for downloaded files because FragmentStateAdapter.java relies on item id to remove and replace
wip
Create local folders metadata to reflect server's auto folder creation
Moved dir tree creation to extensions (automatic java to kotlin conversion) Signed-off-by: daniele-verducci <[email protected]>
Rebased
Use isOlderThan on capabilities for code readability
Apply suggestion from @alperozturk96
Working new auto folder creation feature on uploads
Updated android-library
feature/create-folder-during-upload: use new auto folder creation feature
add folder mark favorite action
fix spotless check
use kt extension and simplify
reorganize package
simplify adapter
extract item binder
convert java to kotlin
Rename .java to .kt
remove tests since its visible ui action
revert file download indicator since out of scope of the feature and for folder download worker can cause issue
fix(files): hide synced icon after deleting local copy
feat(files): show syncing icon on files while folder downloads
fix(files): avoid list shift when opening details
feat(files): show actions for current folder in toolbar
simplify AvatarGroupLayout
simplify FilesSpecificViewThemeUtils
fix
2026-10-15 05:04:59 +00:00
Nextcloud Android Bot 21e5daf8c8 Merge remote-tracking branch 'origin/master' into dev 2026-10-15 05:01:02 +00:00
Nextcloud bot bbd7357654 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-15 04:16:56 +00:00
Alper Öztürk 011255c972 Merge pull request #17810 from nextcloud/fix/better-file-detail-spacing-for-small-screen-devices
fix(file-detail): better spacing
2026-10-14 14:25:38 +02:00
alperozturk96 7c7582e82f fix padding
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 13:41:07 +02:00
alperozturk96 d8a2540c0c wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 13:41:07 +02:00
alperozturk96 e256e4318b add HeaderFirstNestedScrollView
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt
#	app/src/main/res/layout/file_details_fragment.xml
2026-10-14 13:41:07 +02:00
alperozturk96 0650bf63ab adds more logs to clearly follow execution flow in the logs
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 13:28:42 +02:00
alperozturk96 667bbeda96 use kotlinx instead of gson
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 13:28:42 +02:00
alperozturk96 a6abcbe2a6 handle restore pending login flow and cancel button
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 13:28:42 +02:00
Alper Öztürk 03e831918a Merge pull request #17789 from nextcloud/fix/glide-usage
fix(glide): usages
2026-10-14 13:04:59 +02:00
Alper Öztürk d1c4ae1de3 Merge pull request #17809 from nextcloud/fix/avatar-different-share-types
fix(avatar): different share
2026-10-14 12:38:18 +02:00
alperozturk96 c982815607 make widget images rounded as well
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:25:21 +02:00
alperozturk96 cf9afed442 fix kotlin spotless
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 cc3fb27b0e handle picture drawable as well
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 0f5f56b93b add monochrome icon support and use correct size for unified search
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 53e60b0fa8 update glide
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 0e397e5d84 update widget calls
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 8658c63852 unify widget icon sizes
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 a967b60773 decode SVG
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
alperozturk96 3340a6ed14 update item id for downloaded files because FragmentStateAdapter.java relies on item id to remove and replace
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 11:15:45 +02:00
Alper Öztürk 0cb643efb0 Merge pull request #17618 from nextcloud/feature/create-folder-during-upload
Use new auto folder creation feture available since Nextcloud 32
2026-10-14 11:00:34 +02:00
Alper Öztürk e214663082 Merge pull request #17814 from nextcloud/refactor/oc-file-list-adapter-kotlin
refactor(oc-file-list-adapter): kotlin
2026-10-14 11:00:05 +02:00
alperozturk96 4160bc1783 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci f2d0e0264b Create local folders metadata to reflect server's auto folder creation
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci 8dff5cc6dd Moved dir tree creation to extensions (automatic java to kotlin conversion)
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci f7981451a5 Rebased
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci 04f93eaae9 Use isOlderThan on capabilities for code readability
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducciandAlper Öztürk b30b420815 Apply suggestion from @alperozturk96
Co-authored-by: Alper Öztürk <[email protected]>
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci e75ce43d96 Working new auto folder creation feature on uploads
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci 6e74ab5625 Updated android-library
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
daniele-verducci 0cf019d3a3 feature/create-folder-during-upload: use new auto folder creation feature
Signed-off-by: daniele-verducci <[email protected]>
2026-10-14 09:46:25 +02:00
alperozturk96 2ffd6b8c8f add folder mark favorite action
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:14:03 +02:00
alperozturk96 cec4525b64 fix spotless check
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:12:02 +02:00
alperozturk96 17fc711976 use kt extension and simplify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:12:02 +02:00
alperozturk96 ce5625c831 reorganize package
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:12:01 +02:00
alperozturk96 83636b97af simplify adapter
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:12:01 +02:00
alperozturk96 bba721124e extract item binder
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:12:01 +02:00
alperozturk96 476a76d6b8 convert java to kotlin
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.kt
2026-10-14 09:11:59 +02:00
alperozturk96 d6a98618c3 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-14 09:11:50 +02:00
Alper Öztürk 0699d5ae14 Merge pull request #17817 from nextcloud/feat/current-folder-actions
Add folder actions for folder you are currently in
2026-10-14 08:58:34 +02:00
Nextcloud Android Bot f609b7e052 daily dev 20261014
fix(l10n): Update translations from Transifex
fix rest uploads
fix updated upload
fix move operation
check remote file as well for is file delete
add comment for isFolderDeletedLocally
rename function for storage path that needed two way sync
handle parent folder deletion
handle parent folder deletion and fix spotbugs
handle if server: creates new folder
use UploadFileOperationFactory
use TwoWaySyncOperation.kt instead bloat SynchronizeFolderOperation.java
Internal two way sync: upload new created files/folders
Internal two way sync: upload new created files/folders
update callers
add agent skills for further migrations
update file detail fragment and make progress bar m3
use new listening approach in worker
add new view model for the proper observation
remove dead file download progress listener
remove event bus for file download progress observation
expose file download job tag
update tests
fix build
perf(bitmap): usage
update updateOCFile
update updateOCFile
add tests
refactor(upload-file-operation): upload file resolver
fix tests
Fix tests server data configuration for local dev
verify metadata
Update library to 2026-10-11
fix(l10n): Update translations from Transifex
chore(deps): update gradle to v9.8.1
feat(file-details): previews
logs errors
refactor(file-storage-utils): kotlin
Rename .java to .kt
deprecate ClientFactory
update AGENTS.md fur further usages
use ClientRepository in AlbumItemsFragment for future reference
inject dependencies for the remote client repository
refactor(media-thumbnail-generation): kotlin
update usage of the new push configuration data classes
use app wide json kotlinx for other classes as well
convert push configuration state to kotlin data class
introduce app wide json util object for kotlinx.serialization
refactor(upload-list-activity): kotlin
Rename .java to .kt
handle edge cases
use OCFileListDiffer
rename helper package to filelist
perf(file-list): diff util
fix garm
update license header and remove comments
fix slide behaviour crash when going back from settings
remove pminify
update agents md
add new rules
feat(build): gradle property to control optimization, set for CI
feat(build): First step towards R8 minify - still crashing
add branch for email appid in send() profileBottomSheet
Update Nextcloud Android library
2026-10-14 05:07:12 +00:00
Nextcloud Android Bot df4822e311 Merge remote-tracking branch 'origin/master' into dev 2026-10-14 05:02:51 +00:00
Nextcloud bot 552e8bdf50 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-14 03:52:00 +00:00
Andy Scherzinger 1d438a3e73 Merge pull request #17819 from nextcloud/renovate/actions-upload-artifact-7.x
Update actions/upload-artifact action to v7.0.2
2026-10-13 17:33:59 +02:00
renovate[bot] 93533a04ba Update actions/upload-artifact action to v7.0.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-13 14:53:31 +00:00
Andy Scherzinger 1a6def2bf7 Merge pull request #17818 from nextcloud/renovate/ubuntu-resolute
Update ubuntu:resolute Docker digest to f144425
2026-10-13 16:52:21 +02:00
alperozturk96 9fba721686 remove tests since its visible ui action
Signed-off-by: alperozturk96 <[email protected]>
2026-10-13 15:29:36 +02:00
alperozturk96 5817deeae1 revert file download indicator since out of scope of the feature and for folder download worker can cause issue
Signed-off-by: alperozturk96 <[email protected]>
2026-10-13 15:28:46 +02:00
Jan C. Borchardt ca1cbb3b02 fix(files): hide synced icon after deleting local copy
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jan C. Borchardt <[email protected]>
2026-10-13 15:02:25 +02:00
Jan C. Borchardt 5055c412b9 feat(files): show syncing icon on files while folder downloads
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jan C. Borchardt <[email protected]>
2026-10-13 15:02:25 +02:00
Jan C. Borchardt f34b77a3e3 fix(files): avoid list shift when opening details
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jan C. Borchardt <[email protected]>
2026-10-13 15:02:25 +02:00
Jan C. Borchardt 6d53ce0cfe feat(files): show actions for current folder in toolbar
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jan C. Borchardt <[email protected]>
2026-10-13 15:02:25 +02:00
renovate[bot] 9d3ffcf897 Update androidCommonLibraryVersion to
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-13 11:20:46 +00:00
renovate[bot] 3793bf6347 Update dependency androidx.webkit:webkit to v1.17.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-13 11:16:53 +00:00
renovate[bot] 78477765f6 Update ubuntu:resolute Docker digest to f144425
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-13 11:15:41 +00:00
Andy Scherzinger 5b2987a33c Merge pull request #17712 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2026-10-13 13:03:26 +02:00
nextcloud-android-bot ff3d84047d 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2026-10-13 08:57:15 +00:00
Alper Öztürk 80e5b36bdb Merge pull request #17598 from nextcloud/internalTwoWaySyncUploadNewFiles
Internal two way sync upload new files
2026-10-13 09:50:21 +02:00
alperozturk96 c2c3f501b4 fix rest uploads
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 18:37:07 +02:00
alperozturk96 6dc1152bfb fix updated upload
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 18:33:54 +02:00
alperozturk96 4e316e3dc2 fix move operation
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:45:22 +02:00
alperozturk96 f18d1c3a6e add tests for edge case
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 566df060ab check remote file as well for is file delete
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 e2049a5554 add comment for isFolderDeletedLocally
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 e56c8db76c rename function for storage path that needed two way sync
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 f3cb156b53 fix codacy
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 dd73b46c31 refactor test and prevent lock error on text file thus we can test
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 a152a84fdd handle parent folder deletion
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 29ea643e7c handle parent folder deletion and fix spotbugs
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 528b3ee64f handle if server: creates new folder
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 5bb355b7e6 use UploadFileOperationFactory
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
alperozturk96 a4b898d2eb use TwoWaySyncOperation.kt instead bloat SynchronizeFolderOperation.java
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 14:34:41 +02:00
tobiasKaminsky bab01b771d Internal two way sync: upload new created files/folders
Signed-off-by: tobiasKaminsky <[email protected]>
2026-10-12 14:34:41 +02:00
tobiasKaminsky 205b2bbed6 Internal two way sync: upload new created files/folders
Signed-off-by: tobiasKaminsky <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java
#	app/src/main/res/values/strings.xml
2026-10-12 14:34:41 +02:00
Alper Öztürk 404ddc5d33 Merge pull request #17785 from nextcloud/perf/replace-file-download-progress-event-bus
perf(file-detail-fragment): replace event bus with worker observation
2026-10-12 13:48:21 +02:00
Alper Öztürk 91679d412c Merge pull request #17791 from nextcloud/refactor/upload-file-operation-file-resolver
refactor(upload-file-operation): upload file resolver
2026-10-12 13:25:19 +02:00
Alper Öztürk 72d1790067 Merge pull request #17786 from nextcloud/perf/bitmap-usage
perf(bitmap): recycle
2026-10-12 13:24:36 +02:00
Alper Öztürk 9353b3a6c5 Merge pull request #17782 from nextcloud/refactor/upload-files-activity-kotlin
refactor(upload-list-activity): kotlin
2026-10-12 13:09:27 +02:00
alperozturk96 a614acf845 update callers
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:08:22 +02:00
alperozturk96 a525105706 add agent skills for further migrations
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:04:38 +02:00
alperozturk96 1ad8aba3b8 update file detail fragment and make progress bar m3
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java
2026-10-12 13:04:36 +02:00
alperozturk96 9320e84118 use new listening approach in worker
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:04:29 +02:00
alperozturk96 2deb2c91ad add new view model for the proper observation
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:04:29 +02:00
alperozturk96 f0fb847048 remove dead file download progress listener
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:04:29 +02:00
alperozturk96 04fb3fbdb9 remove event bus for file download progress observation
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:04:29 +02:00
alperozturk96 50c65ca6af expose file download job tag
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 13:04:27 +02:00
Alper Öztürk ef0edb231a Merge pull request #17699 from nextcloud/r8_minify
Enable app optimization with R8
2026-10-12 12:58:52 +02:00
Alper Öztürk e8d681ddc4 Merge pull request #17668 from nextcloud/perf/file-list-adapter-diff-util
perf(file-list): diff util
2026-10-12 12:51:36 +02:00
Alper Öztürk 8e70c23cde Merge pull request #17783 from nextcloud/perf/push-config-state-kotlinx
perf(push-configuration-state): gson to kotlinx.serialization
2026-10-12 12:50:08 +02:00
alperozturk96 5a8619989b update tests
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 12:49:23 +02:00
alperozturk96 44fa66237d fix build
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 12:47:48 +02:00
alperozturk96 cccf7fdc71 perf(bitmap): usage
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
2026-10-12 12:47:48 +02:00
alperozturk96 db6ae7b7d1 update updateOCFile
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 12:47:13 +02:00
alperozturk96 29a3ed51a3 update updateOCFile
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 12:47:01 +02:00
alperozturk96 1270ead7a8 add tests
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 12:46:06 +02:00
alperozturk96 db867e39a5 refactor(upload-file-operation): upload file resolver
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java
2026-10-12 12:46:04 +02:00
Alper Öztürk 1a2a120432 Merge pull request #17793 from nextcloud/refactor/file-storage-utils-kotlin
refactor(file-storage-utils): kotlin
2026-10-12 12:44:14 +02:00
Alper Öztürk 3977f81b56 Merge pull request #17788 from nextcloud/refactor/media-thumbnail-generation-task
refactor(media-thumbnail-generation): kotlin
2026-10-12 12:07:40 +02:00
Alper Öztürk 1f15aa8cd1 Merge pull request #17790 from nextcloud/refactor/client-factory
refactor(client-repository)
2026-10-12 12:01:51 +02:00
Alper Öztürk a0fc66049c Merge pull request #17795 from nextcloud/feat/folder-preview
feat(file-details): previews
2026-10-12 11:46:21 +02:00
alperozturk96 35fae4cc92 simplify AvatarGroupLayout
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 11:44:44 +02:00
alperozturk96 164d26d61c simplify FilesSpecificViewThemeUtils
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 11:44:44 +02:00
alperozturk96 cb62c4c18f fix
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 11:44:44 +02:00
Alper Öztürk 0567e55aff Merge pull request #17347 from MaqsudMallick/fix/missing-branch-path-for-email-appid-in-profile-bottom-sheet
fix(profile): handle "email" appId so Send email button works
2026-10-12 11:04:25 +02:00
Alper Öztürk 11d63de493 Merge pull request #17769 from nextcloud/fix-tests-config
Fix tests server data configuration for local dev
2026-10-12 10:04:34 +02:00
Alper Öztürk 92a52e604f Merge pull request #17799 from nextcloud/update-library-2026-10-11
Update library to 2026-10-11
2026-10-12 10:03:07 +02:00
Alper Öztürk 1300cc2bb9 Merge pull request #17803 from nextcloud/fix/garm-upload-it
fix(garm): upload it
2026-10-12 09:59:33 +02:00
Alper Öztürk 1e7b48f650 Merge pull request #17728 from nextcloud/renovate/gradle-9.x
chore(deps): update gradle to v9.8.1
2026-10-12 09:27:34 +02:00
alperozturk96 0887263fbf fix codacy
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 09:24:41 +02:00
alperozturk96 357e9853e5 convert UploadIT to kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 09:22:08 +02:00
alperozturk96 51333d98c7 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 09:22:07 +02:00
alperozturk96 14f81c5355 fix tests
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 09:22:00 +02:00
daniele-verducci 9030fe1566 Fix tests server data configuration for local dev
Signed-off-by: daniele-verducci <[email protected]>
2026-10-12 09:20:56 +02:00
alperozturk96 f27d363c75 verify metadata
Signed-off-by: alperozturk96 <[email protected]>
2026-10-12 09:16:57 +02:00
Nextcloud Android Bot 5ea8fe796c Update library to 2026-10-11
Signed-off-by: Nextcloud Android Bot <[email protected]>
2026-10-12 09:16:03 +02:00
Nextcloud bot c62e197b2c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-12 03:56:42 +00:00
renovate[bot] 1a1235e1fa chore(deps): update gradle to v9.8.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-11 20:24:17 +00:00
Nextcloud Android Bot caa0ca869e daily dev 20261010
refactor(drawer): simplify external link click handling
fix(drawer): open external links with local ID above 100
2026-10-10 05:10:31 +00:00
Nextcloud Android Bot 656f61fc9b Merge remote-tracking branch 'origin/master' into dev 2026-10-10 05:01:11 +00:00
alperozturk96 13ef964855 feat(file-details): previews
Signed-off-by: alperozturk96 <[email protected]>
2026-10-09 12:13:39 +02:00
Alper Öztürk 1ae824cc88 Merge pull request #17794 from nextcloud/fix/garm-5
fix(garm): drawer activity it
2026-10-09 10:19:16 +02:00
alperozturk96 88864ca81a fix(garm): drawer activity it
Signed-off-by: alperozturk96 <[email protected]>
2026-10-09 08:58:43 +02:00
alperozturk96 c9e961b319 logs errors
Signed-off-by: alperozturk96 <[email protected]>
2026-10-09 08:50:02 +02:00
alperozturk96 8033e7ea63 refactor(file-storage-utils): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-09 08:47:17 +02:00
alperozturk96 e00b7c3224 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-09 08:47:16 +02:00
Alper Öztürk 1b08c2f19e Merge pull request #17445 from about2crash/fix-drawer-external-links
fix(drawer): external site links no longer stop working over time
2026-10-09 08:09:30 +02:00
Nextcloud Android Bot 4fe438040f daily dev 20261009
fix(l10n): Update translations from Transifex
fix(l10n): Update translations from Transifex
style(status-bar): multi-select
expire cache in 10 mins so that client can update itself when in foreground
improve unified share fetch
chore: remove unused dependencies
remove stateless4j
Update Nextcloud Android library
2026-10-09 05:11:18 +00:00
Nextcloud Android Bot 47e3c4a6a0 Merge remote-tracking branch 'origin/master' into dev 2026-10-09 05:00:57 +00:00
Alper Öztürk d02abe4d74 Merge branch 'master' into fix-drawer-external-links 2026-10-08 15:28:28 +02:00
about2crash e6d5ef66a7 refactor(drawer): simplify external link click handling
Extract opening the link into openExternalLink() as suggested in review.

Signed-off-by: about2crash <[email protected]>
2026-10-08 15:07:55 +02:00
alperozturk96 a880fd267e deprecate ClientFactory
Signed-off-by: alperozturk96 <[email protected]>
2026-10-08 14:34:21 +02:00
alperozturk96 49dcfdb270 update AGENTS.md fur further usages
Signed-off-by: alperozturk96 <[email protected]>
2026-10-08 14:32:42 +02:00
alperozturk96 824dedfbb7 use ClientRepository in AlbumItemsFragment for future reference
Signed-off-by: alperozturk96 <[email protected]>
2026-10-08 14:19:44 +02:00
alperozturk96 8ccdb9b75d inject dependencies for the remote client repository
Signed-off-by: alperozturk96 <[email protected]>
2026-10-08 14:17:10 +02:00
alperozturk96 6817b9ef06 refactor(media-thumbnail-generation): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-08 12:24:35 +02:00
Nextcloud bot 8c528d1150 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-08 04:15:52 +00:00
alperozturk96 b84b9fae6e update usage of the new push configuration data classes
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 15:47:24 +02:00
alperozturk96 6315d51d20 use app wide json kotlinx for other classes as well
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 15:46:53 +02:00
alperozturk96 95ba7006ca convert push configuration state to kotlin data class
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 15:46:36 +02:00
alperozturk96 d4e90bad5c introduce app wide json util object for kotlinx.serialization
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 15:46:12 +02:00
alperozturk96 6b1f6d03ad refactor(upload-list-activity): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 14:43:32 +02:00
alperozturk96 77b7118bd9 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 14:43:32 +02:00
alperozturk96 ede9591f72 handle edge cases
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 14:39:21 +02:00
alperozturk96 a886b68692 use OCFileListDiffer
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 13:44:13 +02:00
alperozturk96 65e3560b0c rename helper package to filelist
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 13:37:55 +02:00
alperozturk96 2f061a4c28 perf(file-list): diff util
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 13:07:27 +02:00
alperozturk96 4bbd08f80f fix garm
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:36:27 +02:00
alperozturk96 0f914a674a update license header and remove comments
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:04:41 +02:00
alperozturk96 a171932289 remove pmnifiy
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:04:41 +02:00
alperozturk96 a559af213d fix slide behaviour crash when going back from settings
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:04:41 +02:00
alperozturk96 e3fe0d0d5c remove pminify
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:04:41 +02:00
alperozturk96 a3d79bbeb9 update agents md
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:04:41 +02:00
alperozturk96 6fc208841c add new rules
Signed-off-by: alperozturk96 <[email protected]>
2026-10-07 12:04:41 +02:00
Philipp Hasper d5683adeb4 feat(build): gradle property to control optimization, set for CI
This adds a property to enable the optimization, and it is activated for
the CI
- build
- screenshot tests
- instrumentation tests
- unit test (though probably without effect)

For this to work, it must also be present in the debug build variant

Signed-off-by: Philipp Hasper <[email protected]>
2026-10-07 12:04:41 +02:00
Philipp Hasper ac20857286 feat(build): First step towards R8 minify - still crashing
With keeping the apache httpclient, webdav and ical4j, the app at least
starts.

But it crashes when clicking the plus button (OCFileListBottomSheetDialog).

Related to #17640

Assisted-by: GithubCopilot:GPT-5.4
Signed-off-by: Philipp Hasper <[email protected]>
2026-10-07 12:04:41 +02:00
Nextcloud bot c248c31320 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-07 04:13:10 +00:00
Alper Öztürk 1b7d82feec Merge pull request #17770 from nextcloud/improve-unified-share-fetch
improve unified share fetch
2026-10-06 12:59:45 +02:00
Alper Öztürk c2a0714eac Merge pull request #17778 from nextcloud/fix/ci-4
fix(garm): document storage provider
2026-10-06 10:56:32 +02:00
alperozturk96 78d3f7123b fix(garm): document storage provider
Signed-off-by: alperozturk96 <[email protected]>
2026-10-06 09:14:18 +02:00
Alper Öztürk e75b101e7b Merge pull request #17768 from nextcloud/chore/remove-unused-dependencies
chore: remove unused dependencies
2026-10-06 09:13:55 +02:00
Alper Öztürk f0b1794066 Merge pull request #17774 from nextcloud/style/multi-select-status-bar
style(status-bar): multi-select
2026-10-06 09:11:39 +02:00
Nextcloud Android Bot cf402adad0 daily dev 20261006
fix(l10n): Update translations from Transifex
refactor(di): convert to Kotlin
Rename .java to .kt
fix(l10n): Update translations from Transifex
remove unused functions
update callers
update callers
extract common logic that needed from file activity
convert activity to fragment
add agent skill for navigator
  OCCapability capability = result.getResultData();
use Provider for view theme utils since ViewThemeUtils can change and Provider can gives us retrieving multiple instances.
set account name as well
make the theme cache (memory-only) user account name aware instead url
dont use singleton instance for thumbnails
2026-10-06 05:09:59 +00:00
Nextcloud Android Bot f0a16c402a Merge remote-tracking branch 'origin/master' into dev 2026-10-06 05:01:00 +00:00
Nextcloud bot 248aaf23e0 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-06 04:10:25 +00:00
Alper Öztürk f6fc002dfb Merge pull request #17777 from nextcloud/refactor/di-module-kotlin
refactor(di): convert to Kotlin
2026-10-05 15:32:38 +02:00
alperozturk96 81495fd764 refactor(di): convert to Kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-10-05 14:56:36 +02:00
alperozturk96 205fd4f6e3 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-10-05 14:56:35 +02:00
Alper Öztürk 1c9a4ceb78 Merge pull request #17739 from nextcloud/fix/color-switching
fix(account): switching
2026-10-05 12:02:23 +02:00
alperozturk96 aab3fa975c style(status-bar): multi-select
Signed-off-by: alperozturk96 <[email protected]>
2026-10-05 10:55:11 +02:00
alperozturk96 cbe16a224e expire cache in 10 mins so that client can update itself when in foreground
Signed-off-by: alperozturk96 <[email protected]>
2026-10-05 10:26:20 +02:00
alperozturk96 fa42242fef improve unified share fetch
Signed-off-by: alperozturk96 <[email protected]>
2026-10-05 10:04:02 +02:00
Alper Öztürk fae105dece Merge pull request #17763 from nextcloud/feat/navigator-upload-activity
feat(navigator): upload list
2026-10-05 08:24:13 +02:00
Nextcloud bot fb0e6a41fe fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-05 04:45:47 +00:00
Nextcloud Android Bot 6587dbff8c daily dev 20261004
fix(l10n): Update translations from Transifex
fix(l10n): Update translations from Transifex
remove flaky tests
simplify createFileOnServer
simplify comment
get rid of the async task
get rid of the async task
simplify error handling
Check filename length, similarly to what happens server-side
Better error management during CreateFileFromTemplate
Update Nextcloud Android library
2026-10-04 05:11:39 +00:00
Nextcloud Android Bot 7862d9fc96 Merge remote-tracking branch 'origin/master' into dev 2026-10-04 05:02:04 +00:00
Nextcloud bot ecf17aaa3f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-04 04:00:02 +00:00
Nextcloud bot 98c33b8574 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-03 04:02:52 +00:00
renovate[bot] eee7ff7b6e Update gradle/actions action to v6.4.0 (#17772)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-02 20:57:10 +00:00
alperozturk96 7c803770ee remove unused functions
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 16:06:23 +02:00
alperozturk96 2022d27f61 add missing licenses
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 15:18:20 +02:00
alperozturk96 12a0a1da8f update callers
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 15:18:20 +02:00
alperozturk96 8a52ad6502 update callers
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 15:18:20 +02:00
alperozturk96 b928ed6389 extract common logic that needed from file activity
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 15:18:20 +02:00
alperozturk96 852fc97dcd convert activity to fragment
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 15:18:20 +02:00
alperozturk96 a36d9db414 add agent skill for navigator
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 15:18:20 +02:00
Alper Öztürk 507434b1d4 Merge pull request #17745 from nextcloud/remove-flaky-tests
remove flaky tests
2026-10-02 15:18:02 +02:00
alperozturk96 010a1e9626 remove flaky tests
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 14:50:52 +02:00
alperozturk96 ae50e52ce3 chore: remove unused dependencies
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 13:42:39 +02:00
alperozturk96 693850a3df remove stateless4j
Signed-off-by: alperozturk96 <[email protected]>
2026-10-02 13:26:42 +02:00
Alper Öztürk 2e5614facb Merge pull request #17736 from nextcloud/fix/internal-106518
Check file name length doesn't exceed server's supported one
2026-10-02 08:47:24 +02:00
Nextcloud Android Bot 87067fdeda daily dev 20261002
fix build createPendingFile should pass remotePath
use latest lib hash
use ActivityResultContracts
refactor(editor-site-web-view): kotlin
Rename .java to .kt
refactor(editor-web-view): kotlin
Rename .java to .kt
fix min chunk size
fix interrupting with pinch and refresh
use cached image without lock
speed-up load from disk
remove cache check since job already doing it
add pinch listener for column change
simplify refreshCurrentDirectory
fix view model integration
use view model and getWorkInfosByTagFlow to observe worker
remove workaround observe worker logic
fix file list refresh after adding offline operation
walled connection should not cached for 5 minutes, separate walled and reachability cache timing
do in io scope
use result success since policy is keep and check remote file to prevent unnecessary job
early exit for remove files if its empty
early exit for remove files if its empty
return value for fail scenario as well
do not cancel previous job so that list action such as create can react
refactor(bitmap-utils): kotlin
Rename .java to .kt
Fix SpotBugs
Fixed lint
Fixed getRemotePathForConflictResolution (broken after refactoring), written relevant test
simplify logic, and add upper bound instead recursive loop
Fixed lint
Removed unreliable file creation date check
Moved regexp outside of recurrency
Lint
Fixed bug in duplicate files renaming generator, fixed test
Fix lint
Implemented file conflict name generator specific for offlineOperations
Fixes in conflict resolve dialog, see https://github.com/nextcloud/android/pull/17590/changes\#r4034298542
Applied some proposed fixes from PR
Applied suggestions from PR
Fixed lint
Fixed conflict resolution dialog content for offline uploads
Working conflict resolution for "keep both" in offline upload, aligned new name to the one used for online
Working fix proof of concept, to be refactored and not taking account edge cases
Fixed detekt
Removed wrongly-placed file update code from uploadworker and updaging etagOnServer field properly in UploadFileOperation
Refactored java function: moved into FileExtensions
fix/internal-104835: lint
fix/internal-104835: check size as well
fix/internal-104835: avoid showing conflict window for an unmodified, already uploaded file
wip
fix/internal-104835: do not overwrite existent file metadata
cancel enqueued ones so that we can re-start. Some workers may stuck thus we need to have clean start.
retry if already auto upload runs
cancel per folder first
fix(auto-upload): rescan periodic worker
fail fast for ignore eTag thus no need read file operation
remove deduplicated root folder refresh operation
2026-10-02 05:12:32 +00:00
Nextcloud Android Bot 83a29810a6 Merge remote-tracking branch 'origin/master' into dev 2026-10-02 05:03:30 +00:00
alperozturk96 48eca42bdb simplify createFileOnServer
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:17:23 +02:00
alperozturk96 f9f16f7131 OCCapability capability = result.getResultData();
already provides same

Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:09:04 +02:00
alperozturk96 fe01e39ebe use Provider for view theme utils since ViewThemeUtils can change and Provider can gives us retrieving multiple instances.
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:09:04 +02:00
alperozturk96 2ee31cb41c set account name as well
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:09:04 +02:00
alperozturk96 37ce1b588f make the theme cache (memory-only) user account name aware instead url
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:09:04 +02:00
alperozturk96 31de9aa29a dont use singleton instance for thumbnails
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:09:04 +02:00
alperozturk96 26e3e68561 simplify comment
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:08:53 +02:00
alperozturk96 8299dd7f7b get rid of the async task
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:08:53 +02:00
alperozturk96 d041cd2529 get rid of the async task
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:08:53 +02:00
alperozturk96 c11023634c simplify error handling
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:08:53 +02:00
daniele-verducci 7aacbed792 Implemented tests
Signed-off-by: daniele-verducci <[email protected]>
2026-10-01 15:08:53 +02:00
daniele-verducci bcbbad4ae2 Check filename length, similarly to what happens server-side
Signed-off-by: daniele-verducci <[email protected]>
2026-10-01 15:08:53 +02:00
daniele-verducci cdaab781e1 Better error management during CreateFileFromTemplate
Signed-off-by: daniele-verducci <[email protected]>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/dialog/ChooseTemplateDialogFragment.kt
2026-10-01 15:08:53 +02:00
alperozturk96 0fa1d5b984 fix build createPendingFile should pass remotePath
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 15:06:41 +02:00
Alper Öztürk 5bc5163267 Merge pull request #17590 from nextcloud/fix/internal-104835
Fix conflicts for offline uploads when uploading same file again
2026-10-01 14:31:13 +02:00
Alper Öztürk 359e0da8bf Merge pull request #17746 from nextcloud/refactor/external-site-web-view-kotlin
refactor(editor-web-view): kotlin
2026-10-01 14:30:45 +02:00
Alper Öztürk 144db87302 Merge pull request #17727 from nextcloud/refactor/bitmap-utils
refactor(bitmap-utils): kotlin
2026-10-01 13:59:25 +02:00
Alper Öztürk 1116c8f5b5 Merge pull request #17644 from nextcloud/fix/offline-operation-action-on-slow-network
fix(offline-operation): actions
2026-10-01 13:47:33 +02:00
Alper Öztürk 98da5c0abe Merge pull request #17661 from nextcloud/perf-file-listing
perf(metadata): worker
2026-10-01 13:02:00 +02:00
Alper Öztürk 089bb3272e Merge pull request #17683 from nextcloud/fix/auto-upload-rescan-worker-start-only-if-not-active
fix(auto-upload): rescan worker start
2026-10-01 12:57:12 +02:00
Alper Öztürk 55e519293d Merge pull request #17703 from nextcloud/fix/media-scroll-and-gestures
fix(media): scroll & pinch
2026-10-01 12:55:00 +02:00
Alper Öztürk 2d40573539 Merge pull request #17741 from nextcloud/fix/min-chunk-size
fix min chunk size
2026-10-01 09:31:52 +02:00
alperozturk96 15e62e409a use latest lib hash
Signed-off-by: alperozturk96 <[email protected]>
2026-10-01 09:31:16 +02:00
Nextcloud Android Bot 615c804aa6 daily dev 20261001
fix(l10n): Update translations from Transifex
use username
fix kotlin spotless check
fix transitions
style(gallery): multi select animation
slide up image from center
use scale up and down for opening and close image
use m3 slide down and up
create navigation animator
wip
fix(media): navigation
refactor(view-extension): slide behaviour
refactor(disk-lru-image-cache): kotlin
Rename .java to .kt
2026-10-01 05:50:16 +00:00
Nextcloud Android Bot 9011467dff Merge remote-tracking branch 'origin/master' into dev 2026-10-01 05:44:24 +00:00
Nextcloud bot f2358568d9 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-10-01 04:16:13 +00:00
alperozturk96 ce74cf3934 use ActivityResultContracts
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 15:34:00 +02:00
alperozturk96 1f35cc0faf refactor(editor-site-web-view): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 15:34:00 +02:00
alperozturk96 fa5f16d25a Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 15:34:00 +02:00
alperozturk96 56fc650ff8 refactor(editor-web-view): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 15:34:00 +02:00
alperozturk96 533c1d859e Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 15:34:00 +02:00
Alper Öztürk ce5fedb4e3 Merge pull request #17742 from nextcloud/fix/401-issue
fix(unified-share): use credentials.username
2026-09-30 15:21:39 +02:00
Alper Öztürk 7f464c5a6a Merge pull request #17705 from nextcloud/fix/media-navigation
Seamless animation on navigation in media tab
2026-09-30 14:59:57 +02:00
alperozturk96 bca9d69a08 use username
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 14:41:17 +02:00
alperozturk96 8b96994fdf fix min chunk size
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 13:28:56 +02:00
Tobias Kaminsky 2446b36ee2 Merge pull request #17740 from nextcloud/devBuild
build dev: make sure fastlane folder exists
2026-09-30 13:17:59 +02:00
tobiasKaminsky a49caba4f2 build dev: make sure fastlane folder exists
Signed-off-by: tobiasKaminsky <[email protected]>
2026-09-30 13:17:00 +02:00
Alper Öztürk 61924d74ff Merge pull request #17738 from nextcloud/style/multi-select
style(gallery): multi select animation
2026-09-30 13:02:59 +02:00
alperozturk96 250abf6fa9 fix kotlin spotless check
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 12:44:47 +02:00
about2crash 968e2e009a Merge branch 'master' into fix-drawer-external-links
Signed-off-by: about2crash <[email protected]>
2026-09-30 12:38:54 +02:00
alperozturk96 78a4525bc6 fix transitions
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:54:18 +02:00
alperozturk96 50345aa295 style(gallery): multi select animation
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:39:10 +02:00
alperozturk96 a9cbb0455e fix interrupting with pinch and refresh
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:34:53 +02:00
alperozturk96 dc8c428b3e use cached image without lock
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:00:41 +02:00
alperozturk96 ae75d3b2d5 speed-up load from disk
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:00:41 +02:00
alperozturk96 79eca43190 remove cache check since job already doing it
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:00:41 +02:00
alperozturk96 e15a3ba0ee add pinch listener for column change
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 10:00:41 +02:00
alperozturk96 560bca9271 slide up image from center
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 09:39:51 +02:00
alperozturk96 a039a14bd4 use scale up and down for opening and close image
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 09:25:59 +02:00
alperozturk96 04264398e0 use m3 slide down and up
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 08:51:11 +02:00
alperozturk96 576af4953e create navigation animator
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 08:32:05 +02:00
alperozturk96 b5359e2475 wip
Signed-off-by: alperozturk96 <[email protected]>
2026-09-30 08:22:16 +02:00
alperozturk96 116decbba9 fix(media): navigation
Signed-off-by: alperozturk96 <[email protected]>

# Conflicts:
#	app/src/main/java/com/nextcloud/utils/extensions/ViewExtensions.kt
2026-09-30 08:22:15 +02:00
Alper Öztürk 3fe3a67949 Merge pull request #17735 from nextcloud/refactor/slide-behaviour-extension
refactor(view-extension): slide behaviour
2026-09-30 08:20:17 +02:00
Alper Öztürk a54b313568 Merge pull request #17733 from nextcloud/refactor/disk-lru-image-cache
refactor(disk-lru-image-cache): kotlin
2026-09-30 08:14:50 +02:00
Nextcloud Android Bot 65d8b7a43f daily dev 20260930
fix(l10n): Update translations from Transifex
fix(status-bar): details
fix tests
Fix Codacy magic number
Spotless apply Signed-off-by: daniele-verducci <[email protected]>
Missing imports
Sealed class for generatePrivateKey() result
Moved generateKeyPair into EncryptionKeyGenerator
Non-nullable keywords, replaced annotation
Refactored & small fixes
Working encrypted folder test
Fixed empty capability in test
Fix lint + a small refactoring to make generatePrivateKey() more readable
Working create and read tests for folder and subfolder
Refactoring to extract key generation for better testing
fix(l10n): Update translations from Transifex
Proposal to fix metadata key check
Better fix subfolders in encrypted folders (using existing metadata retrieval function) Signed-off-by: daniele-verducci <[email protected]>
Fix subfolders in encrypted folders
remove external flag rely on windowcompat
fix status-bar
fix full-screen
fix lint
fix(deps): add verification metadata for android-library update
refactor(player): remove unused execution flow
fix(l10n): Update translations from Transifex
Update workRuntime to v2.12.0 (#17722)
Update dependency androidx.fragment:fragment-ktx to v1.9.1 (#17719)
Update dependency org.mockito.kotlin:mockito-kotlin to v6.4.0 (#17715)
fix(l10n): Update translations from Transifex
Update library to 2026-09-27
Update dependency org.slf4j:jcl-over-slf4j to v2.0.20 (#17713)
fix spotless
fix codacy
fix(system-bar): color
fix(system-bar): color
fix(system-bar): color
2026-09-30 05:27:00 +00:00
Nextcloud Android Bot 87e945628e Merge remote-tracking branch 'origin/master' into dev 2026-09-30 05:13:15 +00:00
Nextcloud bot 35610dd848 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-09-30 04:29:36 +00:00
alperozturk96 a950ba0189 refactor(view-extension): slide behaviour
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 16:38:34 +02:00
Alper Öztürk 16f0504977 Merge pull request #17730 from nextcloud/fix/status-bar-details
fix(status-bar): details
2026-09-29 15:42:32 +02:00
alperozturk96 e731292aa8 refactor(disk-lru-image-cache): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 12:59:01 +02:00
alperozturk96 047666ce68 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 12:59:00 +02:00
Alper Öztürk 3c70807a0f Merge pull request #17697 from nextcloud/improvement/internal-105265-tests
Implemented tests for encrypted folders
2026-09-29 09:36:34 +02:00
alperozturk96 ed761fb428 simplify refreshCurrentDirectory
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 1f073c4861 fix view model integration
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 4256a19772 use view model and getWorkInfosByTagFlow to observe worker
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 2699206363 remove workaround observe worker logic
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 ce85a51b44 fix file list refresh after adding offline operation
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 721cc3c730 walled connection should not cached for 5 minutes, separate walled and reachability cache timing
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 fd54e74e98 do in io scope
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 c167fd480e use result success since policy is keep and check remote file to prevent unnecessary job
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 cf867f35f3 early exit for remove files if its empty
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 62985250d0 early exit for remove files if its empty
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 44c331849d return value for fail scenario as well
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
alperozturk96 75ea82382d do not cancel previous job so that list action such as create can react
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 09:25:13 +02:00
Tobias Kaminsky 5d588d6448 Merge pull request #17714 from nextcloud/update-library-2026-09-27
Update library to 2026-09-27
2026-09-29 08:57:54 +02:00
alperozturk96 ef093d2fac fix(status-bar): details
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 08:28:03 +02:00
daniele-verducci 2d25b83f5a Restore metadata upload
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
alperozturk96 fce7e21e29 remove upload logic since: will be fixed via https://github.com/nextcloud/android/pull/17608/changes#diff-7cffc15456a4f941a07f401277af2164ca9454b434a40e7e811ef48f367aadb8R116
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 08:06:10 +02:00
alperozturk96 acfd14ad3b fix tests
Signed-off-by: alperozturk96 <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci bcaca20a54 Fix Codacy magic number
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 34dae3fe07 Spotless apply
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 0371df22aa Missing imports
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci cf22e0c1a1 Sealed class for generatePrivateKey() result
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci b9450a0726 Moved generateKeyPair into EncryptionKeyGenerator
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 25a41b93f3 Non-nullable keywords, replaced annotation
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 147aa74877 Fixed lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 5b9dd23302 Restricted tests to Nextcloud >= 30
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 9184f23cbc Implemented unencryption test
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci c8fc832818 Fixed copypasted file copyright text for a newly created file
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 84ab9e32a3 Refactored & small fixes
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 09350942ff Working encrypted folder test
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci c6d49216d2 Fixed empty capability in test
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci ee4f482f00 Added metadata folder check in folder opening check
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 936d2a2931 Cleanup keys after tests run
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci b00a85e52c Fix lint + a small refactoring to make generatePrivateKey() more readable
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci df6ee3532a Working create and read tests for folder and subfolder
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
daniele-verducci 4488e2dd6e Refactoring to extract key generation for better testing
Signed-off-by: daniele-verducci <[email protected]>
2026-09-29 08:06:10 +02:00
Alper Öztürk f588538a03 Merge pull request #17608 from nextcloud/fix/internal-105265
Fix subfolders in encrypted folders
2026-09-29 08:04:49 +02:00
Nextcloud bot 2c586e893e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-09-29 04:04:05 +00:00
daniele-verducci bf8f012ff9 Proposal to fix metadata key check
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 16:07:04 +02:00
daniele-verducci feaff3a450 Better fix subfolders in encrypted folders (using existing metadata retrieval function)
Signed-off-by: daniele-verducci <[email protected]>

Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 16:07:04 +02:00
daniele-verducci 9153e4e3e2 Fix subfolders in encrypted folders
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 16:07:03 +02:00
alperozturk96 74074ed438 refactor(bitmap-utils): kotlin
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 16:05:20 +02:00
alperozturk96 07cd303219 Rename .java to .kt
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 16:05:19 +02:00
Alper Öztürk 007fe67e87 Merge pull request #17724 from nextcloud/refactor/player
refactor(player): remove unused execution flow
2026-09-28 16:01:38 +02:00
alperozturk96 05b5f2680a remove external flag rely on windowcompat
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 15:01:48 +02:00
alperozturk96 d5f4e5c184 fix status-bar
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 14:23:17 +02:00
alperozturk96 b0a6b9be90 fix full-screen
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 14:14:12 +02:00
alperozturk96 3a48a5dbf5 mark flaky test
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 14:05:15 +02:00
alperozturk96 522727536f fix lint
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 14:04:53 +02:00
tobiasKaminskyandClaude Sonnet 5 4c90846513 fix(deps): add verification metadata for android-library update
Dependency verification failed on all CI checks because
gradle/verification-metadata.xml was missing the checksum for the
newly bumped androidLibraryVersion (7f7103db2d88d531861700dce3cb5bfa6fb40612).

Assisted-by: ClaudeCode:claude-sonnet-5
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2026-09-28 12:44:42 +02:00
daniele-verducci b705c69cb3 Fix SpotBugs
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 0a63501862 Fixed lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 67477e38f3 Fixed getRemotePathForConflictResolution (broken after refactoring), written relevant test
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
alperozturk96 c15b70c544 simplify logic, and add upper bound instead recursive loop
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 10:21:26 +02:00
alperozturk96 da40023c51 de-duplicate tests
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci e3cd497b53 Fixed lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 9d1d17a191 Tests for OCFile.isTheSameAs() extension
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 195b06679f Removed unreliable file creation date check
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 0bbfd15a00 Moved regexp outside of recurrency
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 9699cb181e Lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 537f619b34 Fixed bug in duplicate files renaming generator, fixed test
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 0570945330 Fix lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci e424ba7d38 Tests for file conflict name generator specific for offlineOperations
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci be34c4b284 Implemented file conflict name generator specific for offlineOperations
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 1764dc38cd Fixes in conflict resolve dialog, see https://github.com/nextcloud/android/pull/17590/changes\#r4034298542
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 384f75ce5d Applied some proposed fixes from PR
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 0d32edacfe Applied suggestions from PR
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci be6382c6c5 Fixed lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci a52c70c334 Fixed conflict resolution dialog content for offline uploads
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 1376e1601b Working conflict resolution for "keep both" in offline upload, aligned new name to the one used for online
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 53ed662fb6 Working fix proof of concept, to be refactored and not taking account edge cases
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci d72c2141ef Fixed detekt
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 57f120b76c Removed wrongly-placed file update code from uploadworker and updaging etagOnServer field properly in UploadFileOperation
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 3476acc015 Refactored java function: moved into FileExtensions
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci cc1585dda9 fix/internal-104835: lint
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:26 +02:00
daniele-verducci 864a766028 fix/internal-104835: check size as well
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:25 +02:00
daniele-verducci 0f71ab80c6 fix/internal-104835: avoid showing conflict window for an unmodified, already uploaded file
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:25 +02:00
daniele-verducci 8876bc8a88 wip
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:25 +02:00
daniele-verducci b29fd03657 fix/internal-104835: do not overwrite existent file metadata
Signed-off-by: daniele-verducci <[email protected]>
2026-09-28 10:21:25 +02:00
alperozturk96 febd3b8cae refactor(player): remove unused execution flow
Signed-off-by: alperozturk96 <[email protected]>
2026-09-28 10:13:49 +02:00
Alper Öztürk 6722740365 Merge pull request #17708 from nextcloud/fix/system-bar-color
fix(system-bar): color
2026-09-28 08:59:46 +02:00
Nextcloud bot 20f0dcad9a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-09-28 04:03:21 +00:00
renovate[bot] d8e3ce42d1 Update workRuntime to v2.12.0 (#17722)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-27 22:29:48 +00:00
renovate[bot] 98d67232dd Update dependency androidx.fragment:fragment-ktx to v1.9.1 (#17719)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-27 21:00:08 +00:00
renovate[bot] 628080751f Update dependency org.mockito.kotlin:mockito-kotlin to v6.4.0 (#17715)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-27 16:55:35 +00:00
Nextcloud bot dedea2fe36 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2026-09-27 04:06:26 +00:00
Tobias Kaminsky f9f1fd6e84 Update library to 2026-09-27
Signed-off-by: Tobias Kaminsky <[email protected]>
2026-09-27 00:01:00 +02:00
renovate[bot] fdb3b269e5 Update dependency org.slf4j:jcl-over-slf4j to v2.0.20 (#17713)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-26 16:54:37 +00:00
Tobias Kaminsky 00bc8c3bc0 daily dev 20260926
Update Nextcloud Android library
2026-09-26 03:53:13 +02:00
Tobias Kaminsky 6f95664881 Merge remote-tracking branch 'origin/master' into dev 2026-09-26 03:35:09 +02:00
Alper Öztürk 84efb5c35c Merge pull request #17709 from nextcloud/refactor/display-util
rip DisplayUtils.java
2026-09-25 19:52:45 +02:00
alperozturk96 032cd9cebc fix spotless
Signed-off-by: alperozturk96 <[email protected]>
2026-09-25 11:10:14 +02:00
alperozturk96 4868418086 fix codacy
Signed-off-by: alperozturk96 <[email protected]>
2026-09-25 11:09:42 +02:00
alperozturk96 1f9b4e8325 fix(system-bar): color
Signed-off-by: alperozturk96 <[email protected]>
2026-09-25 11:09:42 +02:00
alperozturk96 accbbcaea1 fix(system-bar): color
Signed-off-by: alperozturk96 <[email protected]>
2026-09-25 11:09:42 +02:00
alperozturk96 d4ddfd1d3f fix(system-bar): color
Signed-off-by: alperozturk96 <[email protected]>
2026-09-25 11:09:42 +02:00
Tobias Kaminsky 2fe30f6696 daily dev 20260925 2026-09-25 03:53:59 +02:00
Tobias Kaminsky a060d60ed2 Merge remote-tracking branch 'origin/master' into dev 2026-09-25 03:44:47 +02:00
alperozturk96 2421641f98 rip DisplayUtils.java
Signed-off-by: alperozturk96 <[email protected]>
2026-09-24 16:27:41 +02:00
Tobias Kaminsky 1e7e83f8fc daily dev 20260924 2026-09-24 03:54:17 +02:00
Tobias Kaminsky 4ca75b3217 Merge remote-tracking branch 'origin/master' into dev 2026-09-24 03:44:52 +02:00
Tobias Kaminsky 66374b144a daily dev 20260923 2026-09-23 03:47:25 +02:00
Tobias Kaminsky 2600d783c8 Merge remote-tracking branch 'origin/master' into dev 2026-09-23 03:35:57 +02:00
alperozturk96 a6363864a3 cancel enqueued ones so that we can re-start. Some workers may stuck thus we need to have clean start.
Signed-off-by: alperozturk96 <[email protected]>
2026-09-22 10:59:51 +02:00
alperozturk96 882f59c4b9 retry if already auto upload runs
Signed-off-by: alperozturk96 <[email protected]>
2026-09-22 10:47:41 +02:00
alperozturk96 e87c312a95 cancel per folder first
Signed-off-by: alperozturk96 <[email protected]>
2026-09-22 10:37:59 +02:00
alperozturk96 4af306abef fix(auto-upload): rescan periodic worker
Signed-off-by: alperozturk96 <[email protected]>
2026-09-22 09:53:21 +02:00
Tobias Kaminsky 2101e91ab8 daily dev 20260922 2026-09-22 02:44:44 +02:00
Tobias Kaminsky c46cf78ec9 Merge remote-tracking branch 'origin/master' into dev 2026-09-22 02:30:41 +02:00
Tobias Kaminsky 0b8d22f916 daily dev 20260920
Update Nextcloud Android library
2026-09-20 02:44:26 +02:00
Tobias Kaminsky 26f51553c1 Merge remote-tracking branch 'origin/master' into dev 2026-09-20 02:31:56 +02:00
Tobias Kaminsky b50ff72b84 daily dev 20260919 2026-09-19 02:42:03 +02:00
Tobias Kaminsky e975f4f6ba Merge remote-tracking branch 'origin/master' into dev 2026-09-19 02:30:34 +02:00
Tobias Kaminsky 797ea7727f daily dev 20260918
Update Nextcloud Android library
2026-09-18 04:01:06 +02:00
Tobias Kaminsky 8aedb7c288 Merge remote-tracking branch 'origin/master' into dev 2026-09-18 03:45:28 +02:00
alperozturk96 f5ca54fde9 fail fast for ignore eTag thus no need read file operation
Signed-off-by: alperozturk96 <[email protected]>
2026-09-17 11:13:02 +02:00
alperozturk96 03f138b2ca remove deduplicated root folder refresh operation
Signed-off-by: alperozturk96 <[email protected]>
2026-09-17 11:13:02 +02:00
Tobias Kaminsky 1bd8f7225f daily dev 20260917 2026-09-17 03:55:06 +02:00
Tobias Kaminsky 864faa77d3 Merge remote-tracking branch 'origin/master' into dev 2026-09-17 03:43:14 +02:00
Tobias Kaminsky 7b00bcab30 daily dev 20260916
Update Nextcloud Android library
2026-09-16 05:01:06 +02:00
Tobias Kaminsky fe728c6bf6 Merge remote-tracking branch 'origin/master' into dev 2026-09-16 04:47:02 +02:00
Tobias Kaminsky 1863a1b093 daily dev 20260915
Update Nextcloud Android library
2026-09-15 03:49:43 +02:00
Tobias Kaminsky 3848b044f3 Merge remote-tracking branch 'origin/master' into dev 2026-09-15 03:40:16 +02:00
Tobias Kaminsky c646189b6e daily dev 20260914 2026-09-14 03:46:31 +02:00
Tobias Kaminsky 5c442ba6e1 Merge remote-tracking branch 'origin/master' into dev 2026-09-14 03:38:17 +02:00
Tobias Kaminsky f637b4e1b6 daily dev 20260912
Update Nextcloud Android library
2026-09-12 04:53:17 +02:00
Tobias Kaminsky 16b7c3d046 Merge remote-tracking branch 'origin/master' into dev 2026-09-12 04:43:23 +02:00
Tobias Kaminsky 312abcbf70 daily dev 20260911
Update Nextcloud Android library
2026-09-11 04:59:08 +02:00
Tobias Kaminsky ac28cd3fa7 Merge remote-tracking branch 'origin/master' into dev 2026-09-11 04:47:41 +02:00
Tobias Kaminsky ec60a6f4d8 daily dev 20260910
Update Nextcloud Android library
2026-09-10 04:54:49 +02:00
Tobias Kaminsky c4fb8f2d69 Merge remote-tracking branch 'origin/master' into dev 2026-09-10 04:49:32 +02:00
Tobias Kaminsky 3b736f2190 daily dev 20260909 2026-09-09 03:53:36 +02:00
Tobias Kaminsky 04acc45980 Merge remote-tracking branch 'origin/master' into dev 2026-09-09 03:49:19 +02:00
Tobias Kaminsky 5198bc0ad3 daily dev 20260908 2026-09-08 03:55:05 +02:00
Tobias Kaminsky 58ca5e4e40 Merge remote-tracking branch 'origin/master' into dev 2026-09-08 03:44:45 +02:00
Tobias Kaminsky da667b2319 daily dev 20260905
Update Nextcloud Android library
2026-09-05 04:52:46 +02:00
Tobias Kaminsky bad8954de3 Merge remote-tracking branch 'origin/master' into dev 2026-09-05 04:47:31 +02:00
Tobias Kaminsky 5ac5886573 daily dev 20260904
Update Nextcloud Android library
2026-09-04 03:57:15 +02:00
Tobias Kaminsky 5b323dc258 Merge remote-tracking branch 'origin/master' into dev 2026-09-04 03:44:12 +02:00
Tobias Kaminsky f1ff6011d0 daily dev 20260903 2026-09-03 03:59:45 +02:00
Tobias Kaminsky fb8270239b Merge remote-tracking branch 'origin/master' into dev 2026-09-03 03:45:42 +02:00
Tobias Kaminsky d78169dc9c daily dev 20260902 2026-09-02 02:45:09 +02:00
Tobias Kaminsky 18fdaae3c7 Merge remote-tracking branch 'origin/master' into dev 2026-09-02 02:31:46 +02:00
Tobias Kaminsky f487dbec1f daily dev 20260828
Update Nextcloud Android library
2026-08-28 05:01:33 +02:00
Tobias Kaminsky 0bc470232b Merge remote-tracking branch 'origin/master' into dev 2026-08-28 04:51:36 +02:00
Tobias Kaminsky 698a596125 daily dev 20260827
Update Nextcloud Android library
2026-08-27 02:43:06 +02:00
Tobias Kaminsky 74e8f4df40 daily dev 20260826
Update Nextcloud Android library
2026-08-26 07:57:07 +02:00
Tobias Kaminsky ec24577bf7 Merge remote-tracking branch 'origin/master' into dev 2026-08-26 07:42:12 +02:00
Tobias Kaminsky f79c1f3124 daily dev 20260824
Update Nextcloud Android library
2026-08-24 11:04:34 +02:00
Tobias Kaminsky dd01957e8d Merge remote-tracking branch 'origin/master' into dev 2026-08-24 10:56:02 +02:00
Tobias Kaminsky f818c0c368 daily dev 20260821
Update Nextcloud Android library
2026-08-21 03:54:26 +02:00
Tobias Kaminsky 7c6f4a035e Merge remote-tracking branch 'origin/master' into dev 2026-08-21 03:38:18 +02:00
Tobias Kaminsky 27c454a8ac daily dev 20260820
Update Nextcloud Android library
2026-08-20 05:57:50 +02:00
Tobias Kaminsky d57c067973 Merge remote-tracking branch 'origin/master' into dev 2026-08-20 05:51:22 +02:00
Tobias Kaminsky b47d1abb1b daily dev 20260819 2026-08-19 02:47:56 +02:00
Tobias Kaminsky 6ab97f18cc Merge remote-tracking branch 'origin/master' into dev 2026-08-19 02:31:57 +02:00
Tobias Kaminsky c436388ccb daily dev 20260818 2026-08-18 02:45:25 +02:00
Tobias Kaminsky e1a11e4581 Merge remote-tracking branch 'origin/master' into dev 2026-08-18 02:30:45 +02:00
Tobias Kaminsky c14d5de6ed daily dev 20260815
Update Nextcloud Android library
2026-08-15 04:59:23 +02:00
Tobias Kaminsky a8c581d777 Merge remote-tracking branch 'origin/master' into dev 2026-08-15 04:53:13 +02:00
Tobias Kaminsky 68eb0d8717 daily dev 20260814
Update Nextcloud Android library
2026-08-14 03:47:38 +02:00
Tobias Kaminsky 04e07fcc0a Merge remote-tracking branch 'origin/master' into dev 2026-08-14 03:35:38 +02:00
Tobias Kaminsky 7eb7ac1127 daily dev 20260813 2026-08-13 02:44:02 +02:00
Tobias Kaminsky 2a5538e7be Merge remote-tracking branch 'origin/master' into dev 2026-08-13 02:31:13 +02:00
Tobias Kaminsky 2f064f0c4e daily dev 20260811
Update Nextcloud Android library
2026-08-11 03:47:00 +02:00
Tobias Kaminsky 1d71d5a9cf daily dev 20260809 2026-08-09 02:42:42 +02:00
Tobias Kaminsky 9bee68175b Merge remote-tracking branch 'origin/master' into dev 2026-08-09 02:30:38 +02:00
Tobias Kaminsky 60fcdb93d8 daily dev 20260808 2026-08-08 02:43:49 +02:00
Tobias Kaminsky c204f45412 Merge remote-tracking branch 'origin/master' into dev 2026-08-08 02:30:44 +02:00
Tobias Kaminsky 7181806237 daily dev 20260807 2026-08-07 02:46:55 +02:00
Tobias Kaminsky aa17e9d194 Merge remote-tracking branch 'origin/master' into dev 2026-08-07 02:31:30 +02:00
about2crash 1154bdbf06 fix(drawer): open external links with local ID above 100
External link menu items are registered with MENU_ITEM_EXTERNAL_LINK + the link's local database _id. That column is AUTOINCREMENT and the link table is cleared and refilled on every refresh, so the IDs grow without bound. The click handler only accepted an offset of 0-100, so once the IDs passed that window every external link silently stopped responding.

Dispatch on the menu group the items were registered under, and resolve the link by ID instead of by display name.

Signed-off-by: about2crash <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5
2026-08-06 20:39:56 +02:00
Tobias Kaminsky e1744ef819 daily dev 20260806 2026-08-06 02:44:38 +02:00
Tobias Kaminsky 593dfe3cdf Merge remote-tracking branch 'origin/master' into dev 2026-08-06 02:30:41 +02:00
Tobias Kaminsky d4ada8c2ae daily dev 20260805
Update Nextcloud Android library
2026-08-05 04:50:38 +02:00
Tobias Kaminsky 0de8c9c1d8 Merge remote-tracking branch 'origin/master' into dev 2026-08-05 04:41:44 +02:00
Tobias Kaminsky e05d280d16 daily dev 20260804
Update Nextcloud Android library
2026-08-04 11:00:59 +02:00
Tobias Kaminsky d16ed94985 Merge remote-tracking branch 'origin/master' into dev 2026-08-04 10:49:07 +02:00
Tobias Kaminsky 8c36408cc7 daily dev 20260803
Update Nextcloud Android library
2026-08-03 03:50:23 +02:00
Tobias Kaminsky cd945faea6 Merge remote-tracking branch 'origin/master' into dev 2026-08-03 03:36:32 +02:00
Tobias Kaminsky 197e4837c1 daily dev 20260802
Update Nextcloud Android library
2026-08-02 02:49:23 +02:00
Tobias Kaminsky 359c7d6057 Merge remote-tracking branch 'origin/master' into dev 2026-08-02 02:34:20 +02:00
Tobias Kaminsky 24c2a3aedd daily dev 20260731 2026-07-31 03:45:42 +02:00
Tobias Kaminsky 89f7873dbd Merge remote-tracking branch 'origin/master' into dev 2026-07-31 03:41:14 +02:00
Tobias Kaminsky 1de57111dd daily dev 20260730 2026-07-30 02:40:27 +02:00
Tobias Kaminsky a9781c0572 Merge remote-tracking branch 'origin/master' into dev 2026-07-30 02:30:35 +02:00
Tobias Kaminsky 852963dcfc daily dev 20260729 2026-07-29 02:40:02 +02:00
Tobias Kaminsky a0fb56a0d9 Merge remote-tracking branch 'origin/master' into dev 2026-07-29 02:30:43 +02:00
Tobias Kaminsky f5b1edb6cd daily dev 20260728 2026-07-28 02:41:19 +02:00
Tobias Kaminsky e95334014e Merge remote-tracking branch 'origin/master' into dev 2026-07-28 02:30:43 +02:00
Tobias Kaminsky d343f0a23b daily dev 20260727 2026-07-27 02:39:54 +02:00
Tobias Kaminsky 1e35a8d8ff Merge remote-tracking branch 'origin/master' into dev 2026-07-27 02:30:32 +02:00
Tobias Kaminsky d134c49c78 daily dev 20260726 2026-07-26 02:39:38 +02:00
Tobias Kaminsky bfee6ea701 Merge remote-tracking branch 'origin/master' into dev 2026-07-26 02:31:36 +02:00
Tobias Kaminsky 3e1ddbd095 daily dev 20260725 2026-07-25 02:41:42 +02:00
Tobias Kaminsky f4d42f7c66 Merge remote-tracking branch 'origin/master' into dev 2026-07-25 02:33:00 +02:00
Tobias Kaminsky 195925f27a daily dev 20260724 2026-07-24 09:00:53 +02:00
Tobias Kaminsky c7d86c77a5 Merge remote-tracking branch 'origin/master' into dev 2026-07-24 08:36:24 +02:00
Tobias Kaminsky 1351598142 daily dev 20260723
Update Nextcloud Android library
2026-07-23 03:51:38 +02:00
Tobias Kaminsky 6a55949ad0 Merge remote-tracking branch 'origin/master' into dev 2026-07-23 03:36:57 +02:00
Tobias Kaminsky 321adec871 daily dev 20260722
Update Nextcloud Android library
2026-07-22 03:48:12 +02:00
Tobias Kaminsky b809913fc1 Merge remote-tracking branch 'origin/master' into dev 2026-07-22 03:36:54 +02:00
Tobias Kaminsky c889ac7216 daily dev 20260721 2026-07-21 02:39:49 +02:00
Tobias Kaminsky 1c75bac30c Merge remote-tracking branch 'origin/master' into dev 2026-07-21 02:30:33 +02:00
Tobias Kaminsky 3920b502b5 daily dev 20260719 2026-07-19 02:39:17 +02:00
Tobias Kaminsky 5a89f3e4f1 Merge remote-tracking branch 'origin/master' into dev 2026-07-19 02:30:30 +02:00
MaqsudMallick cd8e2393f8 add branch for email appid in send() profileBottomSheet
Signed-off-by: MaqsudMallick <[email protected]>
2026-07-18 01:07:03 +05:30
Tobias Kaminsky 05bed6881e daily dev 20260717
Update Nextcloud Android library
2026-07-17 03:47:59 +02:00
Tobias Kaminsky 4afd136d80 Merge remote-tracking branch 'origin/master' into dev 2026-07-17 03:36:59 +02:00
Tobias Kaminsky 298601b118 daily dev 20260716
Update Nextcloud Android library
2026-07-16 02:40:01 +02:00
Tobias Kaminsky 273badec3a Merge remote-tracking branch 'origin/master' into dev 2026-07-16 02:30:33 +02:00
Tobias Kaminsky ddf1140d0f daily dev 20260715
Update Nextcloud Android library
2026-07-15 04:52:49 +02:00
Tobias Kaminsky 1680081472 Merge remote-tracking branch 'origin/master' into dev 2026-07-15 04:45:30 +02:00
Tobias Kaminsky daeb8513c9 daily dev 20260714
Update Nextcloud Android library
2026-07-14 02:45:41 +02:00
Tobias Kaminsky f7aaf04fed daily dev 20260712 2026-07-12 02:39:20 +02:00
Tobias Kaminsky fb1aeac5c6 Merge remote-tracking branch 'origin/master' into dev 2026-07-12 02:30:22 +02:00
Tobias Kaminsky 3e0b4a9b84 daily dev 20260711
Update Nextcloud Android library
2026-07-11 03:46:21 +02:00
Tobias Kaminsky f1aee67434 Merge remote-tracking branch 'origin/master' into dev 2026-07-11 03:36:17 +02:00
Tobias Kaminsky 644361f0cb daily dev 20260710
Update Nextcloud Android library
2026-07-10 03:50:26 +02:00
Tobias Kaminsky d9a7783b95 Merge remote-tracking branch 'origin/master' into dev 2026-07-10 03:38:22 +02:00
Tobias Kaminsky e249ac4848 daily dev 20260709
Update Nextcloud Android library
2026-07-09 04:57:21 +02:00
Tobias Kaminsky 2c74ffe7af Merge remote-tracking branch 'origin/master' into dev 2026-07-09 04:50:21 +02:00
Tobias Kaminsky f81cb593ec daily dev 20260708
Update Nextcloud Android library
2026-07-08 03:50:45 +02:00
Tobias Kaminsky 14daeb313a Merge remote-tracking branch 'origin/master' into dev 2026-07-08 03:37:37 +02:00
Tobias Kaminsky 23752031f5 daily dev 20260707
Update Nextcloud Android library
2026-07-07 03:47:44 +02:00
Tobias Kaminsky b28252e88d Merge remote-tracking branch 'origin/master' into dev 2026-07-07 03:36:29 +02:00
Tobias Kaminsky 26c8bdc1af daily dev 20260706
Update Nextcloud Android library
2026-07-06 03:49:31 +02:00
Tobias Kaminsky d64a6a1943 Merge remote-tracking branch 'origin/master' into dev 2026-07-06 03:38:55 +02:00
Tobias Kaminsky 222978e5cd daily dev 20260705
Update Nextcloud Android library
2026-07-05 02:43:39 +02:00
Tobias Kaminsky 5251d228fe Merge remote-tracking branch 'origin/master' into dev 2026-07-05 02:34:30 +02:00
Tobias Kaminsky 887e275944 daily dev 20260704
Update Nextcloud Android library
2026-07-04 02:46:10 +02:00
Tobias Kaminsky a097805b33 Merge remote-tracking branch 'origin/master' into dev 2026-07-04 02:33:15 +02:00
Tobias Kaminsky 5222b8141e daily dev 20260703
Update Nextcloud Android library
2026-07-03 02:48:07 +02:00
Tobias Kaminsky 73338e22c4 Merge remote-tracking branch 'origin/master' into dev 2026-07-03 02:33:11 +02:00
Tobias Kaminsky c467128518 daily dev 20260702
Update Nextcloud Android library
2026-07-02 04:02:48 +02:00
Tobias Kaminsky de105cfa72 Merge remote-tracking branch 'origin/master' into dev 2026-07-02 03:42:32 +02:00
Tobias Kaminsky c1b54836d7 daily dev 20260627
Update Nextcloud Android library
2026-06-27 03:51:54 +02:00
Tobias Kaminsky 7b9d38a35c Merge remote-tracking branch 'origin/master' into dev 2026-06-27 03:37:37 +02:00
Tobias Kaminsky dfa6814cce daily dev 20260626
Update Nextcloud Android library
2026-06-26 04:26:21 +02:00
Tobias Kaminsky d3e4a71b22 Merge remote-tracking branch 'origin/master' into dev 2026-06-26 03:43:06 +02:00
Tobias Kaminsky 8d3f98a809 daily dev 20260625 2026-06-25 02:59:26 +02:00
Tobias Kaminsky 31c88d2ea6 Merge remote-tracking branch 'origin/master' into dev 2026-06-25 02:32:23 +02:00
Tobias Kaminsky 9b43430ff3 daily dev 20260624 2026-06-24 02:41:17 +02:00
Tobias Kaminsky 5445d0892f Merge remote-tracking branch 'origin/master' into dev 2026-06-24 02:30:40 +02:00
Tobias Kaminsky 26db61cca0 daily dev 20260623 2026-06-23 02:42:43 +02:00
Tobias Kaminsky 896dfd6b52 Merge remote-tracking branch 'origin/master' into dev 2026-06-23 02:31:15 +02:00
Tobias Kaminsky 79b78e151f daily dev 20260622 2026-06-22 12:59:45 +02:00
Tobias Kaminsky 03a627b1f3 Merge remote-tracking branch 'origin/master' into dev 2026-06-22 12:48:50 +02:00
Tobias Kaminsky 1dcf111341 daily dev 20260622
Update Nextcloud Android library
2026-06-22 11:56:52 +02:00
Tobias Kaminsky 8347b2f15d Merge remote-tracking branch 'origin/master' into dev 2026-06-22 11:51:28 +02:00
Tobias Kaminsky f457404c2a daily dev 20260619
Update Nextcloud Android library
2026-06-19 03:48:10 +02:00
Tobias Kaminsky b3548515a3 Merge remote-tracking branch 'origin/master' into dev 2026-06-19 03:37:38 +02:00
Tobias Kaminsky 8dbae321ff daily dev 20260618
Update Nextcloud Android library
2026-06-18 02:50:19 +02:00
Tobias Kaminsky 30880ac5c4 Merge remote-tracking branch 'origin/master' into dev 2026-06-18 02:31:58 +02:00
Tobias Kaminsky 248241a573 daily dev 20260617
Update Nextcloud Android library
2026-06-17 03:47:34 +02:00
Tobias Kaminsky e2af9fc7eb Merge remote-tracking branch 'origin/master' into dev 2026-06-17 03:35:29 +02:00
Tobias Kaminsky 6c6cb43f1d daily dev 20260615 2026-06-15 02:48:10 +02:00
Tobias Kaminsky d6e5987f43 Merge remote-tracking branch 'origin/master' into dev 2026-06-15 02:31:31 +02:00
Tobias Kaminsky e67b2597ac daily dev 20260613
Update Nextcloud Android library
2026-06-13 03:45:49 +02:00
Tobias Kaminsky 1f4231c9d4 Merge remote-tracking branch 'origin/master' into dev 2026-06-13 03:36:13 +02:00
Tobias Kaminsky 87e2da9d7f daily dev 20260611 2026-06-11 02:45:47 +02:00
Tobias Kaminsky e4770d1328 Merge remote-tracking branch 'origin/master' into dev 2026-06-11 02:34:00 +02:00
Tobias Kaminsky d60824312a daily dev 20260610 2026-06-10 02:46:11 +02:00
Tobias Kaminsky ad6272600a Merge remote-tracking branch 'origin/master' into dev 2026-06-10 02:30:43 +02:00
Tobias Kaminsky 621a821ab4 daily dev 20260609
Update Nextcloud Android library
2026-06-09 03:52:17 +02:00
Tobias Kaminsky 6793015809 Merge remote-tracking branch 'origin/master' into dev 2026-06-09 03:37:31 +02:00
Tobias Kaminsky 67d6638a9a daily dev 20260607
Update Nextcloud Android library
2026-06-07 02:40:25 +02:00
Tobias Kaminsky 39b3491fc9 Merge remote-tracking branch 'origin/master' into dev 2026-06-07 02:31:59 +02:00
Tobias Kaminsky 8158e4cf0e daily dev 20260606 2026-06-06 02:39:11 +02:00
Tobias Kaminsky b06de55242 Merge remote-tracking branch 'origin/master' into dev 2026-06-06 02:30:33 +02:00
Tobias Kaminsky 9c86d35c34 daily dev 20260605
Update Nextcloud Android library
2026-06-05 02:44:47 +02:00
Tobias Kaminsky a186c40601 Merge remote-tracking branch 'origin/master' into dev 2026-06-05 02:33:23 +02:00
Tobias Kaminsky 19e6c5412d daily dev 20260604
Update Nextcloud Android library
2026-06-04 02:47:06 +02:00
Tobias Kaminsky 0701c367fe Merge remote-tracking branch 'origin/master' into dev 2026-06-04 02:32:48 +02:00
Tobias Kaminsky 7d1fe52eec daily dev 20260603
Update Nextcloud Android library
2026-06-03 03:54:34 +02:00
Tobias Kaminsky 8eba806681 Merge remote-tracking branch 'origin/master' into dev 2026-06-03 03:39:59 +02:00
Tobias Kaminsky 7dd8464df9 daily dev 20260526 2026-05-26 02:39:28 +02:00
Tobias Kaminsky 7dba128ad2 Merge remote-tracking branch 'origin/master' into dev 2026-05-26 02:30:37 +02:00
Tobias Kaminsky c0e680b2d8 daily dev 20260525 2026-05-25 02:38:34 +02:00
Tobias Kaminsky 24ed8f1f0f Merge remote-tracking branch 'origin/master' into dev 2026-05-25 02:30:28 +02:00
Tobias Kaminsky 1db964d7cf daily dev 20260523
Update Nextcloud Android library
2026-05-23 02:41:52 +02:00
Tobias Kaminsky 7f4c7549d7 Merge remote-tracking branch 'origin/master' into dev 2026-05-23 02:32:29 +02:00
Tobias Kaminsky 1f3586579b daily dev 20260522
Update Nextcloud Android library
2026-05-22 02:46:04 +02:00
Tobias Kaminsky 45fb138093 Merge remote-tracking branch 'origin/master' into dev 2026-05-22 02:32:07 +02:00
Tobias Kaminsky dbf610e096 daily dev 20260521
Update Nextcloud Android library
2026-05-21 08:09:24 +02:00
Tobias Kaminsky 64dbc52170 Merge remote-tracking branch 'origin/master' into dev 2026-05-21 07:53:11 +02:00
Tobias Kaminsky 3cbee4462a daily dev 20260519
Update Nextcloud Android library
2026-05-19 03:45:25 +02:00
Tobias Kaminsky 21ac763c1e Merge remote-tracking branch 'origin/master' into dev 2026-05-19 03:35:57 +02:00
Tobias Kaminsky bcb46a5b3d daily dev 20260518 2026-05-18 02:41:46 +02:00
Tobias Kaminsky 1bf718a174 Merge remote-tracking branch 'origin/master' into dev 2026-05-18 02:30:35 +02:00
Tobias Kaminsky c580937611 daily dev 20260516
Update Nextcloud Android library
2026-05-16 03:44:24 +02:00
Tobias Kaminsky dbccd251bf Merge remote-tracking branch 'origin/master' into dev 2026-05-16 03:35:46 +02:00
Tobias Kaminsky 075bdd8429 daily dev 20260514
Update Nextcloud Android library
2026-05-14 03:49:37 +02:00
Tobias Kaminsky e111659bd2 Merge remote-tracking branch 'origin/master' into dev 2026-05-14 03:37:18 +02:00
Tobias Kaminsky ec1ded6bf3 daily dev 20260513 2026-05-13 02:42:16 +02:00
Tobias Kaminsky 0cb03670ea Merge remote-tracking branch 'origin/master' into dev 2026-05-13 02:31:29 +02:00
Tobias Kaminsky c22936fdc0 daily dev 20260512 2026-05-12 02:41:24 +02:00
Tobias Kaminsky 530e2319de Merge remote-tracking branch 'origin/master' into dev 2026-05-12 02:31:17 +02:00
Tobias Kaminsky 40d24d0fbe daily dev 20260509
Update Nextcloud Android library
2026-05-09 02:44:57 +02:00
Tobias Kaminsky 81b3ed6025 Merge remote-tracking branch 'origin/master' into dev 2026-05-09 02:33:09 +02:00
Tobias Kaminsky 0237def3fc daily dev 20260508
Update Nextcloud Android library
2026-05-08 02:47:05 +02:00
Tobias Kaminsky 9958101f7a Merge remote-tracking branch 'origin/master' into dev 2026-05-08 02:30:44 +02:00
Tobias Kaminsky 02c2569b1d daily dev 20260507 2026-05-07 02:40:23 +02:00
Tobias Kaminsky 3bd7d3a39a Merge remote-tracking branch 'origin/master' into dev 2026-05-07 02:30:36 +02:00
Tobias Kaminsky c2b2dfdb32 daily dev 20260506
Update Nextcloud Android library
2026-05-06 03:44:41 +02:00
Tobias Kaminsky 5e34fcab39 Merge remote-tracking branch 'origin/master' into dev 2026-05-06 03:34:54 +02:00
Tobias Kaminsky 4d9b5683fd daily dev 20260505
Update Nextcloud Android library
2026-05-05 02:43:31 +02:00
Tobias Kaminsky 0a3d5e9ce1 daily dev 20260504
Update Nextcloud Android library
2026-05-04 02:39:32 +02:00
Tobias Kaminsky 431f2e1473 daily dev 20260503
Update Nextcloud Android library
2026-05-03 02:40:17 +02:00
Tobias Kaminsky 313ff274fc Merge remote-tracking branch 'origin/master' into dev 2026-05-03 02:31:35 +02:00
Tobias Kaminsky 4178ddcf94 daily dev 20260502
Update Nextcloud Android library
2026-05-02 03:45:06 +02:00
Tobias Kaminsky a639d84bc4 daily dev 20260501 2026-05-01 02:53:51 +02:00
Tobias Kaminsky 04e0dba012 Merge remote-tracking branch 'origin/master' into dev 2026-05-01 02:34:03 +02:00
Tobias Kaminsky cbf2afb125 daily dev 20260430
Update Nextcloud Android library
2026-04-30 02:53:09 +02:00
Tobias Kaminsky e2d705a24c Merge remote-tracking branch 'origin/master' into dev 2026-04-30 02:30:48 +02:00
Tobias Kaminsky 6b009ba52d daily dev 20260429
Update Nextcloud Android library
2026-04-29 02:44:32 +02:00
Tobias Kaminsky 0829c194ed Merge remote-tracking branch 'origin/master' into dev 2026-04-29 02:32:53 +02:00
Tobias Kaminsky cb8aa3e3e6 daily dev 20260428
Update Nextcloud Android library
2026-04-28 03:50:23 +02:00
Tobias Kaminsky b2109dc6bf Merge remote-tracking branch 'origin/master' into dev 2026-04-28 03:38:51 +02:00
Tobias Kaminsky 4724df7056 daily dev 20260424
Update Nextcloud Android library
2026-04-24 03:52:43 +02:00
Tobias Kaminsky bf9e825a64 Merge remote-tracking branch 'origin/master' into dev 2026-04-24 03:37:51 +02:00
Tobias Kaminsky 7be1519b67 daily dev 20260423 2026-04-23 02:41:58 +02:00
Tobias Kaminsky 8070aea4d7 Merge remote-tracking branch 'origin/master' into dev 2026-04-23 02:30:44 +02:00
Tobias Kaminsky 3db0dd5dd0 daily dev 20260422
Update Nextcloud Android library
2026-04-22 03:44:29 +02:00
Tobias Kaminsky 2a02773f24 Merge remote-tracking branch 'origin/master' into dev 2026-04-22 03:35:50 +02:00
Tobias Kaminsky b6f06c7bf9 daily dev 20260421 2026-04-21 02:38:28 +02:00
Tobias Kaminsky 9eb2242a0c Merge remote-tracking branch 'origin/master' into dev 2026-04-21 02:30:28 +02:00
Tobias Kaminsky 9982b47fee daily dev 20260420
Update Nextcloud Android library
2026-04-20 08:25:25 +02:00
Tobias Kaminsky 8927f2932d Merge remote-tracking branch 'origin/master' into dev 2026-04-20 08:22:30 +02:00
Tobias Kaminsky 9eeb180625 daily dev 20260420
Update Nextcloud Android library
2026-04-20 03:44:42 +02:00
Tobias Kaminsky 22df9299a5 Merge remote-tracking branch 'origin/master' into dev 2026-04-20 03:36:48 +02:00
Tobias Kaminsky 2fd6cabe95 daily dev 20260418 2026-04-18 02:42:21 +02:00
Tobias Kaminsky af4e1a93ba Merge remote-tracking branch 'origin/master' into dev 2026-04-18 02:30:36 +02:00
Tobias Kaminsky f0d74ebaca daily dev 20260417
Update Nextcloud Android library
2026-04-17 03:55:00 +02:00
Tobias Kaminsky 8967b2c0ab Merge remote-tracking branch 'origin/master' into dev 2026-04-17 03:40:10 +02:00
Tobias Kaminsky 044f96f3bd daily dev 20260416 2026-04-16 02:52:04 +02:00
Tobias Kaminsky fe560fcdb7 Merge remote-tracking branch 'origin/master' into dev 2026-04-16 02:34:32 +02:00
Tobias Kaminsky 963e4581d6 daily dev 20260415
Update Nextcloud Android library
2026-04-15 03:50:30 +02:00
Tobias Kaminsky 56d5c02855 Merge remote-tracking branch 'origin/master' into dev 2026-04-15 03:36:32 +02:00
Tobias Kaminsky 2fd67516e4 daily dev 20260414
Update Nextcloud Android library
2026-04-14 03:53:17 +02:00
Tobias Kaminsky c95bd308a3 Merge remote-tracking branch 'origin/master' into dev 2026-04-14 03:37:39 +02:00
Tobias Kaminsky 45c94740b5 daily dev 20260413
Update Nextcloud Android library
2026-04-13 03:45:31 +02:00
Tobias Kaminsky 8efcccf306 Merge remote-tracking branch 'origin/master' into dev 2026-04-13 03:35:56 +02:00
Tobias Kaminsky 714dbad64e daily dev 20260412
Update Nextcloud Android library
2026-04-12 02:42:42 +02:00
Tobias Kaminsky b1be2b86df Merge remote-tracking branch 'origin/master' into dev 2026-04-12 02:32:09 +02:00
Tobias Kaminsky 388d90e732 daily dev 20260411
Update Nextcloud Android library
2026-04-11 03:47:43 +02:00
Tobias Kaminsky 69fe104cec Merge remote-tracking branch 'origin/master' into dev 2026-04-11 03:37:04 +02:00
Tobias Kaminsky ef29a3a09b daily dev 20260410
Update Nextcloud Android library
2026-04-10 03:52:30 +02:00
Tobias Kaminsky 3b4f2c4ddb daily dev 20260409
Update Nextcloud Android library
2026-04-09 04:13:36 +02:00
Tobias Kaminsky 7ecf93adc3 Merge remote-tracking branch 'origin/master' into dev 2026-04-09 03:42:49 +02:00
Tobias Kaminsky 6b63c1991b daily dev 20260408 2026-04-08 02:46:59 +02:00
Tobias Kaminsky a53cdad995 Merge remote-tracking branch 'origin/master' into dev 2026-04-08 02:31:00 +02:00
Tobias Kaminsky 472c33152a daily dev 20260407 2026-04-07 02:49:30 +02:00
Tobias Kaminsky 3640d6e796 Merge remote-tracking branch 'origin/master' into dev 2026-04-07 02:32:00 +02:00
Tobias Kaminsky dee92c8641 daily dev 20260405 2026-04-05 02:42:13 +02:00
Tobias Kaminsky 0e2529b0c1 Merge remote-tracking branch 'origin/master' into dev 2026-04-05 02:30:26 +02:00
Tobias Kaminsky 26dad35895 daily dev 20260404
Update Nextcloud Android library
2026-04-04 03:46:51 +02:00
Tobias Kaminsky a5c8a604a6 Merge remote-tracking branch 'origin/master' into dev 2026-04-04 03:37:14 +02:00
Tobias Kaminsky 7f0a7480db daily dev 20260403 2026-04-03 02:44:12 +02:00
Tobias Kaminsky ad4ecafe9a Merge remote-tracking branch 'origin/master' into dev 2026-04-03 02:31:17 +02:00
Tobias Kaminsky ad218e23a7 daily dev 20260402 2026-04-02 02:51:25 +02:00
Tobias Kaminsky 38e9b32b43 Merge remote-tracking branch 'origin/master' into dev 2026-04-02 02:31:00 +02:00
Tobias Kaminsky 0e76823a91 daily dev 20260401 2026-04-01 02:54:57 +02:00
Tobias Kaminsky 33ea89df54 Merge remote-tracking branch 'origin/master' into dev 2026-04-01 02:34:46 +02:00
Tobias Kaminsky 78f5717e21 daily dev 20260331 2026-03-31 02:50:20 +02:00
Tobias Kaminsky 7ab15e5e56 Merge remote-tracking branch 'origin/master' into dev 2026-03-31 02:31:12 +02:00
Tobias Kaminsky 9fb98c2200 daily dev 20260329 2026-03-29 03:14:34 +02:00
Tobias Kaminsky d3a6bd8b7d Merge remote-tracking branch 'origin/master' into dev 2026-03-29 03:00:36 +02:00
Tobias Kaminsky 684450b302 daily dev 20260328
Update Nextcloud Android library
2026-03-28 03:46:30 +01:00
Tobias Kaminsky 91f8eda892 Merge remote-tracking branch 'origin/master' into dev 2026-03-28 03:37:04 +01:00
Tobias Kaminsky b6d587c1eb daily dev 20260327 2026-03-27 02:42:33 +01:00
Tobias Kaminsky 02f7b1fa59 Merge remote-tracking branch 'origin/master' into dev 2026-03-27 02:30:43 +01:00
Tobias Kaminsky c446fdda00 daily dev 20260326 2026-03-26 02:40:51 +01:00
Tobias Kaminsky de9cea1ef5 Merge remote-tracking branch 'origin/master' into dev 2026-03-26 02:30:36 +01:00
Tobias Kaminsky 439d38b355 daily dev 20260325
Update Nextcloud Android library
2026-03-25 03:46:59 +01:00
Tobias Kaminsky 53e0c624bf daily dev 20260324
Update Nextcloud Android library
2026-03-24 03:51:52 +01:00
Tobias Kaminsky daf8a430ff Merge remote-tracking branch 'origin/master' into dev 2026-03-24 03:38:58 +01:00
Tobias Kaminsky e51f7fdbb8 daily dev 20260323 2026-03-23 02:40:50 +01:00
Tobias Kaminsky 5a4c4ccdec Merge remote-tracking branch 'origin/master' into dev 2026-03-23 02:30:32 +01:00
Tobias Kaminsky 975664d367 daily dev 20260322 2026-03-22 02:38:43 +01:00
Tobias Kaminsky 5397584121 Merge remote-tracking branch 'origin/master' into dev 2026-03-22 02:30:17 +01:00
Tobias Kaminsky fb5e7def51 daily dev 20260321
Update Nextcloud Android library
2026-03-21 03:45:25 +01:00
Tobias Kaminsky 04e271fed7 Merge remote-tracking branch 'origin/master' into dev 2026-03-21 03:36:57 +01:00
Tobias Kaminsky 742321ff0f daily dev 20260320
Update Nextcloud Android library
2026-03-20 03:45:45 +01:00
Tobias Kaminsky 0a1c8d0704 Merge remote-tracking branch 'origin/master' into dev 2026-03-20 03:35:45 +01:00
Tobias Kaminsky 77c79412e6 daily dev 20260319 2026-03-19 02:41:19 +01:00
Tobias Kaminsky b06c77feb0 Merge remote-tracking branch 'origin/master' into dev 2026-03-19 02:31:00 +01:00
Tobias Kaminsky 9668a475f5 daily dev 20260318 2026-03-18 02:42:14 +01:00
Tobias Kaminsky 1822dc20b9 Merge remote-tracking branch 'origin/master' into dev 2026-03-18 02:30:35 +01:00
Tobias Kaminsky 25ceea6f71 daily dev 20260317
Update Nextcloud Android library
2026-03-17 03:48:00 +01:00
Tobias Kaminsky 746afdc3ea Merge remote-tracking branch 'origin/master' into dev 2026-03-17 03:37:45 +01:00
Tobias Kaminsky 633635b8dc daily dev 20260316 2026-03-16 02:42:38 +01:00
Tobias Kaminsky 7f06dae17d Merge remote-tracking branch 'origin/master' into dev 2026-03-16 02:30:30 +01:00
Tobias Kaminsky 9fe7f669bd daily dev 20260313
Update Nextcloud Android library
2026-03-13 03:48:18 +01:00
Tobias Kaminsky 42a30500a4 Merge remote-tracking branch 'origin/master' into dev 2026-03-13 03:36:38 +01:00
Tobias Kaminsky 17b5f1d454 daily dev 20260312 2026-03-12 02:40:13 +01:00
Tobias Kaminsky 115f42b801 Merge remote-tracking branch 'origin/master' into dev 2026-03-12 02:30:31 +01:00
Tobias Kaminsky d2b65b638a daily dev 20260310 2026-03-10 02:42:43 +01:00
Tobias Kaminsky 98a1bad728 Merge remote-tracking branch 'origin/master' into dev 2026-03-10 02:31:06 +01:00
Tobias Kaminsky 4b2ce6226f daily dev 20260309 2026-03-09 02:43:35 +01:00
Tobias Kaminsky 59574dee43 Merge remote-tracking branch 'origin/master' into dev 2026-03-09 02:30:45 +01:00
Tobias Kaminsky 0415d566f6 daily dev 20260308 2026-03-08 02:43:29 +01:00
Tobias Kaminsky e653ef9a02 daily dev 20260307
Update Nextcloud Android library
2026-03-07 03:49:31 +01:00
Tobias Kaminsky 6f3c106e67 Merge remote-tracking branch 'origin/master' into dev 2026-03-07 03:39:33 +01:00
Tobias Kaminsky 76519d9abd daily dev 20260306
Update Nextcloud Android library
2026-03-06 02:48:49 +01:00
Tobias Kaminsky 6de0d4f0d1 Merge remote-tracking branch 'origin/master' into dev 2026-03-06 02:30:44 +01:00
Tobias Kaminsky 4b7239644a daily dev 20260305 2026-03-05 02:42:25 +01:00
Tobias Kaminsky e59bb04dae Merge remote-tracking branch 'origin/master' into dev 2026-03-05 02:31:35 +01:00
Tobias Kaminsky 9ed4b735cc daily dev 20260304 2026-03-04 02:41:10 +01:00
Tobias Kaminsky 700d80253b Merge remote-tracking branch 'origin/master' into dev 2026-03-04 02:30:32 +01:00
Tobias Kaminsky ed2e679f22 daily dev 20260303
Update Nextcloud Android library
2026-03-03 03:47:55 +01:00
Tobias Kaminsky 5f81411c5f Merge remote-tracking branch 'origin/master' into dev 2026-03-03 03:37:17 +01:00
Tobias Kaminsky fb10e10737 daily dev 20260302 2026-03-02 02:41:43 +01:00
Tobias Kaminsky 82dcb69d45 Merge remote-tracking branch 'origin/master' into dev 2026-03-02 02:30:33 +01:00
Tobias Kaminsky 1b3abdc80a daily dev 20260301 2026-03-01 02:47:40 +01:00
Tobias Kaminsky 4aa6e330c1 Merge remote-tracking branch 'origin/master' into dev 2026-03-01 02:33:30 +01:00
Tobias Kaminsky 3c0962a63a daily dev 20260228
Update Nextcloud Android library
2026-02-28 03:50:17 +01:00
Tobias Kaminsky 7ce7cf150d Merge remote-tracking branch 'origin/master' into dev 2026-02-28 03:39:00 +01:00
Tobias Kaminsky 6bcf5d8ac7 daily dev 20260227
Update Nextcloud Android library
2026-02-27 03:50:16 +01:00
Tobias Kaminsky b135702490 Merge remote-tracking branch 'origin/master' into dev 2026-02-27 03:38:16 +01:00
Tobias Kaminsky 24137162ef daily dev 20260226 2026-02-26 02:42:29 +01:00
Tobias Kaminsky 2cd60f285f Merge remote-tracking branch 'origin/master' into dev 2026-02-26 02:30:37 +01:00
Tobias Kaminsky dc04e2c181 daily dev 20260225 2026-02-25 02:41:05 +01:00
Tobias Kaminsky 70bd6e8473 Merge remote-tracking branch 'origin/master' into dev 2026-02-25 02:30:36 +01:00
Tobias Kaminsky 0e23d9734b daily dev 20260224
Update Nextcloud Android library
2026-02-24 03:50:06 +01:00
Tobias Kaminsky 335414a532 Merge remote-tracking branch 'origin/master' into dev 2026-02-24 03:37:36 +01:00
Tobias Kaminsky 37c416a5ee daily dev 20260223 2026-02-23 02:40:59 +01:00
Tobias Kaminsky f42188ef0e Merge remote-tracking branch 'origin/master' into dev 2026-02-23 02:30:34 +01:00
Tobias Kaminsky d6b4a2bd2b daily dev 20260222 2026-02-22 02:38:52 +01:00
Tobias Kaminsky 29e3e35b65 Merge remote-tracking branch 'origin/master' into dev 2026-02-22 02:30:19 +01:00
Tobias Kaminsky 8667830de6 daily dev 20260221
Update Nextcloud Android library
2026-02-21 03:48:09 +01:00
Tobias Kaminsky 6b8a46b90e daily dev 20260220 2026-02-20 02:40:58 +01:00
Tobias Kaminsky 4bb8d07b80 Merge remote-tracking branch 'origin/master' into dev 2026-02-20 02:31:23 +01:00
Tobias Kaminsky f3be6d2ecf daily dev 20260219 2026-02-19 02:41:32 +01:00
Tobias Kaminsky dd3473f692 Merge remote-tracking branch 'origin/master' into dev 2026-02-19 02:30:37 +01:00
Tobias Kaminsky 90e97ab2f7 daily dev 20260218
Update Nextcloud Android library
2026-02-18 03:48:48 +01:00
Tobias Kaminsky 830a9422c9 Merge remote-tracking branch 'origin/master' into dev 2026-02-18 03:37:50 +01:00
Tobias Kaminsky e9189985ec daily dev 20260217 2026-02-17 02:42:07 +01:00
Tobias Kaminsky f4486dd59b Merge remote-tracking branch 'origin/master' into dev 2026-02-17 02:31:21 +01:00
Tobias Kaminsky 6295a3b77e daily dev 20260216
Update Nextcloud Android library
2026-02-16 02:44:27 +01:00
Tobias Kaminsky 895e601e7b Merge remote-tracking branch 'origin/master' into dev 2026-02-16 02:30:35 +01:00
Tobias Kaminsky f1fad7b1b9 daily dev 20260214
Update Nextcloud Android library
2026-02-14 03:48:18 +01:00
Tobias Kaminsky 7683db6413 Merge remote-tracking branch 'origin/master' into dev 2026-02-14 03:37:31 +01:00
Tobias Kaminsky 8f9fb62e7c daily dev 20260212 2026-02-12 02:41:36 +01:00
Tobias Kaminsky 3a68cdff21 Merge remote-tracking branch 'origin/master' into dev 2026-02-12 02:30:40 +01:00
Tobias Kaminsky 1e4873ecbf daily dev 20260211
Update Nextcloud Android library
2026-02-11 03:50:42 +01:00
Tobias Kaminsky 3a22d93aec Merge remote-tracking branch 'origin/master' into dev 2026-02-11 03:38:12 +01:00
Tobias Kaminsky 6ed47a3d25 daily dev 20260210
Update Nextcloud Android library
2026-02-10 03:49:03 +01:00
Tobias Kaminsky 62ecb83f1f Merge remote-tracking branch 'origin/master' into dev 2026-02-10 03:37:43 +01:00
Tobias Kaminsky bd24a01e56 daily dev 20260209 2026-02-09 02:44:31 +01:00
Tobias Kaminsky bfee98df5a Merge remote-tracking branch 'origin/master' into dev 2026-02-09 02:30:44 +01:00
Tobias Kaminsky a8587317d6 daily dev 20260207 2026-02-07 02:40:17 +01:00
Tobias Kaminsky 9cccd6c229 Merge remote-tracking branch 'origin/master' into dev 2026-02-07 02:30:33 +01:00
Tobias Kaminsky 9f0de61ce8 daily dev 20260206
Update Nextcloud Android library
2026-02-06 03:47:20 +01:00
Tobias Kaminsky 47489243f0 Merge remote-tracking branch 'origin/master' into dev 2026-02-06 03:36:22 +01:00
Tobias Kaminsky 9c0478a40e daily dev 20260205
Update Nextcloud Android library
2026-02-05 04:01:44 +01:00
Tobias Kaminsky 47d37d03c1 Merge remote-tracking branch 'origin/master' into dev 2026-02-05 03:39:30 +01:00
Tobias Kaminsky 6d296079a2 daily dev 20260204 2026-02-04 02:47:26 +01:00
Tobias Kaminsky 03b4c3b4b7 Merge remote-tracking branch 'origin/master' into dev 2026-02-04 02:31:08 +01:00
Tobias Kaminsky 0121304ff2 daily dev 20260203
Update Nextcloud Android library
2026-02-03 03:52:52 +01:00
Tobias Kaminsky 08408154b2 Merge remote-tracking branch 'origin/master' into dev 2026-02-03 03:39:31 +01:00
Tobias Kaminsky 5b2894b417 daily dev 20260202 2026-02-02 02:47:02 +01:00
Tobias Kaminsky 6b48e4e4d0 Merge remote-tracking branch 'origin/master' into dev 2026-02-02 02:30:55 +01:00
Tobias Kaminsky 9ef6da9ec7 daily dev 20260201 2026-02-01 02:49:34 +01:00
Tobias Kaminsky b675a202e7 Merge remote-tracking branch 'origin/master' into dev 2026-02-01 02:33:57 +01:00
Tobias Kaminsky 7ba7de717c daily dev 20260131 2026-01-31 02:42:58 +01:00
Tobias Kaminsky 968370749e Merge remote-tracking branch 'origin/master' into dev 2026-01-31 02:30:41 +01:00
Tobias Kaminsky 5153fc2af5 daily dev 20260130
Update Nextcloud Android library
2026-01-30 05:08:29 +01:00
Tobias Kaminsky 7c5f460792 Merge remote-tracking branch 'origin/master' into dev 2026-01-30 04:57:35 +01:00
Tobias Kaminsky 5600dbd57f daily dev 20260129
Update Nextcloud Android library
2026-01-29 03:53:01 +01:00
Tobias Kaminsky 3d04a3d8c5 Merge remote-tracking branch 'origin/master' into dev 2026-01-29 03:40:21 +01:00
Tobias Kaminsky b262a527a1 daily dev 20260128 2026-01-28 02:45:35 +01:00
Tobias Kaminsky 154f6971a6 Merge remote-tracking branch 'origin/master' into dev 2026-01-28 02:31:03 +01:00
Tobias Kaminsky 9237c32969 daily dev 20260127
Update Nextcloud Android library
2026-01-27 03:51:12 +01:00
Tobias Kaminsky ce026701c2 Merge remote-tracking branch 'origin/master' into dev 2026-01-27 03:38:56 +01:00
Tobias Kaminsky 56cae60342 daily dev 20260126
Update Nextcloud Android library
2026-01-26 12:53:39 +01:00
Tobias Kaminsky 4757e95500 Merge remote-tracking branch 'origin/master' into dev 2026-01-26 12:42:25 +01:00
Tobias Kaminsky a8da20a2b6 daily dev 20260121
Update Nextcloud Android library
2026-01-21 03:46:51 +01:00
Tobias Kaminsky f26d9cb3af Merge remote-tracking branch 'origin/master' into dev 2026-01-21 03:35:52 +01:00
Tobias Kaminsky 42c38cb60d daily dev 20260120
Update Nextcloud Android library
2026-01-20 03:45:49 +01:00
Tobias Kaminsky 8d6b5617c7 Merge remote-tracking branch 'origin/master' into dev 2026-01-20 03:41:05 +01:00
Tobias Kaminsky db10876ea8 daily dev 20260119
Update Nextcloud Android library
2026-01-19 03:49:45 +01:00
Tobias Kaminsky 6fa636bf5b Merge remote-tracking branch 'origin/master' into dev 2026-01-19 03:37:59 +01:00
Tobias Kaminsky 04a5686fbb daily dev 20260118
Update Nextcloud Android library
2026-01-18 02:44:00 +01:00
Tobias Kaminsky d13aa0d67b Merge remote-tracking branch 'origin/master' into dev 2026-01-18 02:32:48 +01:00
Tobias Kaminsky 59946213c0 daily dev 20260117
Update Nextcloud Android library
2026-01-17 03:50:25 +01:00
Tobias Kaminsky 96e6513870 Merge remote-tracking branch 'origin/master' into dev 2026-01-17 03:38:42 +01:00
Tobias Kaminsky 88df4450a1 daily dev 20260116
Update Nextcloud Android library
2026-01-16 03:50:29 +01:00
Tobias Kaminsky a40967f590 Merge remote-tracking branch 'origin/master' into dev 2026-01-16 03:38:57 +01:00
Tobias Kaminsky d220debe74 daily dev 20260115 2026-01-15 02:41:56 +01:00
Tobias Kaminsky d207006ed6 Merge remote-tracking branch 'origin/master' into dev 2026-01-15 02:30:53 +01:00
Tobias Kaminsky eb6102033d daily dev 20260114
Update Nextcloud Android library
2026-01-14 02:45:13 +01:00
Tobias Kaminsky f77c3a1e59 Merge remote-tracking branch 'origin/master' into dev 2026-01-14 02:33:12 +01:00
Tobias Kaminsky 1543aba987 daily dev 20260113
Update Nextcloud Android library
2026-01-13 03:50:32 +01:00
Tobias Kaminsky 99af177fdb Merge remote-tracking branch 'origin/master' into dev 2026-01-13 03:37:45 +01:00
Tobias Kaminsky 09f7ae74dd daily dev 20260110 2026-01-10 02:41:47 +01:00
Tobias Kaminsky ea45a934b8 Merge remote-tracking branch 'origin/master' into dev 2026-01-10 02:30:30 +01:00
Tobias Kaminsky 33a059cbca daily dev 20260109
Update Nextcloud Android library
2026-01-09 03:49:42 +01:00
Tobias Kaminsky 49f38e4e8f Merge remote-tracking branch 'origin/master' into dev 2026-01-09 03:37:12 +01:00
Tobias Kaminsky 1df0db1deb daily dev 20260108
Update Nextcloud Android library
2026-01-08 03:53:18 +01:00
Tobias Kaminsky 83aedb1e11 Merge remote-tracking branch 'origin/master' into dev 2026-01-08 03:39:03 +01:00
Tobias Kaminsky 438dbd2b5d daily dev 20260103 2026-01-03 02:43:29 +01:00
Tobias Kaminsky f93ae7535f Merge remote-tracking branch 'origin/master' into dev 2026-01-03 02:30:39 +01:00
Tobias Kaminsky 32bd45c953 daily dev 20260101 2026-01-01 02:49:43 +01:00
Tobias Kaminsky 7632b49da0 Merge remote-tracking branch 'origin/master' into dev 2026-01-01 02:33:50 +01:00
Tobias Kaminsky 7e49cda0e5 daily dev 20251231 2025-12-31 02:42:27 +01:00
Tobias Kaminsky d20a768a30 Merge remote-tracking branch 'origin/master' into dev 2025-12-31 02:30:31 +01:00
Tobias Kaminsky 9e64903c95 daily dev 20251230
Update Nextcloud Android library
2025-12-30 03:50:47 +01:00
Tobias Kaminsky d5724b5847 Merge remote-tracking branch 'origin/master' into dev 2025-12-30 03:37:57 +01:00
Tobias Kaminsky a8036b273b daily dev 20251228 2025-12-28 02:44:17 +01:00
Tobias Kaminsky 408e2d5e35 Merge remote-tracking branch 'origin/master' into dev 2025-12-28 02:30:29 +01:00
Tobias Kaminsky eb0f0ce0cf daily dev 20251227 2025-12-27 02:45:05 +01:00
Tobias Kaminsky 19fbcc2e5d Merge remote-tracking branch 'origin/master' into dev 2025-12-27 02:30:32 +01:00
Tobias Kaminsky 5a73cf26c6 daily dev 20251223 2025-12-23 02:42:27 +01:00
Tobias Kaminsky c12ced018e Merge remote-tracking branch 'origin/master' into dev 2025-12-23 02:30:33 +01:00
Tobias Kaminsky aedcd0b85f daily dev 20251220
Update Nextcloud Android library
2025-12-20 03:49:57 +01:00
Tobias Kaminsky 8777e97bac Merge remote-tracking branch 'origin/master' into dev 2025-12-20 03:37:33 +01:00
Tobias Kaminsky 73a3397e70 daily dev 20251219 2025-12-19 02:43:26 +01:00
Tobias Kaminsky 4b011d2790 Merge remote-tracking branch 'origin/master' into dev 2025-12-19 02:31:27 +01:00
Tobias Kaminsky 13431320d7 daily dev 20251218 2025-12-18 02:43:16 +01:00
Tobias Kaminsky c90f282724 daily dev 20251217
Update Nextcloud Android library
2025-12-17 03:53:48 +01:00
Tobias Kaminsky cf9808f5c3 Merge remote-tracking branch 'origin/master' into dev 2025-12-17 03:39:42 +01:00
Tobias Kaminsky 4aed752580 daily dev 20251216
Update Nextcloud Android library
2025-12-16 02:47:22 +01:00
Tobias Kaminsky 922cb2210b Merge remote-tracking branch 'origin/master' into dev 2025-12-16 02:30:35 +01:00
Tobias Kaminsky ea1d0028a4 daily dev 20251213
Update Nextcloud Android library
2025-12-13 03:50:26 +01:00
Tobias Kaminsky 34cc1f8393 Merge remote-tracking branch 'origin/master' into dev 2025-12-13 03:38:48 +01:00
Tobias Kaminsky 36baa77432 daily dev 20251212
Update Nextcloud Android library
2025-12-12 03:52:52 +01:00
Tobias Kaminsky 11c99f647f Merge remote-tracking branch 'origin/master' into dev 2025-12-12 03:39:26 +01:00
Tobias Kaminsky 0ac6159f45 daily dev 20251211 2025-12-11 02:44:53 +01:00
Tobias Kaminsky a21a344e9d Merge remote-tracking branch 'origin/master' into dev 2025-12-11 02:30:39 +01:00
Tobias Kaminsky 957d05e74b daily dev 20251210
Update Nextcloud Android library
2025-12-10 03:50:42 +01:00
Tobias Kaminsky fc268075c0 Merge remote-tracking branch 'origin/master' into dev 2025-12-10 03:37:38 +01:00
Tobias Kaminsky 14f303669b daily dev 20251209 2025-12-09 02:43:23 +01:00
Tobias Kaminsky 44012e019c Merge remote-tracking branch 'origin/master' into dev 2025-12-09 02:30:36 +01:00
Tobias Kaminsky 3a6a7c1d44 daily dev 20251208
Update Nextcloud Android library
2025-12-08 03:49:27 +01:00
Tobias Kaminsky 8856c73d57 Merge remote-tracking branch 'origin/master' into dev 2025-12-08 03:37:06 +01:00
Tobias Kaminsky 46359d32ac daily dev 20251206
Update Nextcloud Android library
2025-12-06 03:50:55 +01:00
Tobias Kaminsky 5be3d922d7 Merge remote-tracking branch 'origin/master' into dev 2025-12-06 03:35:58 +01:00
Tobias Kaminsky 47f76c0d23 daily dev 20251205
Update Nextcloud Android library
2025-12-05 04:01:52 +01:00
Tobias Kaminsky ad481cf7c3 Merge remote-tracking branch 'origin/master' into dev 2025-12-05 03:40:36 +01:00
Tobias Kaminsky fc0fb08a90 daily dev 20251204
Update Nextcloud Android library
2025-12-04 03:56:16 +01:00
Tobias Kaminsky f1ec281ed9 Merge remote-tracking branch 'origin/master' into dev 2025-12-04 03:37:58 +01:00
Tobias Kaminsky 4f741813c4 daily dev 20251203
Update Nextcloud Android library
2025-12-03 03:56:52 +01:00
Tobias Kaminsky 1b982a6969 Merge remote-tracking branch 'origin/master' into dev 2025-12-03 03:40:15 +01:00
Tobias Kaminsky a3411fa540 daily dev 20251202
Update Nextcloud Android library
2025-12-02 03:56:31 +01:00
Tobias Kaminsky 6d4e46ae79 Merge remote-tracking branch 'origin/master' into dev 2025-12-02 03:38:18 +01:00
Tobias Kaminsky 92b5d1f592 daily dev 20251201
Update Nextcloud Android library
2025-12-01 03:59:23 +01:00
Tobias Kaminsky 2a7245dc7d Merge remote-tracking branch 'origin/master' into dev 2025-12-01 03:42:33 +01:00
Tobias Kaminsky 16cf96172c daily dev 20251130 2025-11-30 02:41:56 +01:00
Tobias Kaminsky 74710f015e Merge remote-tracking branch 'origin/master' into dev 2025-11-30 02:30:29 +01:00
Tobias Kaminsky a1995b5a43 daily dev 20251129 2025-11-29 02:50:38 +01:00
Tobias Kaminsky cab6ca18a8 Merge remote-tracking branch 'origin/master' into dev 2025-11-29 02:34:26 +01:00
Tobias Kaminsky 8c069a4c61 daily dev 20251128
Update Nextcloud Android library
2025-11-28 03:52:38 +01:00
Tobias Kaminsky 1592fe0849 Merge remote-tracking branch 'origin/master' into dev 2025-11-28 03:36:45 +01:00
Tobias Kaminsky 2b1fcdadf9 daily dev 20251127
Update Nextcloud Android library
2025-11-27 03:53:06 +01:00
Tobias Kaminsky 4b49cfa9b5 Merge remote-tracking branch 'origin/master' into dev 2025-11-27 03:39:40 +01:00
Tobias Kaminsky 76e54caa9a daily dev 20251126
Update Nextcloud Android library
2025-11-26 03:50:05 +01:00
Tobias Kaminsky 00119bb958 Merge remote-tracking branch 'origin/master' into dev 2025-11-26 03:37:02 +01:00
Tobias Kaminsky a1a7e61154 daily dev 20251125
Update Nextcloud Android library
2025-11-25 03:54:52 +01:00
Tobias Kaminsky 32190c7c3e Merge remote-tracking branch 'origin/master' into dev 2025-11-25 03:38:41 +01:00
Tobias Kaminsky 321fdc0b0a daily dev 20251122
Update Nextcloud Android library
2025-11-22 03:49:29 +01:00
Tobias Kaminsky 43e3ede80c daily dev 20251121
Update Nextcloud Android library
2025-11-21 03:52:43 +01:00
Tobias Kaminsky ba3e8097a2 Merge remote-tracking branch 'origin/master' into dev 2025-11-21 03:37:49 +01:00
Tobias Kaminsky 3947d85bfb daily dev 20251119
Update Nextcloud Android library
2025-11-19 03:50:30 +01:00
Tobias Kaminsky 1b57d60276 Merge remote-tracking branch 'origin/master' into dev 2025-11-19 03:37:24 +01:00
Tobias Kaminsky bbdb34200e daily dev 20251118
Update Nextcloud Android library
2025-11-18 03:52:37 +01:00
Tobias Kaminsky b011c3de2e Merge remote-tracking branch 'origin/master' into dev 2025-11-18 03:38:02 +01:00
Tobias Kaminsky f68cb63498 daily dev 20251115
Update Nextcloud Android library
2025-11-15 03:49:41 +01:00
Tobias Kaminsky e70c251025 Merge remote-tracking branch 'origin/master' into dev 2025-11-15 03:39:35 +01:00
Tobias Kaminsky 5f676be6de daily dev 20251114 2025-11-14 02:44:12 +01:00
Tobias Kaminsky 8e3d651a10 Merge remote-tracking branch 'origin/master' into dev 2025-11-14 02:30:38 +01:00
Tobias Kaminsky 9ac98b7c95 daily dev 20251111
Update Nextcloud Android library
2025-11-11 03:53:46 +01:00
Tobias Kaminsky 53dad83598 daily dev 20251108
Update Nextcloud Android library
2025-11-08 03:51:12 +01:00
Tobias Kaminsky a8600dcbf2 Merge remote-tracking branch 'origin/master' into dev 2025-11-08 03:39:06 +01:00
Tobias Kaminsky 67be4bbab8 daily dev 20251107 2025-11-07 02:42:33 +01:00
Tobias Kaminsky 4a3a2a2d4a Merge remote-tracking branch 'origin/master' into dev 2025-11-07 02:31:42 +01:00
Tobias Kaminsky 1d4fcb52bb daily dev 20251106 2025-11-06 02:48:05 +01:00
Tobias Kaminsky 3cf47d466a Merge remote-tracking branch 'origin/master' into dev 2025-11-06 02:31:26 +01:00
Tobias Kaminsky 0227925229 daily dev 20251104 2025-11-04 02:43:31 +01:00
Tobias Kaminsky 1c52a34df7 Merge remote-tracking branch 'origin/master' into dev 2025-11-04 02:30:38 +01:00
Tobias Kaminsky 27143813d0 daily dev 20251103
Update Nextcloud Android library
2025-11-03 08:36:29 +01:00
859 changed files with 33771 additions and 29535 deletions

No files matched your search

@@ -0,0 +1,179 @@
---
name: android-activity-to-navigator-fragment
description: >
Use when converting a standalone Activity (usually a DrawerActivity or FileActivity
subclass such as a drawer destination) into a Fragment hosted by NavigatorActivity, when
the user mentions "navigator", "NavigatorActivity", "NavigatorScreen", "convert activity
to fragment", "move screen into the new navigation", or names a drawer screen that still
has its own Activity. Covers registering the NavigatorScreen, building the fragment and
its layout, decoupling collaborators from the old Activity type, rewiring every entry
point (drawer, PendingIntents, broadcast receivers, deep links), DI and manifest cleanup,
and migrating the instrumented screenshot test.
license: AGPL-3.0-or-later
SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
SPDX-License-Identifier: AGPL-3.0-or-later
metadata:
author: Nextcloud Android
version: "1.0.0"
---
# Activity → NavigatorActivity Fragment Conversion
Historically every drawer destination was its own `DrawerActivity` subclass, each with its
own toolbar, `DrawerLayout` and back handling. `NavigatorActivity` replaces them with **one
host Activity** that owns the toolbar and drawer, and swaps **fragments** for the
destinations. Converted so far: Community (#16652), Activities (#16753), Notifications
(#16800), Trashbin (#16879), Upload list.
Read `references/ARCHITECTURE.md` once before the first conversion. It explains how
`Navigator`, `NavigatorScreen`, `NavigatorActivity` and `DrawerActivity.pushFragment` work
together.
## The Prime Directive: Behaviour Must Not Change
The screen must look and behave exactly as before from every entry point: drawer item,
notification tap, notification action, deep link, rotation, back press, drawer toggle and
menu actions. This is a structural refactor. If you find a bug, report it instead of
fixing it in the same change.
## Workflow
### Step 0: Inventory (do not edit yet)
1. Read the whole Activity, its layout and its menu.
2. `git grep -n "<ActivityName>"` across `app/src`, including `AndroidManifest.xml`,
`ComponentsModule.java`, KDoc links, `androidTest` and screenshot file names. Every hit is
either an **entry point** you must rewire or a **reference** you must update.
3. List what the Activity takes from its **base class**. This is the step most likely to go
wrong. `NavigatorActivity` is a `DrawerActivity`, **not** a `FileActivity`. Anything from
`FileActivity` (`fileOperationsHelper`, `OperationsService` binding,
`onRemoteOperationFinish`, `requestCredentialsUpdate`, `showLoadingDialog`,
`connectivityService` field, `backgroundJobManager` field, `EXTRA_FILE`/`EXTRA_USER`
handling in `onCreate`) does not exist in the host. See `references/HOST-CAPABILITIES.md`.
4. List the intent extras the Activity, or its base class, reads. Each one must keep working
when it arrives on the `NavigatorActivity` intent.
5. Note any `onActivityResult`, `BroadcastReceiver`, `OnBackPressedCallback`,
`onOptionsItemSelected`, `ActionMode` or drawer listeners. Each one needs a fragment
equivalent (see `references/ACTIVITY-TO-FRAGMENT-MAPPING.md`).
If a collaborator needs a capability the host does not have, **stop and ask the
developer** whether to (a) move the flow into the fragment and extract the shared pieces
into a helper used by both places, or (b) change the host. Option (a) is the default. It
was chosen for the upload list's credential check (`CredentialsUpdateHelper`).
### Step 1: Register the screen in `NavigatorScreen`
Add the screen in all **five** places in `ui/navigation/NavigatorScreen.kt`. The `when`
expressions are exhaustive, so the compiler catches a missing branch, except in `fromTag`:
1. `@Parcelize object X : NavigatorScreen(X_TAG[, hasDrawer = false])`
2. `private const val X_TAG = "X"` in the companion
3. `fromTag`: `X_TAG -> X` (**not compiler-checked**; missing it breaks restoring after rotation)
4. `menuItemId()`: the drawer item id, or `-1` for screens outside the drawer
5. `actionBarStyle()`: `ActionBarStyle.Plain to R.string.<existing title>`
6. `toFragment()`: `X -> XFragment()`
Use `hasDrawer = false` for screens with a back arrow instead of a hamburger (Notifications).
### Step 2: Fragment layout
Copy the Activity layout to `fragment_<name>.xml` and strip the shell. The host already
provides it:
- remove the root `DrawerLayout`, the `<include layout="@layout/toolbar_standard"/>` and the
`<include layout="@layout/drawer"/>`;
- remove `layout_below="@id/appbar"`. The host's `FragmentContainerView` already sits below
the app bar;
- keep every view id the code or tests use, so the generated binding properties match;
- keep the original SPDX copyright lines and add a line for the current year (derived file).
Delete the old layout once nothing references it.
### Step 3: Write the fragment
Follow `references/ACTIVITY-TO-FRAGMENT-MAPPING.md`. The essentials:
- `class XFragment : Fragment()`, with `@Inject lateinit var` dependencies. Injection is done
by `NavigatorActivity.onAttachFragment`, so `Injectable` is optional.
- Nullable binding: `private var binding: FragmentXBinding? = null`. Set it to `null` in
`onDestroyView`. Use `val binding = binding ?: return` in every function that touches views
(#16783 fixed a crash after a configuration change caused by `_binding!!`).
- Host access: `getTypedActivity(NavigatorActivity::class.java)` (or `DrawerActivity` /
`BaseActivity` when that is all you need) for `user`, `storageManager`, `clientRepository`,
`setUser`, `setDrawerIndicatorEnabled`, `startActionMode`.
- Menu: `requireActivity().addMenuProvider(provider, viewLifecycleOwner, Lifecycle.State.RESUMED)`.
Do **not** handle `android.R.id.home`. The host does that.
- Back press: implement `NavigatorOnBackPressListener` only if the screen has internal
navigation (Trashbin folders).
- Remove `getMenuItemId()`, `setupDrawer()`, `setupToolbar()`, `highlightNavigationViewItem()`
and title setup. `NavigatorScreen` + `NavigatorActivity.setupActionBar` handle all of these.
- Keep files under 300 lines. Extract cohesive flows (conflict handling, credential checks,
the menu provider) into their own classes in the fragment's package.
### Step 4: Decouple collaborators from the old Activity
Adapters, helpers and listeners typed as `XActivity` or `FileActivity` must take the
narrowest type that has what they use. Usually that is `DrawerActivity`, `BaseActivity`,
`NavigatorActivity` or a plain `Context`. Calls to capabilities the host lacks become
callbacks on the click or listener interface, implemented by the fragment
(e.g. `UploadListItemOnClick.onCredentialErrorClick(user)`).
### Step 5: Rewire every entry point
**Always** build the intent with `NavigatorActivity.intent(context, NavigatorScreen.X)`.
`NavigatorActivity.onCreate` calls `requireNotNull` on the screen extra, so a bare
`Intent(context, NavigatorActivity::class.java)` crashes (#17193).
| Old call site | New call site |
|---|---|
| `DrawerActivity.onNavigationItemClicked`: `startActivity(X.class, FLAG_ACTIVITY_CLEAR_TOP)` | `pushFragment(NavigatorScreen.X.INSTANCE)` |
| Buttons in other DrawerActivities: `startActivity(X::class.java)` | `pushFragment(NavigatorScreen.X)` |
| `handleDeepLink`: `startActivity(X.class)` | `pushFragment(NavigatorScreen.X.INSTANCE)` |
| `PendingIntent` / `BroadcastReceiver` / Worker: `Intent(context, X::class.java)` | `NavigatorActivity.intent(context, NavigatorScreen.X).apply { flags = … }` |
| `X.createIntent(...)` factory | inline `NavigatorActivity.intent(...)` + only the extras the fragment reads |
Keep the original flags (`FLAG_ACTIVITY_NEW_TASK`, `FLAG_ACTIVITY_CLEAR_TOP`, …). Extras the
old base class consumed (e.g. `FileActivity.EXTRA_USER` → `setUser`) must now be read by the
fragment from `activity?.intent`, once, when `savedInstanceState == null`.
### Step 6: DI, manifest, cleanup
- `ComponentsModule.java`: remove `abstract XActivity xActivity();` and add
`@ContributesAndroidInjector abstract XFragment xFragment();`. Without this, injection
fails at runtime.
- `AndroidManifest.xml`: remove the `<activity>` entry.
- Delete the Activity, update KDoc/Javadoc `[link]`s that pointed at it, and remove now-unused
imports in files you edited.
### Step 7: Migrate the instrumented test
Rename `XActivityIT` to `XFragmentIT` and launch through the host:
```kotlin
val intent = NavigatorActivity.intent(targetContext, NavigatorScreen.X)
ActivityScenario.launch<NavigatorActivity>(intent).use { scenario -> … }
```
To call into the fragment, find it with `sut.supportFragmentManager.fragments.filterIsInstance<XFragment>()`
(see `TrashbinFragmentIT.launchFragment`). **Rename the reference screenshots with `git mv`**
(`app/screenshots/generic/debug/<pkg>.XActivityIT_*.png` → `XFragmentIT_*.png`) so the
screenshot test compares against the existing images instead of failing.
### Step 8: Verify
1. `./gradlew :app:compileGplayDebugKotlin :app:compileGplayDebugJavaWithJavac :app:compileGplayDebugAndroidTestKotlin`
2. `./gradlew spotlessKotlinCheck detekt lintGplayDebug spotbugsGplayDebug`, then fix findings
in every file you touched.
3. `git grep -n "<ActivityName>\|<old_layout_name>"` returns nothing.
4. Manual checklist (hand it to the developer if you cannot run the app): open from the
drawer, from every notification or PendingIntent, from the deep link; rotate on the
screen; switch to another drawer destination and press back; toggle the drawer with the
hamburger; use every menu action; check light and dark themes.
## References
- `references/ARCHITECTURE.md`: how the navigator works.
- `references/ACTIVITY-TO-FRAGMENT-MAPPING.md`: Activity API → fragment equivalent.
- `references/HOST-CAPABILITIES.md`: what `NavigatorActivity` provides and what it does not.
- `references/PITFALLS.md`: bugs that the earlier conversions ran into.
- `assets/worked-example.md`: the upload list conversion, step by step.
@@ -0,0 +1,81 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Worked Example: `UploadListActivity` → `UploadListFragment`
This conversion was the hardest one so far, because the Activity extended `FileActivity`.
## Inventory findings
- Base class `FileActivity`. The adapter called `activity.fileOperationsHelper.checkCurrentCredentials(user)`
for uploads that failed with `CREDENTIAL_ERROR`. The result came back through
`onRemoteOperationFinish` → `requestCredentialsUpdate` → `CheckRemoteWipeTask` →
`performCredentialsUpdate` → `startActivityForResult(AuthenticatorActivity)` →
`onActivityResult` → `FilesSyncHelper.restartUploadsIfNeeded`.
- Entry points: drawer `nav_uploads`, `FileUploaderIntents.openUploadListIntent` (upload
notifications, with `EXTRA_USER`), `AppWideNotificationManager.getUploadListPendingIntent`,
`SyncConflictNotificationBroadcastReceiver`.
- `EXTRA_USER` was consumed by `FileActivity.onCreate` → `setUser`. `EXTRA_FILE` was
ignored (the Activity set `file = null`).
- Menu: global pause/resume toggle. A `LocalBroadcastManager` receiver for upload events.
`UploadWarningCard` registered in `onCreate` and unregistered in `onDestroy`.
## Decisions
- Host stays a `DrawerActivity`. The credential flow moves into the
fragment.
- To avoid copying `FileActivity` logic, `ui/helpers/CredentialsUpdateHelper.kt` was
extracted. `FileActivity.performCredentialsUpdate`, `CheckRemoteWipeTask` and the fragment
all use it.
## Resulting files
| File | Role |
|---|---|
| `ui/fragment/uploadList/UploadListFragment.kt` | lifecycle, list setup, receiver, warning card, `EXTRA_USER` |
| `ui/fragment/uploadList/UploadListMenuProvider.kt` | global pause toggle |
| `ui/fragment/uploadList/UploadListConflictHandler.kt` | sync-conflict check and retry |
| `ui/fragment/uploadList/UploadListCredentialsHandler.kt` | check credentials → remote wipe → re-login |
| `ui/helpers/CredentialsUpdateHelper.kt` | credential steps shared with `FileActivity` |
| `res/layout/fragment_upload_list.xml` | old layout without `DrawerLayout`/toolbar/drawer |
## Collaborator changes
- `UploadListAdapter(activity: FileActivity)` → `DrawerActivity`.
`fileOperationsHelper.checkCurrentCredentials(user)` → `itemOnClick.onCredentialErrorClick(user)`.
- `UploadListAdapterHelper(activity: FileActivity)` → `DrawerActivity`;
`activity.accountManager` → `activity.userAccountManager`.
- `UploadListItemOnClick` gained `onCredentialErrorClick(user: User)`.
## Entry point changes
```kotlin
// FileUploaderIntents
val intent = NavigatorActivity.intent(context, NavigatorScreen.UploadList).apply {
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
putExtra(FileActivity.EXTRA_USER, operation?.user)
}
// AppWideNotificationManager, SyncConflictNotificationBroadcastReceiver
val intent = NavigatorActivity.intent(context, NavigatorScreen.UploadList).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
```
```java
// DrawerActivity.onNavigationItemClicked
} else if (itemId == R.id.nav_uploads) {
resetOnlyPersonalAndOnDevice();
pushFragment(NavigatorScreen.UploadList.INSTANCE);
```
## Cleanup
- `ComponentsModule`: `uploadListActivity()` removed, `uploadListFragment()` added.
- Manifest entry removed. `UploadListActivity.kt` and `upload_list_layout.xml` deleted.
- `FileUploadEventBroadcaster` KDoc links updated.
- `UploadListActivityActivityIT` → `UploadListFragmentIT`, with screenshots `git mv`'d.
@@ -0,0 +1,52 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Activity API → Navigator Fragment Equivalent
| In the Activity | In the fragment |
|---|---|
| `class X : DrawerActivity()` / `FileActivity()` | `class XFragment : Fragment()` |
| `onCreate`: `setContentView(binding.root)` | `onCreateView`: `binding = FragmentXBinding.inflate(inflater, container, false)` |
| View setup in `onCreate` | `onViewCreated` |
| Non-view setup in `onCreate` (intent extras, config) | `onCreate` (guard extras with `savedInstanceState == null`) |
| `onDestroy` cleanup tied to views/receivers registered in `onCreate` | `onDestroyView` |
| `onStart`/`onStop`/`onResume` | same callbacks on the fragment |
| `setupToolbar()`, `updateActionBarTitleAndHomeButtonByString`, `setupDrawer(menuItemId)` | delete; `NavigatorScreen.actionBarStyle()` + host |
| `getMenuItemId()`, `highlightNavigationViewItem()` | delete; `NavigatorScreen.menuItemId()` + host |
| `onCreateOptionsMenu` / `onOptionsItemSelected` | `MenuProvider` added with `viewLifecycleOwner, Lifecycle.State.RESUMED`; return `false` for ids you do not own |
| `android.R.id.home` → toggle drawer | delete; the host handles it |
| `OnBackPressedCallback` for internal navigation | `NavigatorOnBackPressListener` |
| `mDrawerToggle.isDrawerIndicatorEnabled = x` | `navigatorActivity?.setDrawerIndicatorEnabled(x)` |
| `addDrawerListener(l)` | `activity?.findViewById<DrawerLayout>(R.id.drawer_layout)?.addDrawerListener(l)` |
| `startActionMode(cb)` | `navigatorActivity?.startActionMode(cb)` |
| `findViewById(R.id.sort_button)` (toolbar views) | `activity?.findViewById(...)`; the toolbar belongs to the host |
| `supportFragmentManager` for dialogs | `childFragmentManager`, or `requireActivity().supportFragmentManager` when the dialog calls back into the activity |
| `this` as `Context` | `requireContext()` (inside callbacks: capture before launching) |
| `this` as `Activity` (snackbars, PopupMenu, adapters) | `requireActivity()` / typed host |
| `lifecycleScope` | `lifecycleScope` (fragment lifetime; survives while on back stack) or `viewLifecycleOwner.lifecycleScope` (view work only) |
| `user`, `storageManager`, `clientRepository`, `capabilities` | `navigatorActivity?.user`, `.storageManager`, `.clientRepository`, `.capabilities` |
| `setUser(user)` | `navigatorActivity?.setUser(user)` (`BaseActivity.setUser` is public) |
| `startActivityForResult` + `onActivityResult` | `registerForActivityResult(StartActivityForResult())` as a fragment property |
| `finish()` | `activity?.finish()` |
| `DisplayUtils.showSnackMessage(this, …)` | `DisplayUtils.showSnackMessage(requireView(), …)` / `SnackbarUtil.show(this, …)` |
| inner `BroadcastReceiver` class | `private val receiver = object : BroadcastReceiver() { … }`, avoids an extra type in the file |
| `@Inject var x: T? = null` with `@JvmField` | `@Inject lateinit var x: T` |
| Activity fields inherited from the base (`viewThemeUtils`, `preferences`, `connectivityService`, `accountManager`, `backgroundJobManager`) | `@Inject lateinit var` them in the fragment |
## Dialog listener lookups
Dialogs that cast `activity as Listener` break when the listener is now a fragment.
Trashbin fixed `SortingOrderDialogFragment` with this fallback chain:
```kotlin
val listener = parentFragment as? OnSortingOrderListener
?: activity as? OnSortingOrderListener
?: requireActivity().supportFragmentManager.fragments
.firstOrNull { it is OnSortingOrderListener } as? OnSortingOrderListener
```
Check every dialog the screen opens for the same pattern.
@@ -0,0 +1,89 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Navigator Architecture
All classes live in `app/src/main/java/com/owncloud/android/ui/navigation/`.
```
NavigatorActivity (DrawerActivity) activity_navigator.xml
├─ toolbar_standard (appbar) DrawerLayout
├─ FragmentContainerView ◄── Navigator ──► ├─ CoordinatorLayout
└─ drawer │ ├─ appbar
│ └─ fragment_container_view
└─ drawer
```
## `NavigatorScreen`: the destination registry
A `sealed class NavigatorScreen(val tag: String, val hasDrawer: Boolean = true) : Parcelable`.
Each destination is a `@Parcelize object`, so it can travel in an `Intent` extra and is
compared by identity in `when`.
| Member | Purpose |
|---|---|
| `tag` | Used as the fragment back-stack entry name. Must be unique |
| `hasDrawer` | `true`: hamburger + unlocked drawer. `false`: back arrow + `LOCK_MODE_LOCKED_CLOSED` |
| `fromTag(tag)` | Turns a back-stack entry name back into a screen. Used after configuration changes |
| `menuItemId()` | Drawer item to highlight (`-1` for none) |
| `actionBarStyle()` | `ActionBarStyle.Plain` → `setupToolbar()`, `Search` → `setupHomeSearchToolbarWithSortAndListButtons()`, plus title res |
| `toFragment()` | Creates a fresh fragment instance |
## `Navigator`: the fragment stack
- `push(screen)`: ignores the call if a fragment with that tag already exists. Otherwise it
does `replace(container, screen.toFragment())` + `addToBackStack(screen.tag)`.
- `pop()`: `popBackStack()` and returns the new top screen.
- `getTopScreen()`: reads the name of the last back-stack entry and maps it with `fromTag`.
This keeps working after process death or rotation, because the `FragmentManager`
restores the back stack. The in-memory `stack` does not survive that.
## `NavigatorActivity`: the host
- `onCreate`: inflates `ActivityNavigatorBinding`, then `requireNotNull`s the
`EXTRA_SCREEN` extra. It either `push`es the screen (first launch) or restores the action
bar from `getTopScreen()` (re-creation).
- `onAttachFragment`: `AndroidSupportInjection.inject(fragment)` for **every** attached
fragment. This is why converted fragments need a `@ContributesAndroidInjector` entry in
`ComponentsModule`, even when they do not implement `Injectable`.
- `setupActionBar(screen)`: toolbar style, title, drawer or back arrow, drawer lock mode.
Called on every `push`/`pop`.
- Back press (`OnBackPressedCallback`): close the drawer → let the top
`NavigatorOnBackPressListener` intercept → `finish()` if only one entry is left → `pop()`.
- Home button (`onOptionsItemSelected(android.R.id.home)`): listener intercept → back if
`!hasDrawer` → toggle the drawer otherwise.
- `getMenuItemId()` / `onResume`: highlight the drawer item of the top screen.
- `NavigatorActivity.intent(context, screen)`: the **only** correct way to build a launch
intent.
## `DrawerActivity.pushFragment(screen)`
```java
public void pushFragment(NavigatorScreen screen) {
if (this instanceof NavigatorActivity navigatorActivity) {
navigatorActivity.push(screen); // already in the navigator: swap fragment
} else {
startActivity(NavigatorActivity.Companion.intent(this, screen)); // e.g. from FileDisplayActivity
}
}
```
Drawer item clicks call this, so moving between converted screens swaps fragments
inside a single `NavigatorActivity` instead of starting a new Activity each time.
## `NavigatorOnBackPressListener`
```kotlin
interface NavigatorOnBackPressListener {
fun canInterceptBackPress(): Boolean
fun interceptBackPress()
}
```
Implement it in a fragment that has its own navigation inside the screen. For example,
`TrashbinFragment` goes up one folder while `trashbinPresenter.isRoot == false`. The host
checks it for both the system back gesture and the toolbar home button.
@@ -0,0 +1,44 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# What `NavigatorActivity` Provides
`NavigatorActivity` extends `DrawerActivity → ToolbarActivity → BaseActivity`. It does
**not** extend `FileActivity`. Decided to keep it that way: making every
navigator screen a `FileActivity` would bind `OperationsService` for all of them and show
`FileActivity`'s offline info box on screens that never had one.
## Available from the host
- `BaseActivity`: `user`, `setUser(user)`, `capabilities`, `storageManager`,
`clientRepository`, `userAccountManager`, `account`.
- `ToolbarActivity`: toolbar setup, `showInfoBox`/`hideInfoBox` (only called by
`FileActivity`), sort and grid toolbar buttons (`R.id.sort_button`,
`R.id.switch_grid_view_button`).
- `DrawerActivity`: `appPreferences`, `openDrawer`/`closeDrawer`/`isDrawerOpen`,
`setDrawerIndicatorEnabled`, `pushFragment`, `fetchExternalLinks`.
## Not available: `FileActivity`-only features
| `FileActivity` feature | How to replace it in a fragment |
|---|---|
| `fileOperationsHelper.*` (queues operations on `OperationsService`) | Run the `RemoteOperation`/`SyncOperation` directly in `lifecycleScope` on `Dispatchers.IO` with a client for the right user |
| `onRemoteOperationFinish(op, result)` override | Handle the result inline after the coroutine returns |
| `requestCredentialsUpdate(account)` → `CheckRemoteWipeTask` → `performCredentialsUpdate` | `CredentialsUpdateHelper` (`isRemoteWipeRequested`, `invalidateCredentials`, `createUpdateCredentialsIntent`) + `registerForActivityResult` |
| `onActivityResult(REQUEST_CODE__UPDATE_CREDENTIALS, RESULT_OK)` | the `ActivityResultLauncher` callback |
| `showLoadingDialog` / `dismissLoadingDialog` | `LoadingDialog.newInstance(msg).show(childFragmentManager, TAG)` and `dismissAllowingStateLoss()` |
| `EXTRA_USER` → `setUser` in `onCreate` | fragment reads `activity?.intent` and calls `navigatorActivity?.setUser` |
| `EXTRA_FILE` → `file` | read it in the fragment if it is used, otherwise drop it from the callers |
| `connectivityService`, `backgroundJobManager`, `accountManager` fields | `@Inject lateinit var` in the fragment |
## De-duplication rule
When a fragment needs logic that a base Activity implements privately, **do not copy it**.
Extract the reusable steps into a Kotlin helper (e.g. `ui/helpers/CredentialsUpdateHelper.kt`).
Have the original Activity code call the helper too, so there is one implementation.
Only the orchestration specific to the fragment (coroutines, result launcher, dialog) should
live in the fragment's package.
@@ -0,0 +1,71 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Pitfalls Found in Earlier Conversions
## Bare intents crash the host (#17193)
`NotificationWork` was changed to `Intent(context, NavigatorActivity::class.java)` without
a screen. `NavigatorActivity.onCreate` calls `requireNotNull` on `EXTRA_SCREEN`, so tapping
the notification crashed. Always use `NavigatorActivity.intent(context, NavigatorScreen.X)`.
Check **every** `PendingIntent`, `BroadcastReceiver`, Worker and notification manager that
referenced the old Activity.
## `binding!!` after a configuration change (#16783)
The `_binding!!` / `val binding get() = _binding!!` pattern crashed when a callback
(presenter, coroutine, receiver) fired after `onDestroyView`. Use a nullable
`private var binding` and `val binding = binding ?: return` in each function.
## Screen not restored after rotation (#16783)
`NavigatorActivity` only re-applies the action bar and drawer highlight if
`NavigatorScreen.fromTag` knows the tag. `fromTag` is not an exhaustive `when` over the
sealed class, so the compiler does not catch a missing entry.
## Dependency injection
`NavigatorActivity.onAttachFragment` injects every fragment. That only works if
`ComponentsModule` has a `@ContributesAndroidInjector abstract XFragment xFragment();`.
Without it you get an `IllegalArgumentException: No injector factory bound` at runtime, not at
compile time. `addFragmentOnAttachListener` / lifecycle callbacks did not behave the same,
which is why the deprecated `onAttachFragment` is used.
## Toolbar views belong to the host
Sort and grid buttons, the info box and the search bar live in the host's `toolbar_standard`.
Reach them with `activity?.findViewById`. Set their visibility explicitly, because the
previous screen may have changed it.
## Dialog callbacks
Dialogs that do `activity as Listener` silently stop working when the listener is now a
fragment (see the `SortingOrderDialogFragment` fix in `ACTIVITY-TO-FRAGMENT-MAPPING.md`).
## Lifecycle scope choice
Long-running work started by the user (retrying an upload, executing an action) should use
the fragment's `lifecycleScope`. That keeps it running while the fragment sits on the back
stack with its view destroyed. Only pure view work should use
`viewLifecycleOwner.lifecycleScope`. Always null-check the binding when the work returns.
## Receivers and registrations
Anything registered in the Activity's `onCreate` and released in `onDestroy` (e.g.
`UploadWarningCard.register/unregister`) must move to `onViewCreated`/`onDestroyView`.
Otherwise it leaks across back-stack transitions or registers twice.
## Screenshot tests
Renaming `XActivityIT` → `XFragmentIT` changes the screenshot names. `git mv` the PNGs in
`app/screenshots/generic/debug/` to match, or CI reports missing references.
## File size and type rules
`AGENTS.md` caps files at 300 lines and wants one type per file. Activities converted to
fragments often exceed 300 lines. Split cohesive flows (menu provider, conflict handler,
credentials handler) into separate classes in the fragment's package.
@@ -0,0 +1,135 @@
---
name: android-eventbus-to-workmanager-flow
description: >
Use when replacing a GreenRobot EventBus event that a WorkManager worker posts (progress,
state, completion) with WorkManager's own observation APIs, consumed through a ViewModel
Flow; when the user mentions "event bus", "EventBus", "EventBusFactory", "@Subscribe",
"worker progress", "setProgress", "observe worker", "getWorkInfosForUniqueWorkFlow" or
"listen to the worker through the viewmodel". Covers publishing progress from the worker,
building the ViewModel Flow keyed by the work name, DI registration, collecting the Flow
from Kotlin or legacy Java fragments/activities, and deleting the event classes.
license: AGPL-3.0-or-later
SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
SPDX-License-Identifier: AGPL-3.0-or-later
metadata:
author: Nextcloud Android
version: "1.0.0"
---
# EventBus → WorkManager Flow via ViewModel
Workers used to tell the UI what they were doing by posting GreenRobot EventBus events
(`EventBusFactory.downloadProgressEventBus.post(FileDownloadProgressEvent(percent))`). That
has three problems: the event is global (every subscriber gets every worker's events,
whatever file it is about), it is lost when nobody is registered, and the subscriber has to
register and unregister by hand in `onStart`/`onStop`.
WorkManager already stores each worker's state and progress and exposes them as `Flow`s. The
UI asks WorkManager about **one specific piece of work**, through a ViewModel, and collects
the Flow with the lifecycle. Official guide:
https://developer.android.com/develop/background-work/background-tasks/persistent/how-to/observe
Converted so far: `FileDownloadProgressEvent` → `FileDetailFragmentViewModel.downloadProgress`
(see `assets/worked-example.md`). The earlier `FileDisplayActivityViewModel.observeOfflineWorker`
is the simplest form of the same pattern (state only, Kotlin consumer).
## The Prime Directive: Behaviour Must Not Change
The screen must show the same thing at the same moments as before. The only intended
differences are the ones the global bus got wrong: a screen now only reacts to the work it is
about. Write them down for the PR description. If you find an unrelated bug, report it
instead of fixing it in the same change.
## Workflow
### Step 0: Inventory (do not edit yet)
1. `git grep -n "<EventName>"` across `app/src`. List every **poster** (usually a worker) and
every **subscriber** (`@Subscribe fun on…(event: <EventName>)`).
2. If the event lives on a dedicated bus (`EventBusFactory.<x>EventBus`), also grep for the
bus. When it has no other users, delete it together with the event.
3. For each poster, find how its work is enqueued in `BackgroundJobManagerImpl`: the
**unique work name** (`enqueueUniqueWork(name, …)`) and the **tags** (`oneTimeRequestBuilder`
adds `formatNameTag`, `formatClassTag`, `formatUserTag`, plus any custom tag). The UI
must be able to rebuild exactly one of these from what it already knows (user, file id…).
4. List what each event field carries and what the subscriber does with it. Decide whether
it is **progress** (while running → `setProgress`), a **result** (at the end →
`Result.success(outputData)`), or only **state** (`WorkInfo.state`, nothing to publish).
5. Look for older parallel mechanisms the subscriber also uses for the same purpose (bound
listeners, `LocalBroadcastManager`). If you can prove one is dead (e.g. a field that is
only ever set to `null`), remove it with all its plumbing, including test doubles in
`app/src/debug` and mocks in `androidTest`. Otherwise leave it and mention it in the summary.
### Step 1: Make the work addressable
If the unique work name / tag builder is `private` in `BackgroundJobManagerImpl`, move it
into the `companion object` next to `formatNameTag`/`formatClassTag` as a public
`format…Tag(...)` function, and have the enqueue and cancel call sites use it. The UI and
the scheduler must build the name with the same function, never with a copied string.
### Step 2: Publish from the worker
- Add the `Data` key as a `const val` in the worker's `companion object`
(`const val PROGRESS_PERCENT = "PROGRESS_PERCENT"`).
- From a `suspend` context call `setProgress(workDataOf(KEY to value))`. From a non-suspend
callback (e.g. `OnDatatransferProgressListener.onTransferProgress`) call
`setProgressAsync(...)`.
- **Throttle it.** WorkManager writes progress to its database. Publish only when the value
changed, and reuse an existing throttle (the notification update interval) when the
worker has one.
- Results go in `Result.success(workDataOf(...))` and are read from `WorkInfo.outputData`.
- Delete the `post(...)` call and the event imports.
### Step 3: ViewModel
One ViewModel per screen, in a package next to the screen
(`ui/fragment/<screen>/<Screen>FragmentViewModel.kt`, mirroring
`ui/activity/filedisplayactivity/FileDisplayActivityViewModel.kt`). Template:
`references/VIEWMODEL-TEMPLATE.md`.
- Constructor-inject `WorkManager` (`@Inject constructor(private val workManager: WorkManager)`).
- Hold the work name the screen is interested in a `MutableStateFlow<String?>`. A setter
function (`observeDownloadProgress(user, file)`) builds it with the Step 1 function.
- Expose a **cold** `Flow<T>`: `filterNotNull()` → `flatMapLatest { getWorkInfosForUniqueWorkFlow(it) }`
→ map the `WorkInfo` list to the UI value → `distinctUntilChanged()`. Use
`getWorkInfoByIdFlow(id)` when you have the request id, `getWorkInfosByTagFlow(tag)` when
the work is not unique.
- Progress is only present while `state == RUNNING`. It is empty after the work finishes, so
filter on `RUNNING` and drop missing keys (`progress.keyValueMap[KEY] as? Int`).
- Register it in `di/ViewModelModule.kt` with `@Binds @IntoMap @ViewModelKey(X::class)`.
Without this, `ViewModelFactory` throws at runtime.
### Step 4: Consumer
- Get the ViewModel from `ViewModelFactory`: Kotlin `by viewModels { vmFactory }`, Java
`new ViewModelProvider(this, vmFactory).get(X.class)` in `onCreate`. Injection of
`Injectable` fragments happens before `onAttach`, so `vmFactory` is ready in `onCreate`.
- Tell the ViewModel what to watch where the screen learns its subject (`onViewCreated`,
and every public "show this other file" method such as `updateFileDetails(file, user)`).
- Collect with the **view** lifecycle in fragments:
- Kotlin: `viewLifecycleOwner.lifecycleScope.launch { viewLifecycleOwner.repeatOnLifecycle(STARTED) { vm.flow.collect { … } } }`
- Java: `LifecycleOwnerExtensionsKt.collectWhenStarted(getViewLifecycleOwner(), viewModel.getX(), this::onX);`
(`utils/extensions/LifecycleOwnerExtensions.kt`). Do not switch to `LiveData` for Java
callers. See `references/PITFALLS.md` for why.
- Turn the old `@Subscribe public void onX(Event e)` into `private void onX(T value)`. Keep
its body unchanged apart from reading the value directly.
- Remove the `register`/`unregister` lines for the bus. Keep `EventBus.getDefault()` registration
if the class still has other `@Subscribe` methods.
### Step 5: Delete and verify
1. Delete the event class (and the dedicated bus if it has no users left).
2. `git grep -n "<EventName>\|<busName>"` returns nothing.
3. `./gradlew :app:compileGplayDebugJavaWithJavac spotlessKotlinCheck detekt`, then
`lintGplayDebug spotbugsGplayDebug`. Fix findings in every file you touched.
4. Manual check (hand it to the developer if you cannot run the app): start the work and
open the screen, so the value shows up; open the screen first, then start the work; rotate
while it runs; leave the screen for more than 5 s, let the work finish, come back (no stale
value); open the screen for a *different* subject while work runs for another one (it must
not react).
## References
- `references/VIEWMODEL-TEMPLATE.md`: ViewModel, worker and consumer snippets.
- `references/PITFALLS.md`: what went wrong or nearly went wrong.
- `assets/worked-example.md`: `FileDownloadProgressEvent` → `FileDetailFragmentViewModel`.
@@ -0,0 +1,56 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Worked Example: `FileDownloadProgressEvent` → `FileDetailFragmentViewModel`
## Inventory findings
- Event: `ui/events/FileDownloadProgressEvent(percent: Int)` on a dedicated bus,
`ui/events/EventBusFactory.downloadProgressEventBus`. Neither had other users.
- Poster: `FileDownloadWorker.onTransferProgress`, on every transfer chunk, unthrottled, with
no file information.
- Subscriber: `FileDetailFragment` (Java). It registered the bus in `onStart`, unregistered
it in `onStop`, and `@Subscribe(threadMode = MAIN) onDownloadProgress` showed the progress
block with the "downloading" text and the percent.
- Enqueue: `BackgroundJobManagerImpl.startFileDownloadJob` →
`enqueueUniqueWork(startFileDownloadJobTag(accountName, fileId), KEEP, request)`, and the
same string as a tag. The builder was `private`.
- Parallel mechanism: `containerActivity.getFileDownloadProgressListener()` /
`FileDownloadWorker.FileDownloadProgressListener`. The field in `FileActivity` is never
assigned, so it is always `null`, which is why the bus was added (commit `37df0dca9d`).
Removed in the same change, since the ViewModel replaces it.
- Folders use `FolderDownloadWorker`, which never posted the event.
## Changes
| File | Change |
|---|---|
| `jobs/BackgroundJobManagerImpl.kt` | `startFileDownloadJobTag` → public companion `formatFileDownloadTag`, used by start and cancel |
| `jobs/download/FileDownloadWorker.kt` | `PROGRESS_PERCENT` key; `setProgressAsync(workDataOf(PROGRESS_PERCENT to percent))` inside the notification throttle; bus post removed |
| `ui/fragment/filedetail/FileDetailFragmentViewModel.kt` | new; `downloadProgress: Flow<Int>` keyed by `formatFileDownloadTag` |
| `di/ViewModelModule.kt` | `@Binds @IntoMap @ViewModelKey(FileDetailFragmentViewModel::class)` |
| `utils/extensions/LifecycleOwnerExtensions.kt` | new; `collectWhenStarted(flow, Consumer)` for Java consumers |
| `ui/fragment/FileDetailFragment.java` | `ViewModelFactory` inject, VM in `onCreate`, `observeDownloadProgress` in `onViewCreated` and `updateFileDetails(file, user)`, `collectWhenStarted` on the view lifecycle, `@Subscribe` → `private void onDownloadProgress(int)`, bus register/unregister removed |
| `ui/events/FileDownloadProgressEvent.kt`, `ui/events/EventBusFactory.kt` | deleted |
| `FileDownloadWorker.FileDownloadProgressListener` and its plumbing | deleted: inner class, worker field, `ComponentsGetter.getFileDownloadProgressListener()`, `FileActivity` field and getter, the two `= null` assignments in `FileDisplayActivity`, the download branches of `FileDetailFragment.listenForTransferProgress`/`leaveTransferProgress`, the `TestActivity` override and the `FileMenuFilterIT` mock |
## Intended behaviour differences
- Progress is shown only for the file the details screen is about, not for whichever file is
downloading.
- The UI updates at the notification throttle (750 ms) instead of on every chunk.
## Decisions
- **Cold `Flow` + `collectWhenStarted`, not `LiveData`.** `LiveData` replayed a stale
percent after a finish that happened while the view was stopped (see `PITFALLS.md`).
- **The ViewModel is created in `onCreate`, not `onViewCreated`.** The activity can call
`updateFileDetails(file, user)` before the view exists, and the ViewModel must survive view
re-creation from the back stack.
- **The finished state is still handled by the existing broadcast path.**
`FileDisplayActivity` calls `updateFileDetails(false, true)` on `ACTION_DOWNLOAD_COMPLETED`.
Moving that to `WorkInfo.State.SUCCEEDED` is a possible follow-up, not part of this change.
@@ -0,0 +1,67 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Pitfalls
## `LiveData` replays a stale value
The first draft exposed `asLiveData()` so the Java fragment could `observe(...)`. `LiveData`
keeps its last value and stops collecting upstream 5 s after the last observer goes away. If
the download finishes during those 5 s, the cached value is the last running percent, and
the next observer gets it right away. The progress block is shown again for a download that
has already finished. A cold `Flow` collected with `repeatOnLifecycle` asks WorkManager again
on every start and only gets the current state. Use `collectWhenStarted` from Java instead
of `LiveData`.
## Progress disappears when the work finishes
`WorkInfo.progress` is empty as soon as the state leaves `RUNNING`. Do not read progress
from `SUCCEEDED`/`FAILED` infos, and do not treat the missing key as `0`. Use `mapNotNull`
and let the existing "finished" path (broadcast, `updateFileDetails(false, true)`) hide the
UI, as it did before. Put final values in `Result.success(outputData)` if the UI needs them.
## Every `setProgress` is a database write
WorkManager persists progress. Calling it on every transfer chunk writes to the database
hundreds of times per file. Publish only on change and inside the worker's existing
throttle (`minProgressUpdateInterval`).
## Unique work name vs tag
`getWorkInfosForUniqueWorkFlow(name)` matches the `enqueueUniqueWork` name.
`getWorkInfosByTagFlow(tag)` matches `addTag`. In `startFileDownloadJob` the same string
is used for both, but that is not true for every job. Check the enqueue call. Never build the
string by hand in the ViewModel. Make the builder public in the
`BackgroundJobManagerImpl` companion.
## The bus was global; the Flow is not
`FileDownloadProgressEvent` reached `FileDetailFragment` for **any** running download, so
the details of file A could show the progress of file B. The ViewModel is keyed by
account + file id, so it only reacts to its own file. This is the intended change; mention it
in the PR. Check which worker really runs for each subject: folders are downloaded by
`FolderDownloadWorker`, not `FileDownloadWorker`, and never posted the event.
## The subject can change without a new view
`FileDetailFragment.updateFileDetails(OCFile, User)` swaps the file on a live fragment. Call
`viewModel.observeX(...)` there too. Thanks to `flatMapLatest`, the old work's Flow is
cancelled automatically. Guard with `viewModel != null` because the activity can call it on a
fragment that has not reached `onCreate` yet.
## Missing ViewModel binding
Forgetting `@Binds @IntoMap @ViewModelKey(X::class)` in `ViewModelModule` compiles, but
`ViewModelFactory` throws `IllegalArgumentException` when the screen opens.
## Keep other `@Subscribe` methods registered
`FileDetailFragment` still receives `FavoriteEvent` on `EventBus.getDefault()`. Remove only
the registration for the bus you are replacing. Removing the default registration silently
stops the remaining events. The other way round fails too: if the last `@Subscribe` method
goes away but `register(this)` stays, EventBus throws `EventBusException` ("has no public
methods with the @Subscribe annotation") when the screen starts.
@@ -0,0 +1,126 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
# Templates
## Worker
```kotlin
companion object {
const val PROGRESS_PERCENT = "PROGRESS_PERCENT"
}
// suspend context
setProgress(workDataOf(PROGRESS_PERCENT to percent))
// non-suspend callback, inside the existing throttle
if (percent != lastPercent && (currentTime - lastUpdateTime) >= minProgressUpdateInterval) {
notificationManager.updateDownloadProgress(percent, totalToTransfer)
setProgressAsync(workDataOf(PROGRESS_PERCENT to percent))
lastUpdateTime = currentTime
}
```
## Work name (BackgroundJobManagerImpl companion)
```kotlin
fun formatFileDownloadTag(accountName: String, fileId: Long): String =
JOB_FOLDER_DOWNLOAD + accountName + fileId
```
Use it in `startXJob` (`enqueueUniqueWork(tag, …)`), in `cancelXJob`, and in the ViewModel.
## ViewModel
```kotlin
class FileDetailFragmentViewModel @Inject constructor(private val workManager: WorkManager) : ViewModel() {
private val downloadWorkName = MutableStateFlow<String?>(null)
@OptIn(ExperimentalCoroutinesApi::class)
val downloadProgress: Flow<Int> = downloadWorkName
.filterNotNull()
.flatMapLatest { workManager.getWorkInfosForUniqueWorkFlow(it) }
.mapNotNull { workInfos -> workInfos.firstOrNull { it.state == WorkInfo.State.RUNNING }?.downloadPercent() }
.distinctUntilChanged()
fun observeDownloadProgress(user: User, file: OCFile) {
downloadWorkName.value = BackgroundJobManagerImpl.formatFileDownloadTag(user.accountName, file.fileId)
}
private fun WorkInfo.downloadPercent(): Int? = progress.keyValueMap[FileDownloadWorker.PROGRESS_PERCENT] as? Int
}
```
State-only variant (no progress published), from `FileDisplayActivityViewModel`:
```kotlin
suspend fun observeOfflineWorker(onComplete: () -> Unit) {
workManager
.getWorkInfosByTagFlow(BackgroundJobManagerImpl.formatClassTag(OfflineOperationsWorker::class))
.collect { workInfos ->
if (workInfos.any { it.state == WorkInfo.State.SUCCEEDED }) {
onComplete()
}
}
}
```
Prefer exposing a `Flow` property over a `suspend fun` with a callback: the consumer decides
the lifecycle, and Java can collect it through `collectWhenStarted`.
## DI (`di/ViewModelModule.kt`)
```kotlin
@Binds
@IntoMap
@ViewModelKey(FileDetailFragmentViewModel::class)
abstract fun fileDetailFragmentViewModel(vm: FileDetailFragmentViewModel): ViewModel
```
## Kotlin consumer (fragment)
```kotlin
@Inject lateinit var vmFactory: ViewModelFactory
private val viewModel by viewModels<FileDetailFragmentViewModel> { vmFactory }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
viewModel.observeDownloadProgress(user, file)
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
viewModel.downloadProgress.collect(::onDownloadProgress)
}
}
}
```
## Java consumer (fragment)
```java
@Inject ViewModelFactory vmFactory;
private FileDetailFragmentViewModel viewModel;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewModel = new ViewModelProvider(this, vmFactory).get(FileDetailFragmentViewModel.class);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
viewModel.observeDownloadProgress(user, getFile());
LifecycleOwnerExtensionsKt.collectWhenStarted(getViewLifecycleOwner(),
viewModel.getDownloadProgress(),
this::onDownloadProgress);
}
private void onDownloadProgress(int percent) { … }
```
`collectWhenStarted` (`utils/extensions/LifecycleOwnerExtensions.kt`) wraps
`lifecycleScope.launch { repeatOnLifecycle(STARTED) { flow.collect(collector::accept) } }`
and takes an `androidx.core.util.Consumer`, so a Java method reference fits.
-5
View File
@@ -1,5 +0,0 @@
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
exclude_paths:
- "app/src/main/cpp/**"
+1 -1
View File
@@ -1,4 +1,4 @@
FROM ubuntu:resolute@sha256:da6fc2be547864451aa253836dd926da33623312df4a9a243e35dc877c378a78
FROM ubuntu:resolute@sha256:6a06111c3b0a8600feadb270aec771dc239bf407b25625f93f44ab00e11f4d3c
ARG DEBIAN_FRONTEND=noninteractive
ENV ANDROID_HOME=/usr/lib/android-sdk
+3 -3
View File
@@ -26,7 +26,7 @@ concurrency:
jobs:
analysis:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-max
steps:
- name: Disabled on forks
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
@@ -57,7 +57,7 @@ jobs:
repository: ${{ steps.get-vars.outputs.repo }}
ref: ${{ steps.get-vars.outputs.branch }}
- name: Set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 25
@@ -70,7 +70,7 @@ jobs:
run: |
mkdir -p "$HOME/.gradle"
{
echo "org.gradle.jvmargs=-Xmx1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
echo "org.gradle.configureondemand=true"
} > "$HOME/.gradle/gradle.properties"
scripts/analysis/analysis-wrapper.sh "${{ steps.get-vars.outputs.branch }}" "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" "$GITHUB_RUN_NUMBER" "${{ steps.get-vars.outputs.pr }}"
+3 -3
View File
@@ -33,13 +33,13 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 21
- uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- uses: gradle/actions/wrapper-validation@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
- name: Build ${{ matrix.flavor }}
run: |
{
+2 -2
View File
@@ -26,11 +26,11 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
- name: Check ${{ matrix.task }}
run: ./gradlew ${{ matrix.task }}
+10 -4
View File
@@ -1,6 +1,7 @@
# synced from @nextcloud/android-config
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
# SPDX-FileCopyrightText: 2023-2024 Andy Scherzinger <[email protected]>
# SPDX-FileCopyrightText: 2022 Tobias Kaminsky <[email protected]>
# SPDX-FileCopyrightText: 2022 Álvaro Brey <[email protected]>
@@ -20,10 +21,15 @@ on:
permissions:
contents: read
concurrency:
group: codeql-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-latest-max
timeout-minutes: 90
permissions:
actions: read
contents: read
@@ -43,11 +49,11 @@ jobs:
with:
swap-size-gb: 10
- name: Initialize CodeQL
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
uses: github/codeql-action/init@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
with:
languages: ${{ matrix.language }}
- name: Set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 25
@@ -57,4 +63,4 @@ jobs:
echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
./gradlew --no-daemon assembleDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
uses: github/codeql-action/analyze@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
+2 -2
View File
@@ -17,12 +17,12 @@ concurrency:
jobs:
detectWrongSettings:
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 21
+6 -10
View File
@@ -17,7 +17,7 @@ concurrency:
jobs:
test:
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
services:
server:
image: ${{ matrix.server == 'stable22' && 'ghcr.io/nextcloud/continuous-integration-shallow-server-php8.0:1' || 'ghcr.io/nextcloud/continuous-integration-shallow-server-php8.3:latest' }}
@@ -34,7 +34,7 @@ jobs:
- name: configure server
run: |
sudo apt-get update && sudo apt-get install unzip cpu-checker qemu-kvm --yes
sudo apt-get update && sudo apt-get install unzip cpu-checker qemu-system-x86 --yes
sudo chmod 666 /dev/kvm
docker cp .github/workflows/configServer.sh server:/tmp/
docker exec server chmod +x /tmp/configServer.sh
@@ -45,17 +45,11 @@ jobs:
docker exec server /usr/local/bin/run.sh
- name: set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 21
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Configure gradle daemon
run: |
mkdir -p $HOME/.gradle
@@ -86,6 +80,8 @@ jobs:
force-avd-creation: false
arch: x86_64
sdcard-path-or-size: 100M
ram-size: 4096M
heap-size: 512M
target: google_apis
emulator-options: -no-metrics -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
script: scripts/runCombinedTest.sh ${{github.event.number}} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} ${{github.event.number}} ${{ matrix.server }}
@@ -99,7 +95,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} ${{ matrix.server }} "IT" ${{github.event.number}}
- name: Archive Espresso results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: Report-${{ matrix.server }}-${{ matrix.api-level }}
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
- uses: nextcloud/pr-feedback-action@4709fa5b3e1821559d4c312ef937b61f1567aa44 # main
- uses: nextcloud/pr-feedback-action@4738cf661995d96df3512409ec17c900a4081d33 # main
with:
feedback-message: |
Hello there,
+3 -3
View File
@@ -18,7 +18,7 @@ concurrency:
jobs:
qa:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-max
steps:
- name: Check if secrets are available
run: echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT"
@@ -31,11 +31,11 @@ jobs:
persist-credentials: false
- name: set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
with:
distribution: "temurin"
java-version: 21
java-version: 25
- name: Build QA
id: build-qa
+2 -2
View File
@@ -34,7 +34,7 @@ jobs:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
@@ -42,6 +42,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
uses: github/codeql-action/upload-sarif@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
with:
sarif_file: results.sarif
+3 -3
View File
@@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 21
@@ -37,7 +37,7 @@ jobs:
run: scripts/deleteOldComments.sh "test" "Unit" ${{github.event.number}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
- name: Run unit tests with coverage
run: ./gradlew jacocoTestGplayDebugUnitTest
@@ -58,7 +58,7 @@ jobs:
- name: Upload jacoco artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: test-results
path: app/build/reports/jacoco/jacocoTestGplayDebugUnitTestReport/html/
+1
View File
@@ -60,6 +60,7 @@ build
/gradle.properties
.attach_pid*
fastlane/Fastfile
fastlane/ruby
*.hprof
# NDK / C++
+63
View File
@@ -0,0 +1,63 @@
kotlin version: 2.3.0
error message: Daemon compilation failed: Connection to the Kotlin daemon has been unexpectedly lost. This might be caused by the daemon being killed by another process or the operating system, or by JVM crash.
org.jetbrains.kotlin.gradle.tasks.DaemonCrashedException: Connection to the Kotlin daemon has been unexpectedly lost. This might be caused by the daemon being killed by another process or the operating system, or by JVM crash.
at org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.wrapCompilationExceptionIfNeeded(tasksUtils.kt:54)
at org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.wrapAndRethrowCompilationException(tasksUtils.kt:65)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:227)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:143)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:107)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:75)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:68)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:64)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:61)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:102)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:61)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:58)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:176)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169)
at org.gradle.internal.Factories$1.create(Factories.java:30)
at org.gradle.internal.work.DefaultWorkerLeaseService.lambda$withLocksAcquired$0(DefaultWorkerLeaseService.java:269)
at org.gradle.internal.work.ResourceLockStatistics$1.measure(ResourceLockStatistics.java:42)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocksAcquired(DefaultWorkerLeaseService.java:267)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:259)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:255)
at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:166)
at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:215)
at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:160)
at jdk.proxy4/jdk.proxy4.$Proxy184.compile(Unknown Source)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.incrementalCompilationWithDaemon(GradleKotlinCompilerWork.kt:312)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:219)
... 40 more
Caused by: java.io.EOFException
at java.base/java.io.DataInputStream.readUnsignedByte(DataInputStream.java:297)
at java.base/java.io.DataInputStream.readByte(DataInputStream.java:275)
at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:241)
... 46 more
+18
View File
@@ -37,6 +37,14 @@ Java, Kotlin, XML, Jetpack Compose are the key technologies used for building th
Project-specific skills live in `./.claude/skills/<skill-name>/`. Load a skill when the task matches its trigger.
- **`android-java-to-kotlin`** (`./.claude/skills/android-java-to-kotlin/SKILL.md`) — Completes a Java-to-Kotlin conversion in this Android app. Use it when finishing a conversion, when the user mentions "java to kotlin", "j2k", "convert java", or "make it idiomatic", or when a freshly IDE-converted `.kt` file needs cleanup. The workflow is two-person: the developer first runs the Android Studio converter (`Code > Convert Java File to Kotlin File`), then the agent drives the idiomatic second pass — fail-fast control flow, function decomposition, `lifecycleScope`/coroutines instead of Java threads, modern Android APIs, and project conventions (SPDX headers, no magic numbers, `@JvmStatic`). The conversion must preserve behaviour, and the agent must write a behaviour-locking test before declaring it done.
- **`android-activity-to-navigator-fragment`** (`./.claude/skills/android-activity-to-navigator-fragment/SKILL.md`) — Converts a standalone Activity (typically a drawer destination) into a Fragment hosted by `NavigatorActivity`. Use it when the user mentions "navigator", `NavigatorActivity`, `NavigatorScreen`, or "convert activity to fragment". It covers registering the `NavigatorScreen`, the fragment and its layout, decoupling collaborators from `FileActivity`, rewiring every entry point with `NavigatorActivity.intent(...)`, DI and manifest cleanup, and migrating the screenshot test.
- **`android-eventbus-to-workmanager-flow`** (`./.claude/skills/android-eventbus-to-workmanager-flow/SKILL.md`) — Replaces an EventBus event posted by a WorkManager worker with WorkManager observation through a ViewModel `Flow`. Use it when the user mentions "event bus", `EventBusFactory`, `@Subscribe`, "worker progress", or "observe worker". It covers publishing with `setProgress`, a ViewModel keyed by the unique work name, `ViewModelModule` registration, collecting from Kotlin or Java (`collectWhenStarted`) and deleting the event. The live example is `FileDetailFragmentViewModel`.
### Android Skills
Agent skills for Android development at https://github.com/android/skills (overview: https://developer.android.com/tools/agents/android-skills). Use them when a task matches their trigger and no project-specific skill above covers it. Install one with the Android CLI (`android skills add <skill-name>`) or read its `SKILL.md` directly from the repository. Project-specific skills and the rules in this file take precedence over the official skills.
- **`r8-analyzer`** (https://github.com/android/skills/tree/main/performance/r8-analyzer) — Analyzes the R8 configuration and keep rules for redundant, overly broad, or library-subsumed rules. Use it when changing the keep rules in `app/src/main/keepRules/` or the `optimization {}` blocks in `app/build.gradle.kts`.
## General Guidance
@@ -95,6 +103,16 @@ Use `StateFlow` and `MutableStateFlow` in ViewModels for state management. Colle
Uses Dagger 2 for major Android components (`Activity`, `Fragment`, `Service`, `BroadcastReceiver`, `ContentProvider`). Manual constructor injection for other components.
### Network Clients
Get `OwnCloudClient` and `NextcloudClient` instances from `ClientRepository` (`com.nextcloud.repository`), never from `ClientFactory`.
`ClientFactory` is deprecated and being phased out; do not add new usages of it, and replace it with `ClientRepository` when touching code that still uses it.
- Inject `ClientRepository` with Dagger (`@Inject lateinit var clientRepository: ClientRepository`); it is bound to `RemoteClientRepository`, which resolves the current user via `UserAccountManager` on every call.
- Activities extending `BaseActivity` already expose it via `getClientRepository()`.
- Prefer the `suspend` functions `getOwncloudClient()` / `getNextcloudClient()` from a lifecycle-aware scope (`lifecycleScope`, `viewModelScope`); they switch to `Dispatchers.IO` and return `null` on failure, so handle `null` instead of catching exceptions.
- Do not construct `RemoteClientRepository` manually.
### Extension Functions
The `com.nextcloud.utils.extensions` package contains helper extensions organized by type (e.g., `FileExtensions.kt`, `StringExtensions.kt`, `ViewExtensions.kt`). Create focused extension files rather than putting multiple types in one file.
+3 -6
View File
@@ -1,10 +1,7 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
source "https://rubygems.org"
gem 'fastlane'
gem "fastlane"
gem "abbrev"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
plugins_path = File.join(File.dirname(__FILE__), '.', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
+32 -28
View File
@@ -8,7 +8,7 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1287.0)
aws-partitions (1.1290.0)
aws-sdk-core (3.257.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
@@ -21,7 +21,7 @@ GEM
aws-sdk-kms (1.132.0)
aws-sdk-core (~> 3, >= 3.256.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.232.0)
aws-sdk-s3 (1.232.2)
aws-sdk-core (~> 3, >= 3.256.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
@@ -30,8 +30,8 @@ GEM
babosa (1.0.4)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (3.3.1)
cgi (0.4.2)
bigdecimal (4.1.3)
cgi (0.5.2)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
@@ -41,11 +41,12 @@ GEM
declarative (0.0.20)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20260907)
domain_name (0.6.20260921)
dotenv (2.8.1)
emoji_regex (3.2.3)
erb (6.0.7)
excon (0.112.0)
excon (1.7.1)
logger
faraday (2.14.4)
faraday-net_http (>= 2.0, < 3.5)
json
@@ -57,7 +58,8 @@ GEM
faraday (>= 1, < 3)
faraday-multipart (1.2.0)
multipart-post (~> 2.0)
faraday-net_http (2.1.0)
faraday-net_http (3.4.4)
net-http (~> 0.5)
faraday-retry (2.4.0)
faraday (~> 2.0)
fastimage (2.4.1)
@@ -115,25 +117,24 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-huawei_appgallery_connect (1.0.31)
cgi
fastlane-sirp (1.1.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.108.0)
google-apis-androidpublisher_v3 (0.109.0)
google-apis-core (>= 0.15.0, < 2.a)
google-apis-core (0.18.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 1.9)
httpclient (>= 2.8.3, < 3.a)
mini_mime (~> 1.0)
mutex_m
google-apis-core (1.2.5)
addressable (~> 2.9)
faraday (~> 2.13)
faraday-follow_redirects (~> 0.3)
googleauth (~> 1.14)
mini_mime (~> 1.1)
multi_json (~> 1.11)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
retriable (>= 3.1, < 5.0)
google-apis-iamcredentials_v1 (0.28.0)
google-apis-core (>= 0.15.0, < 2.a)
google-apis-playcustomapp_v1 (0.18.0)
google-apis-core (>= 0.15.0, < 2.a)
google-apis-storage_v1 (0.67.0)
google-apis-storage_v1 (0.68.0)
google-apis-core (>= 0.15.0, < 2.a)
google-cloud-core (1.9.0)
google-cloud-env (>= 1.0, < 3.a)
@@ -163,9 +164,7 @@ GEM
highline (2.0.3)
http-cookie (1.1.6)
domain_name (~> 0.5)
httpclient (2.9.0)
mutex_m
io-console (0.9.3)
io-console (0.9.4)
irb (1.18.0)
pp (>= 0.6.0)
prism (>= 1.3.0)
@@ -173,7 +172,7 @@ GEM
reline (>= 0.4.2)
jmespath (1.6.2)
json (2.21.2)
jwt (2.10.3)
jwt (3.3.0)
base64
logger (1.7.0)
mini_magick (4.13.2)
@@ -183,6 +182,8 @@ GEM
mutex_m (0.3.0)
nanaimo (0.4.0)
naturally (2.3.0)
net-http (0.9.1)
uri (>= 0.11.1)
nkf (0.3.0)
optparse (0.8.1)
os (1.1.4)
@@ -193,7 +194,7 @@ GEM
prettyprint (0.2.0)
prism (1.9.0)
pstore (0.2.1)
public_suffix (6.0.2)
public_suffix (7.0.5)
rake (13.4.2)
rbs (4.2.0)
logger
@@ -206,14 +207,14 @@ GEM
tsort
reline (0.7.0)
io-console (~> 0.5)
representable (3.2.0)
representable (3.3.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.8.0)
retriable (4.2.0)
rexml (3.4.4)
rouge (3.28.0)
rubyzip (3.6.0)
rubyzip (3.7.0)
security (0.3.0)
signet (0.22.0)
addressable (~> 2.8)
@@ -232,7 +233,10 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.6.0)
unicode-display_width (3.3.0)
unicode-emoji (~> 4.3)
unicode-emoji (4.3.0)
uri (1.1.1)
word_wrap (1.0.0)
xcodeproj (1.28.1)
CFPropertyList (>= 2.3.3, < 4.0)
@@ -252,8 +256,8 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
abbrev
fastlane
fastlane-plugin-huawei_appgallery_connect
BUNDLED WITH
2.5.4
+1 -1
View File
@@ -4,7 +4,7 @@
-->
# [Nextcloud](https://nextcloud.com) Android app :iphone:
[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/android)](https://api.reuse.software/info/github.com/nextcloud/android) [![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/android/status.svg)](https://drone.nextcloud.com/nextcloud/android) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/fb4cf26336774ee3a5c9adfe829c41aa)](https://app.codacy.com/gh/nextcloud/android/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Releases](https://img.shields.io/github/release/nextcloud/android.svg)](https://github.com/nextcloud/android/releases/latest)
[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/android)](https://api.reuse.software/info/github.com/nextcloud/android) [![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/android/status.svg)](https://drone.nextcloud.com/nextcloud/android) [![Releases](https://img.shields.io/github/release/nextcloud/android.svg)](https://github.com/nextcloud/android/releases/latest)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"
alt="Download from Google Play"
-1
View File
@@ -6,7 +6,6 @@
[![حالة REUSE](https://api.reuse.software/badge/github.com/nextcloud/android)](https://api.reuse.software/info/github.com/nextcloud/android)
[![حالة البناء](https://drone.nextcloud.com/api/badges/nextcloud/android/status.svg)](https://drone.nextcloud.com/nextcloud/android)
[![تقييم Codacy](https://app.codacy.com/project/badge/Grade/fb4cf26336774ee3a5c9adfe829c41aa)](https://app.codacy.com/gh/nextcloud/android/dashboard)
[![الإصدارات](https://img.shields.io/github/release/nextcloud/android.svg)](https://github.com/nextcloud/android/releases/latest)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="تحميل من Google Play" height="80">](https://play.google.com/store/apps/details?id=com.nextcloud.client)
+26 -42
View File
@@ -13,13 +13,17 @@ import com.github.spotbugs.snom.SpotBugsTask
import com.karumi.shot.ShotExtension
import org.gradle.internal.jvm.Jvm
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.FileInputStream
import java.util.Properties
val shotTest = System.getenv("SHOT_TEST") == "true"
val ciBuild = System.getenv("CI") == "true"
val perfAnalysis = project.hasProperty("perfAnalysis")
val allAbis = listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
val localDebugAbis = when (System.getProperty("os.arch")) {
"aarch64", "arm64" -> listOf("arm64-v8a")
else -> listOf("arm64-v8a", "x86_64")
}
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
@@ -68,12 +72,6 @@ configurations.configureEach {
}
}
// semantic versioning for version code
val versionMajor = 35
val versionMinor = 1
val versionPatch = 0
val versionBuild = 50 // 0-50=Alpha / 51-98=RC / 90-99=stable
val ndkEnv = buildMap {
file("${project.rootDir}/ndk.env").readLines().forEach {
val (key, value) = it.split("=")
@@ -81,14 +79,9 @@ val ndkEnv = buildMap {
}
}
val configProps = Properties().apply {
val file = rootProject.file("gradle.properties")
if (file.exists()) load(FileInputStream(file))
}
val ncTestServerUsername = configProps["NC_TEST_SERVER_USERNAME"]
val ncTestServerPassword = configProps["NC_TEST_SERVER_PASSWORD"]
val ncTestServerBaseUrl = configProps["NC_TEST_SERVER_BASEURL"]
val ncTestServerUsername = providers.gradleProperty("NC_TEST_SERVER_USERNAME").get()
val ncTestServerPassword = providers.gradleProperty("NC_TEST_SERVER_PASSWORD").get()
val ncTestServerBaseUrl = providers.gradleProperty("NC_TEST_SERVER_BASEURL").get()
android {
// install this NDK version and CMake to produce smaller APKs. Build will still work if not installed
@@ -114,12 +107,12 @@ android {
)
applicationId = "com.nextcloud.client"
minSdk = 28
targetSdk = 36
compileSdk = 37
ndk {
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
}
targetSdk = 36
// mayor.minor.hotfix.increment (for increment: 01-50=Alpha / 51-89=RC / 90-99=stable)
// xx .xxx .xx .xx
versionCode = 350010050
versionName = "35.1.0 Alpha 51"
buildConfigField("boolean", "CI", ciBuild.toString())
buildConfigField("boolean", "RUNTIME_PERF_ANALYSIS", perfAnalysis.toString())
@@ -128,13 +121,6 @@ android {
testInstrumentationRunner = if (shotTest) "com.karumi.shot.ShotTestRunner"
else "com.nextcloud.client.TestRunner"
versionCode = versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
versionName = when {
versionBuild > 89 -> "${versionMajor}.${versionMinor}.${versionPatch}"
versionBuild > 50 -> "${versionMajor}.${versionMinor}.${versionPatch} RC" + (versionBuild - 50)
else -> "${versionMajor}.${versionMinor}.${versionPatch} Alpha" + (versionBuild + 1)
}
// adapt structure from Eclipse to Gradle/Android Studio expectations;
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
@@ -142,13 +128,21 @@ android {
buildTypes {
release {
optimization {
enable = true
}
buildConfigField("String", "NC_TEST_SERVER_DATA_STRING", "\"\"")
ndk {
abiFilters += allAbis
}
}
debug {
enableUnitTestCoverage = project.hasProperty("coverage")
enableAndroidTestCoverage = project.hasProperty("coverage")
resConfigs("xxxhdpi")
ndk {
abiFilters += if (ciBuild) allAbis else localDebugAbis
}
}
}
@@ -172,8 +166,8 @@ android {
register("versionDev") {
applicationId = "com.nextcloud.android.beta"
dimension = "default"
versionCode = 20220322
versionName = "20220322"
versionCode = 20261107
versionName = "20261107"
}
register("qa") {
@@ -199,7 +193,6 @@ android {
buildFeatures {
buildConfig = true
dataBinding = true
viewBinding = true
aidl = true
compose = true
@@ -324,10 +317,7 @@ tasks.withType<SpotBugsTask>().configureEach {
}
}
// Run the compiler as a separate process
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
// Enable Incremental Compilation
options.isIncremental = true
}
@@ -409,6 +399,7 @@ dependencies {
// region Lifecycle
implementation(libs.lifecycle.viewmodel.ktx)
implementation(libs.lifecycle.process)
implementation(libs.lifecycle.service)
implementation(libs.lifecycle.runtime.ktx)
// endregion
@@ -426,7 +417,6 @@ dependencies {
testImplementation(libs.kotlinx.coroutines.test)
// region other libraries
compileOnly(libs.org.jbundle.util.osgi.wrapped.org.apache.http.client)
implementation(libs.commons.httpclient.commons.httpclient) // remove after entire switch to lib v2
implementation(libs.jackrabbit.webdav) // remove after entire switch to lib v2
implementation(libs.constraintlayout)
@@ -438,14 +428,12 @@ dependencies {
implementation(libs.commons.io)
implementation(libs.eventbus)
implementation(libs.ez.vcard)
implementation(libs.nnio)
implementation(libs.bcpkix.jdk18on)
implementation(libs.gson)
implementation(libs.sectioned.recyclerview)
implementation(libs.photoview)
implementation(libs.android.gif.drawable)
implementation(libs.qrcodescanner) // "com.github.blikoon:QRCodeScanner:0.1.2"
implementation(libs.flexbox)
implementation(libs.androidsvg)
implementation(libs.annotation)
implementation(libs.emoji.google)
@@ -529,10 +517,6 @@ dependencies {
implementation(libs.kotlinx.coroutines.core)
// endregion
// region Stateless
implementation(libs.stateless4j)
// endregion
// region Google Play dependencies, upon each update first test: new registration, receive push
add(gplayImplementationConfiguration, libs.bundles.gplay)
// endregion
+10 -10
View File
@@ -53,9 +53,9 @@ complexity:
active: false
threshold: 10
includeStaticDeclarations: false
ComplexMethod:
CyclomaticComplexMethod:
active: true
threshold: 10
threshold: 15
ignoreSingleWhenExpression: false
ignoreSimpleWhenEntries: false
excludes: ['**/androidTest/**']
@@ -67,10 +67,10 @@ complexity:
threshold: 600
LongMethod:
active: true
threshold: 60
threshold: 120
excludes: ['**/androidTest/**']
LongParameterList:
active: true
active: false
functionThreshold: 7
constructorThreshold: 6
ignoreDefaultParameters: false
@@ -87,7 +87,7 @@ complexity:
excludeStringsWithLessThan5Characters: true
ignoreStringsRegex: '$^'
TooManyFunctions:
active: true
active: false
thresholdInFiles: 15
thresholdInClasses: 15
thresholdInInterfaces: 15
@@ -158,7 +158,7 @@ exceptions:
ThrowingNewInstanceOfSameException:
active: false
TooGenericExceptionCaught:
active: true
active: false
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
@@ -170,7 +170,7 @@ exceptions:
- Throwable
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
TooGenericExceptionThrown:
active: true
active: false
exceptionNames:
- Error
- Exception
@@ -226,7 +226,7 @@ naming:
active: true
packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$'
TopLevelPropertyNaming:
active: true
active: false
constantPattern: '[A-Z][_A-Z0-9]*'
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
privatePropertyPattern: '(_)?[A-Za-z][A-Za-z0-9]*'
@@ -346,7 +346,7 @@ style:
NestedClassesVisibility:
active: false
NewLineAtEndOfFile:
active: true
active: false
NoTabs:
active: false
OptionalAbstractKeyword:
@@ -362,7 +362,7 @@ style:
RedundantVisibilityModifierRule:
active: false
ReturnCount:
active: true
active: false
max: 2
excludedFunctions: [equals]
excludeLabeled: false
+5 -1
View File
@@ -15,7 +15,6 @@
</issue>
<issue id="InvalidPackage">
<ignore path="**/freemarker-2.*.*.jar" />
<ignore path="**/nnio-0.2.jar"/>
<ignore path="**/bcpkix-jdk15on-1.69.jar" />
</issue>
@@ -91,6 +90,11 @@
<ignore path="**/appcompat-1.**/**/lint.jar" />
</issue>
<!-- Lint reads abiFilters as source text and cannot resolve allAbis; local debug builds skip x86 on purpose. -->
<issue id="ChromeOsAbiSupport">
<ignore path="build.gradle.kts" />
</issue>
<issue id="Aligned16KB">
<ignore path="**/arm64-v8a/libmockkjvmtiagent.so" />
</issue>
@@ -99,7 +99,7 @@ class ActivitiesFragmentIT : AbstractIT() {
fun showActivities() {
val capability = OCCapability()
capability.versionMayor = 20
fileDataStorageManager.saveCapabilities(capability)
storageManager.saveCapabilities(capability)
val date = GregorianCalendar()
date.set(2005, 4, 17, 10, 35, 30)
@@ -8,37 +8,51 @@
*/
package com.nextcloud.client
import android.content.Intent
import android.os.Looper
import android.view.View
import androidx.appcompat.app.AlertDialog
import androidx.test.core.app.launchActivity
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.nextcloud.client.preferences.SubFolderRule
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.datamodel.MediaFolderType
import com.owncloud.android.datamodel.SyncedFolder
import com.owncloud.android.datamodel.SyncedFolderDisplayItem
import com.owncloud.android.ui.activity.SyncedFoldersActivity
import com.owncloud.android.ui.dialog.SyncedFolderPreferencesDialogFragment.Companion.newInstance
import com.owncloud.android.ui.fragment.autoUpload.AutoUploadFragment
import com.owncloud.android.ui.navigation.NavigatorActivity
import com.owncloud.android.ui.navigation.NavigatorScreen
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Test
class SyncedFoldersActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.SyncedFoldersActivityIT"
class AutoUploadFragmentIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.AutoUploadFragmentIT"
private fun findFragment(sut: NavigatorActivity): AutoUploadFragment =
sut.supportFragmentManager.fragments.filterIsInstance<AutoUploadFragment>().firstOrNull()
?: throw IllegalStateException("AutoUploadFragment not found in NavigatorActivity!")
private fun launch(block: (ActivityScenario<NavigatorActivity>) -> Unit) {
val intent = NavigatorActivity.intent(targetContext, NavigatorScreen.AutoUpload)
ActivityScenario.launch<NavigatorActivity>(intent).use(block)
}
@Test
@ScreenshotTest
fun open() {
launchActivity<SyncedFoldersActivity>().use { scenario ->
launch { scenario ->
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
scenario.onActivity { sut ->
sut.adapter.clear()
screenshotViaName(sut.binding.emptyList.emptyListView, screenShotName)
val fragment = findFragment(sut)
fragment.adapter.clear()
val emptyListView = fragment.requireView().findViewById<View>(R.id.empty_list_view)
screenshotViaName(emptyListView, screenShotName)
}
}
}
@@ -67,15 +81,15 @@ class SyncedFoldersActivityIT : AbstractIT() {
SyncedFolder.NOT_SCANNED_YET
)
val intent = Intent(targetContext, SyncedFoldersActivity::class.java)
launchActivity<SyncedFoldersActivity>(intent).use { scenario ->
launch { scenario ->
val screenShotName = createName(testClassName + "_" + "testSyncedFolderDialog", "")
onView(isRoot()).check(matches(isDisplayed()))
scenario.onActivity { sut ->
val fragment = newInstance(item, 0)
fragment!!.show(sut.supportFragmentManager, "")
screenshot(fragment.requireDialog().window?.decorView, screenShotName)
val dialog = newInstance(item, 0) ?: throw IllegalStateException("Dialog could not be created")
dialog.show(findFragment(sut).childFragmentManager, "")
findFragment(sut).childFragmentManager.executePendingTransactions()
screenshot(dialog.requireDialog().window?.decorView, screenShotName)
}
}
}
@@ -87,18 +101,17 @@ class SyncedFoldersActivityIT : AbstractIT() {
Looper.prepare()
}
val intent = Intent(targetContext, SyncedFoldersActivity::class.java)
launchActivity<SyncedFoldersActivity>(intent).use { scenario ->
launch { scenario ->
var dialog: AlertDialog? = null
scenario.onActivity { sut ->
dialog = sut.buildPowerCheckDialog()
sut.showPowerCheckDialog()
val fragment = findFragment(sut)
dialog = fragment.buildPowerCheckDialog()
fragment.showPowerCheckDialog()
}
val screenShotName = createName(testClassName + "_" + "showPowerCheckDialog", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshot(dialog!!.window?.decorView, screenShotName)
screenshot(dialog?.window?.decorView, screenShotName)
}
}
}
@@ -37,7 +37,7 @@ import com.owncloud.android.lib.resources.shares.OCShare
import com.owncloud.android.lib.resources.shares.ShareType
import com.owncloud.android.operations.CreateFolderOperation
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.ui.adapter.OCFileListItemViewHolder
import com.owncloud.android.ui.adapter.filelist.item.OCFileListItemViewHolder
import com.owncloud.android.utils.EspressoIdlingResource
import org.hamcrest.Matchers.allOf
import org.junit.After
@@ -23,6 +23,7 @@ import com.owncloud.android.R
import com.owncloud.android.lib.common.utils.Log_OC
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.ui.fragment.EmptyListState
import com.owncloud.android.ui.fragment.FabState
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Assert
import org.junit.Rule
@@ -48,7 +49,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
scenario.onActivity { sut ->
sut.run {
listOfFilesFragment?.let {
it.setFabEnabled(false)
it.setFabState(FabState.DISABLED)
resetScrolling(true)
it.setEmptyListMessage(EmptyListState.LOADING)
it.isLoading = false
@@ -78,7 +79,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
activity = sut
val fragment = sut.listOfFilesFragment
Assert.assertNotNull(fragment)
fragment!!.setFabEnabled(false)
fragment!!.setFabState(FabState.DISABLED)
fragment.setEmptyListMessage(EmptyListState.LOADING)
fragment.isLoading = false
}
@@ -91,7 +92,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
.perform(NavigationViewActions.navigateTo(R.id.nav_all_files))
val fragment = activity!!.listOfFilesFragment
fragment!!.setFabEnabled(false)
fragment!!.setFabState(FabState.DISABLED)
fragment.setEmptyListMessage(EmptyListState.LOADING)
fragment.isLoading = false
@@ -117,7 +118,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
resetScrolling(true)
listOfFilesFragment?.let {
it.setFabEnabled(false)
it.setFabState(FabState.DISABLED)
it.setEmptyListMessage(EmptyListState.LOADING)
it.isLoading = false
}
@@ -14,7 +14,6 @@ import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.nextcloud.test.GrantStoragePermissionRule.Companion.grant
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.ArbitraryDataProviderImpl
import com.owncloud.android.ui.activity.RequestCredentialsActivity
@@ -22,17 +21,12 @@ import com.owncloud.android.ui.activity.SettingsActivity
import com.owncloud.android.utils.EncryptionUtils
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Assert
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
@Suppress("FunctionNaming")
class SettingsActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.SettingsActivityIT"
@get:Rule
var storagePermissionRule: TestRule = grant()
@Test
@ScreenshotTest
fun open() {
@@ -8,7 +8,7 @@
*/
package com.nextcloud.client
import androidx.test.core.app.launchActivity
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.DrawerActions
@@ -17,17 +17,19 @@ import androidx.test.espresso.matcher.ViewMatchers.isRoot
import androidx.test.espresso.matcher.ViewMatchers.withId
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.ui.activity.UploadListActivity
import com.owncloud.android.ui.navigation.NavigatorActivity
import com.owncloud.android.ui.navigation.NavigatorScreen
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Test
class UploadListActivityActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.UploadListActivityActivityIT"
class UploadListFragmentIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.UploadListFragmentIT"
@Test
@ScreenshotTest
fun openDrawer() {
launchActivity<UploadListActivity>().use { scenario ->
val intent = NavigatorActivity.intent(targetContext, NavigatorScreen.UploadList)
ActivityScenario.launch<NavigatorActivity>(intent).use { scenario ->
onView(isRoot()).check(matches(isDisplayed()))
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
@@ -25,14 +25,14 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
@Before
fun setup() {
sut = AssistantRemoteRepositoryImpl(nextcloudClient, capability)
sut = AssistantRemoteRepositoryImpl(nextcloudClient, getCapability())
}
@Test
fun testGetTaskTypes() {
testOnlyOnServer(NextcloudVersion.nextcloud_28)
if (capability.assistant.isFalse) {
if (getCapability().assistant.isFalse) {
return
}
@@ -46,7 +46,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
fun testGetTaskList() {
testOnlyOnServer(NextcloudVersion.nextcloud_28)
if (capability.assistant.isFalse) {
if (getCapability().assistant.isFalse) {
return
}
@@ -60,7 +60,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
fun testCreateTask() {
testOnlyOnServer(NextcloudVersion.nextcloud_28)
if (capability.assistant.isFalse) {
if (getCapability().assistant.isFalse) {
return
}
@@ -83,7 +83,7 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
fun testDeleteTask() {
testOnlyOnServer(NextcloudVersion.nextcloud_28)
if (capability.assistant.isFalse) {
if (getCapability().assistant.isFalse) {
return
}
@@ -101,7 +101,7 @@ class ContactsBackupIT : AbstractOnServerIT() {
fail("folderPath cannot be empty")
}
val folder = fileDataStorageManager.getFileByDecryptedRemotePath(folderPath)
val folder = storageManager.getFileByDecryptedRemotePath(folderPath)
if (folder == null) {
fail("folder cannot be null")
}
@@ -16,7 +16,6 @@ import java.util.TreeMap
*
* The implementation is not thread-safe.
*/
@Suppress("TooManyFunctions")
class MockSharedPreferences : SharedPreferences {
class MockEditor(val store: MutableMap<String?, Any?>) : SharedPreferences.Editor {
@@ -1,141 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Your Name <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.network
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.Response
import at.bitfire.dav4jvm.property.DisplayName
import at.bitfire.dav4jvm.property.ResourceType
import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
import com.nextcloud.android.lib.resources.users.UserApi
import com.nextcloud.common.OkHttpMethodBase
import com.owncloud.android.AbstractIT.nextcloudClient
import com.owncloud.android.AbstractOnServerIT
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory
import com.owncloud.android.lib.common.operations.RemoteOperation
import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation
import kotlinx.coroutines.runBlocking
import kotlinx.serialization.json.Json
import okhttp3.Credentials
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertThrows
import org.junit.Assert.assertTrue
import org.junit.Test
import retrofit2.HttpException
import retrofit2.Retrofit
import java.net.HttpURLConnection
/**
* Showcases Retrofit (OCS/JSON) and dav4jvm (WebDAV) side by side. Both reuse the OkHttpClient of
* [nextcloudClient], so TLS, proxy and client-certificate handling stay identical to the existing
* `RemoteOperation`s.
*/
class RetrofitAndDav4jvmIT : AbstractOnServerIT() {
@Test
fun retrofitFetchesSameUserAsRemoteOperation() {
val userApi = buildRetrofit().create(UserApi::class.java)
val response = userApi.getUser(FORMAT_JSON).execute()
assertTrue("HTTP ${response.code()}", response.isSuccessful)
val user = response.body()?.ocs?.data
assertNotNull(user)
val legacyResult = GetUserInfoRemoteOperation().execute(nextcloudClient)
assertTrue(legacyResult.isSuccess)
assertEquals(legacyResult.resultData.id, user?.id)
assertEquals(legacyResult.resultData.displayName, user?.displayName)
}
@Test
fun retrofitSuspendFunctionReturnsBodyOrThrowsHttpException() {
val userApi = buildRetrofit().create(UserApi::class.java)
val unauthorizedApi = buildRetrofit(Credentials.basic(INVALID_LOGIN, INVALID_LOGIN)).create(UserApi::class.java)
// suspend functions run the call on OkHttp's dispatcher, so no Dispatchers.IO switch is needed
val user = runBlocking { userApi.fetchUser(FORMAT_JSON).ocs.data }
val error = assertThrows(HttpException::class.java) {
runBlocking { unauthorizedApi.fetchUser(FORMAT_JSON) }
}
assertEquals(nextcloudClient.userId, user.id)
assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, error.code())
}
@Test
fun dav4jvmMkColThenPropfindRootListsFolder() {
val davHttpClient = buildDavOkHttpClient()
val rootUrl = "${nextcloudClient.filesDavUri}/".toHttpUrl()
val root = DavResource(davHttpClient, rootUrl)
val folder = DavResource(davHttpClient, "$rootUrl$FOLDER_NAME/".toHttpUrl())
folder.mkCol(xmlBody = null) { }
val responses = mutableListOf<Pair<Response, Response.HrefRelation>>()
root.propfind(DEPTH_ONE, DisplayName.NAME, ResourceType.NAME) { response, relation ->
responses += response to relation
}
val self = responses.firstOrNull { (_, relation) -> relation == Response.HrefRelation.SELF }?.first
val members = responses.filter { (_, relation) -> relation == Response.HrefRelation.MEMBER }.map { it.first }
assertTrue(self?.get(ResourceType::class.java)?.types?.contains(ResourceType.COLLECTION) == true)
val created = members.firstOrNull { it.hrefName() == FOLDER_NAME }
assertNotNull("$FOLDER_NAME missing in PROPFIND result", created)
assertTrue(created?.get(ResourceType::class.java)?.types?.contains(ResourceType.COLLECTION) == true)
}
private fun buildRetrofit(credentials: String = nextcloudClient.credentials): Retrofit = Retrofit
.Builder()
.baseUrl("${nextcloudClient.baseUri}/")
.client(authenticatedOkHttpClient(credentials))
.addConverterFactory(json.asConverterFactory(JSON_MEDIA_TYPE.toMediaType()))
.build()
private fun authenticatedOkHttpClient(credentials: String): OkHttpClient = nextcloudClient.client
.newBuilder()
.addInterceptor { chain ->
val request =
chain
.request()
.newBuilder()
.header(OkHttpMethodBase.AUTHORIZATION, credentials)
.header(OkHttpMethodBase.USER_AGENT, OwnCloudClientManagerFactory.getUserAgent())
.header(RemoteOperation.OCS_API_HEADER, RemoteOperation.OCS_API_HEADER_VALUE)
.build()
chain.proceed(request)
}.build()
// dav4jvm handles redirects itself and requires the underlying client not to follow them
private fun buildDavOkHttpClient(): OkHttpClient = nextcloudClient.client
.newBuilder()
.followRedirects(false)
.addInterceptor { chain ->
val request =
chain
.request()
.newBuilder()
.header(OkHttpMethodBase.AUTHORIZATION, nextcloudClient.credentials)
.header(OkHttpMethodBase.USER_AGENT, OwnCloudClientManagerFactory.getUserAgent())
.build()
chain.proceed(request)
}.build()
companion object {
private const val FORMAT_JSON = "json"
private const val JSON_MEDIA_TYPE = "application/json"
private const val FOLDER_NAME = "files-dav4jvmShowcase"
private const val DEPTH_ONE = 1
private const val INVALID_LOGIN = "invalid"
private val json = Json { ignoreUnknownKeys = true }
}
}
@@ -0,0 +1,138 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Daniele Verducci <[email protected]>
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.extensions
import android.graphics.Bitmap
import com.nextcloud.utils.extensions.areImageDimensionsSame
import com.owncloud.android.lib.resources.files.model.ImageDimension
import com.owncloud.android.lib.resources.files.model.RemoteFile
import org.junit.After
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import java.io.File
import java.io.OutputStream
import java.nio.file.Files
import java.nio.file.Path
import kotlin.io.path.exists
class RemoteFileExtensionsImageTest {
private lateinit var tempDir: Path
private val remoteFileWithDimensions = RemoteFile().apply {
mimeType = "image/jpeg"
imageDimension = ImageDimension(IMAGE_WIDTH.toFloat(), IMAGE_HEIGHT.toFloat())
}
private val remoteFileWithoutDimensions = RemoteFile().apply {
mimeType = "image/jpeg"
imageDimension = null
}
@Test
fun testAreImageDimensionsSameWhenLocalFileIsNotImage_ShouldReturnTrue() {
// local not an image
assertTrue(
"comparing with non-image",
remoteFileWithDimensions.areImageDimensionsSame(getPath(TEXT_FILENAME).toString())
)
}
@Test
fun testAreImageDimensionsSame_ShouldReturnTrue() {
// same dimensions
assertTrue(
"comparing with same-size image",
remoteFileWithDimensions.areImageDimensionsSame(getPath(IMAGE_FILENAME).toString())
)
}
@Test
fun testAreImageDimensionsSame_ShouldReturnFalse() {
// different dimensions
val biggerRemoteImage = RemoteFile().apply {
mimeType = "image/jpeg"
imageDimension = ImageDimension((IMAGE_WIDTH * 2).toFloat(), IMAGE_HEIGHT.toFloat())
}
assertFalse(
"comparing with different-size image",
biggerRemoteImage.areImageDimensionsSame(getPath(IMAGE_FILENAME).toString())
)
}
@Test
fun testAreImageDimensionsSameWhenLocalFileHasNoDimensions_ShouldReturnTrue() {
// local file with null dimensions
assertTrue(
"comparing null-dimensions local file with valid remote file",
remoteFileWithoutDimensions.areImageDimensionsSame(getPath(TEXT_FILENAME).toString())
)
}
@Test
fun testAreImageDimensionsSameWhenRemoteFileHasNoDimensions_ShouldReturnTrue() {
// remote file with null dimensions
assertTrue(
"comparing with null-dimensions remote file",
remoteFileWithoutDimensions.areImageDimensionsSame(getPath(IMAGE_FILENAME).toString())
)
}
@Test
fun testAreImageDimensionsSameWhenBothFilesHaveNoDimensions_ShouldReturnTrue() {
// both files with null dimensions
assertTrue(
"comparing null-dimensions local file with null-dimensions remote file",
remoteFileWithoutDimensions.areImageDimensionsSame(getPath(TEXT_FILENAME).toString())
)
}
@After
fun cleanup() {
val tf = File(getPath(TEXT_FILENAME).toUri())
val imgf = File(getPath(IMAGE_FILENAME).toUri())
tf.delete()
imgf.delete()
}
@Before
fun setup() {
tempDir = Files.createTempDirectory(TMP_DIR)
assertTrue("Temp directory should exist", tempDir.exists())
createImageFile()
createTextFile()
}
private fun getPath(filename: String): Path = tempDir.resolve("test_$filename")
private fun createImageFile() {
val bitmap = Bitmap.createBitmap(IMAGE_WIDTH, IMAGE_HEIGHT, Bitmap.Config.ARGB_8888)
val imagePath = getPath(IMAGE_FILENAME)
Files.newOutputStream(imagePath).use { out: OutputStream ->
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out)
}
assertTrue(imagePath.exists())
}
private fun createTextFile() {
val f = File(getPath(TEXT_FILENAME).toUri())
f.writeText("Lorem ipsum")
}
companion object {
val TMP_DIR = "remoteFileExtensionsTest"
val TEXT_FILENAME = "text.txt"
val IMAGE_FILENAME = "image.jpg"
val IMAGE_WIDTH = 123
val IMAGE_HEIGHT = 45
}
}
@@ -11,7 +11,6 @@ import junit.framework.TestCase.assertFalse
import junit.framework.TestCase.assertTrue
import org.junit.Test
@Suppress("TooManyFunctions")
class StringExtensionTests {
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreNull() {
@@ -22,7 +22,7 @@ import org.junit.Test
import java.io.File
import kotlin.random.Random
@Suppress("TooManyFunctions", "MagicNumber")
@Suppress("MagicNumber")
class FileDeletionTests : AbstractIT() {
private val createdFilePaths = mutableListOf<String>()
@@ -18,7 +18,6 @@ fun withSelectedText(expected: String): Matcher<View> = object : TypeSafeMatcher
description.appendText("with selected text \"$expected\"")
}
@Suppress("ReturnCount")
override fun matchesSafely(view: View): Boolean {
if (view !is TextView) return false
val text = view.text?.toString() ?: ""
@@ -27,7 +27,6 @@ class RetryTestRule(val retryCount: Int = defaultRetryValue) : TestRule {
override fun apply(base: Statement, description: Description): Statement = statement(base, description)
@Suppress("TooGenericExceptionCaught") // and this exactly what we want here
private fun statement(base: Statement, description: Description): Statement {
return object : Statement() {
@@ -16,6 +16,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.rule.GrantPermissionRule
import com.nextcloud.ui.dialog.account.onlineStatus.SetOnlineStatusBottomSheet
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.lib.resources.users.Status
@@ -17,6 +17,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.rule.GrantPermissionRule
import com.nextcloud.test.Flaky
import com.nextcloud.test.GrantTestPermissionRule
import com.nextcloud.ui.dialog.account.statusMessage.SetStatusMessageBottomSheet
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.lib.resources.users.ClearAt
@@ -18,11 +18,10 @@ import com.owncloud.android.lib.resources.status.OCCapability
import org.junit.Before
import org.junit.Test
@Suppress("TooManyFunctions")
@SinceServer(majorVersion = 30)
class AutoRenameTests : AbstractOnServerIT() {
private var capability: OCCapability = fileDataStorageManager.getCapability(account.name)
private var capability: OCCapability = storageManager.getCapability(account.name)
private val forbiddenFilenameExtension = "."
private val forbiddenFilenameCharacter = ">"
@@ -12,7 +12,6 @@ import junit.framework.TestCase.assertFalse
import junit.framework.TestCase.assertTrue
import org.junit.Test
@Suppress("TooManyFunctions")
class FileExtensionTest {
@Test
@@ -15,7 +15,6 @@ import org.junit.Test
import java.io.File
import java.nio.file.Files
@Suppress("TooManyFunctions")
class FileHelperTest {
private lateinit var testDirectory: File
@@ -21,10 +21,12 @@ import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
@Suppress("TooManyFunctions")
class FileNameValidatorTests : AbstractOnServerIT() {
companion object {
private const val MAX_FILENAME_SIZE = 250
}
private var capability: OCCapability = fileDataStorageManager.getCapability(account.name)
private var capability: OCCapability = storageManager.getCapability(account.name)
@Before
fun setup() {
@@ -109,6 +111,20 @@ class FileNameValidatorTests : AbstractOnServerIT() {
assertEquals(targetContext.getString(R.string.filename_empty), result)
}
@Test
fun testLongFileName() {
val filename = "a".repeat(MAX_FILENAME_SIZE)
val result = FileNameValidator.checkFileName(filename, capability, targetContext)
assertNull(result)
}
@Test
fun testTooLongFileName() {
val filename = "a".repeat(MAX_FILENAME_SIZE + 1)
val result = FileNameValidator.checkFileName(filename, capability, targetContext)
assertEquals(targetContext.getString(R.string.filename_too_long), result)
}
@Test
fun testFileAlreadyExists() {
val existingFiles = setOf("existingFile")
@@ -17,9 +17,9 @@ import junit.framework.TestCase.assertEquals
import junit.framework.TestCase.assertTrue
import org.junit.Test
@Suppress("MagicNumber", "TooManyFunctions")
@Suppress("MagicNumber")
class OCCapabilityJsonToListTests : AbstractIT() {
private var capability: OCCapability = fileDataStorageManager.getCapability(account.name)
private var capability: OCCapability = storageManager.getCapability(account.name)
// region Valid Input
@Test
@@ -18,7 +18,6 @@ import junit.framework.TestCase.assertFalse
import junit.framework.TestCase.assertTrue
import org.junit.Test
@Suppress("TooManyFunctions")
class SharePermissionManagerTest {
private fun createShare(sharePermission: Int, isFolder: Boolean = false, attributesJson: String? = null): OCShare =
@@ -11,7 +11,6 @@ import com.nextcloud.utils.extensions.webDavParentPath
import org.junit.Assert.assertEquals
import org.junit.Test
@Suppress("TooManyFunctions")
class WebDavParentPathTests {
@Test
@@ -5,18 +5,18 @@
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.utils
package com.nextcloud.utils.view
import com.owncloud.android.AbstractIT
import org.junit.Assert.assertEquals
import org.junit.Test
class DisplayUtilsIT : AbstractIT() {
class ScreenMetricsIT : AbstractIT() {
@Test
fun testPixelToDP() {
val px = 123
val dp = DisplayUtils.convertPixelToDp(px, targetContext)
val newPx = DisplayUtils.convertDpToPixel(dp, targetContext)
val dp = ScreenMetrics.pxToDp(px, targetContext)
val newPx = ScreenMetrics.dpToPx(dp, targetContext)
assertEquals(px.toLong(), newPx.toLong())
}
@@ -1,78 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nmc.android.ui
import android.content.Intent
import android.os.SystemClock
import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class LauncherActivityIT : AbstractIT() {
private val instrumentation get() = InstrumentationRegistry.getInstrumentation()
@Test
fun testSplashScreenWithEmptyTitlesShouldHideTitles() {
val activity = launchLauncherActivity()
assertEquals(View.GONE, activity.findViewById<View>(R.id.splashScreenBold).visibility)
assertEquals(View.GONE, activity.findViewById<View>(R.id.splashScreenNormal).visibility)
}
@Test
fun testSplashScreenWithTitlesShouldShowTitles() {
val activity = launchLauncherActivity()
instrumentation.runOnMainSync { activity.setSplashTitles("Example", "Cloud") }
assertEquals(View.VISIBLE, activity.findViewById<View>(R.id.splashScreenBold).visibility)
assertEquals(View.VISIBLE, activity.findViewById<View>(R.id.splashScreenNormal).visibility)
}
@Test
fun testSplashScreenWithEmptyTitlesShouldNotDelayNextScreen() {
val activity = launchLauncherActivity()
assertTrue("Splash screen without titles did not open the next screen", activity.awaitFinishing())
}
private fun launchLauncherActivity(): LauncherActivity {
val intent = Intent(targetContext, LauncherActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
return instrumentation.startActivitySync(intent) as LauncherActivity
}
private fun LauncherActivity.awaitFinishing(): Boolean {
val deadline = SystemClock.uptimeMillis() + FINISH_TIMEOUT_IN_MILLIS
var finishing = false
while (!finishing && SystemClock.uptimeMillis() < deadline) {
instrumentation.runOnMainSync { finishing = isFinishing }
if (!finishing) {
Thread.sleep(FINISH_POLL_INTERVAL_IN_MILLIS)
}
}
return finishing
}
companion object {
private const val FINISH_TIMEOUT_IN_MILLIS = 5000L
private const val FINISH_POLL_INTERVAL_IN_MILLIS = 50L
}
}
@@ -1,511 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import com.facebook.testing.screenshot.Screenshot;
import com.facebook.testing.screenshot.internal.TestNameDetector;
import com.nextcloud.android.common.ui.theme.MaterialSchemes;
import com.nextcloud.android.common.ui.theme.MaterialSchemesImpl;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.nextcloud.utils.PowerManagementFactory;
import com.nextcloud.client.jobs.upload.FileUploadWorker;
import com.nextcloud.client.network.ConnectivityManagerFactory;
import com.nextcloud.client.network.ConnectivityService;
import com.nextcloud.client.preferences.AppPreferencesImpl;
import com.nextcloud.client.preferences.DarkMode;
import com.nextcloud.common.NextcloudClient;
import com.nextcloud.test.GrantStoragePermissionRule;
import com.nextcloud.test.RandomStringGenerator;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.ArbitraryDataProviderImpl;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.UploadsStorageManager;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.files.services.NameCollisionPolicy;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation;
import com.owncloud.android.lib.resources.status.OCCapability;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.rules.TestRule;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Optional;
import androidx.fragment.app.DialogFragment;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry;
import androidx.test.runner.lifecycle.Stage;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
/**
* Common base for all integration tests.
*/
public abstract class AbstractIT {
@Rule
public final TestRule storagePermissionRule = GrantStoragePermissionRule.grant();
protected ConnectivityService connectivityServiceMock = ConnectivityManagerFactory.INSTANCE.getMock();
protected static OwnCloudClient client;
protected static NextcloudClient nextcloudClient;
protected static Account account;
protected static User user;
protected static Context targetContext;
protected static String DARK_MODE = "";
protected static String COLOR = "";
protected Activity currentActivity;
protected FileDataStorageManager fileDataStorageManager =
new FileDataStorageManager(user, targetContext.getContentResolver());
protected ArbitraryDataProvider arbitraryDataProvider = new ArbitraryDataProviderImpl(targetContext);
@BeforeClass
public static void beforeAll() {
try {
// clean up
targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
AccountManager platformAccountManager = AccountManager.get(targetContext);
for (Account account : platformAccountManager.getAccounts()) {
if (account.type.equalsIgnoreCase(MainApp.getAccountType(targetContext))) {
platformAccountManager.removeAccountExplicitly(account);
}
}
account = createAccount("test@https://nextcloud.localhost");
user = getUser(account);
client = OwnCloudClientFactory.createOwnCloudClient(account, targetContext);
nextcloudClient = OwnCloudClientFactory.createNextcloudClient(user, targetContext);
} catch (OperationCanceledException |
IOException |
AccountUtils.AccountNotFoundException |
AuthenticatorException e) {
throw new RuntimeException("Error setting up clients", e);
}
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
// color
String colorParameter = arguments.getString("COLOR");
if (!TextUtils.isEmpty(colorParameter)) {
FileDataStorageManager fileDataStorageManager = new FileDataStorageManager(user,
targetContext.getContentResolver());
String colorHex = null;
COLOR = colorParameter;
switch (colorParameter) {
case "red":
colorHex = "#7c0000";
break;
case "green":
colorHex = "#00ff00";
break;
case "white":
colorHex = "#ffffff";
break;
case "black":
colorHex = "#000000";
break;
case "lightgreen":
colorHex = "#aaff00";
break;
default:
break;
}
OCCapability capability = fileDataStorageManager.getCapability(account.name);
capability.setGroupfolders(CapabilityBooleanType.TRUE);
if (colorHex != null) {
capability.setServerColor(colorHex);
}
fileDataStorageManager.saveCapabilities(capability);
}
// dark / light
String darkModeParameter = arguments.getString("DARKMODE");
if (darkModeParameter != null) {
if ("dark".equalsIgnoreCase(darkModeParameter)) {
DARK_MODE = "dark";
AppPreferencesImpl.fromContext(targetContext).setDarkThemeMode(DarkMode.DARK);
MainApp.setAppTheme(DarkMode.DARK);
} else {
DARK_MODE = "light";
}
}
if ("light".equalsIgnoreCase(DARK_MODE) && "blue".equalsIgnoreCase(COLOR)) {
// use already existing names
DARK_MODE = "";
COLOR = "";
}
}
protected void testOnlyOnServer(OwnCloudVersion version) throws AccountUtils.AccountNotFoundException {
OCCapability ocCapability = getCapability();
assumeTrue(ocCapability.getVersion().isNewerOrEqual(version));
}
protected OCCapability getCapability() throws AccountUtils.AccountNotFoundException {
NextcloudClient client = OwnCloudClientFactory.createNextcloudClient(user, targetContext);
return new GetCapabilitiesRemoteOperation().execute(client).getResultData();
}
@Before
public void enableAccessibilityChecks() {
androidx.test.espresso.accessibility.AccessibilityChecks.enable().setRunChecksFromRootView(true);
}
@After
public void after() {
fileDataStorageManager.removeLocalFiles(user, fileDataStorageManager);
fileDataStorageManager.deleteAllFiles();
}
protected FileDataStorageManager getStorageManager() {
return fileDataStorageManager;
}
protected Account[] getAllAccounts() {
return AccountManager.get(targetContext).getAccounts();
}
protected static List<File> createDummyFiles() throws IOException {
File tempPath = new File(FileStorageUtils.getTemporalPath(account.name));
if (!tempPath.exists()) {
assertTrue(tempPath.mkdirs());
}
assertTrue(tempPath.exists());
return Arrays.asList(
createFile("empty.txt", 0),
createFile("nonEmpty.txt", 100),
createFile("chunkedFile.txt", 500000)
);
}
protected static File getDummyFile(String name) throws IOException {
File file = new File(FileStorageUtils.getInternalTemporalPath(account.name, targetContext) + File.separator + name);
if (file.exists()) {
return file;
} else if (name.endsWith("/")) {
file.mkdirs();
return file;
} else {
return switch (name) {
case "empty.txt" -> createFile("empty.txt", 0);
case "nonEmpty.txt" -> createFile("nonEmpty.txt", 100);
case "chunkedFile.txt" -> createFile("chunkedFile.txt", 500000);
default -> createFile(name, 0);
};
}
}
public static File createFile(String name, int iteration) throws IOException {
File file = new File(FileStorageUtils.getTemporalPath(account.name) + File.separator + name);
if (!file.getParentFile().exists()) {
assertTrue(file.getParentFile().mkdirs());
}
file.createNewFile();
FileWriter writer = new FileWriter(file);
for (int i = 0; i < iteration; i++) {
writer.write("123123123123123123123123123\n");
}
writer.flush();
writer.close();
return file;
}
protected File getFile(String filename) throws IOException {
InputStream inputStream = getInstrumentation().getContext().getAssets().open(filename);
File temp = File.createTempFile("file", "file");
FileUtils.copyInputStreamToFile(inputStream, temp);
return temp;
}
protected void waitForIdleSync() {
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
}
public void onIdleSync(Runnable recipient) {
InstrumentationRegistry.getInstrumentation().waitForIdle(recipient);
}
protected void openDrawer(IntentsTestRule activityRule) {
Activity sut = activityRule.launchActivity(null);
shortSleep();
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
waitForIdleSync();
screenshot(sut);
}
protected Activity getCurrentActivity() {
InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
Collection<Activity> resumedActivities = ActivityLifecycleMonitorRegistry
.getInstance()
.getActivitiesInStage(Stage.RESUMED);
if (resumedActivities.iterator().hasNext()) {
currentActivity = resumedActivities.iterator().next();
}
});
return currentActivity;
}
protected static void shortSleep() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
protected void longSleep() {
try {
Thread.sleep(20000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
protected void sleep(int second) {
try {
Thread.sleep(1000L * second);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public void createFolder(String remotePath) {
RemoteOperationResult check = new ExistenceCheckRemoteOperation(remotePath, false).execute(client);
if (!check.isSuccess()) {
assertTrue(new CreateFolderOperation(remotePath, user, targetContext, getStorageManager())
.execute(client)
.isSuccess());
}
}
public void uploadFile(File file, String remotePath) {
OCUpload ocUpload = new OCUpload(file.getAbsolutePath(), remotePath, account.name);
uploadOCUpload(ocUpload);
}
public void uploadOCUpload(OCUpload ocUpload) {
final var powerManagementServiceMock = PowerManagementFactory.getMock();
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
UploadsStorageManager uploadsStorageManager = new UploadsStorageManager(accountManager,
targetContext.getContentResolver());
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false,
getStorageManager()
);
newUpload.addRenameUploadListener(() -> {
// dummy
});
newUpload.setRemoteFolderToBeCreated();
var result = newUpload.execute(client);
assertTrue(result.getLogMessage(), result.isSuccess());
}
protected void enableRTL() {
Locale locale = new Locale("ar");
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, null);
}
protected void resetLocale() {
Locale locale = new Locale("en");
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, null);
}
protected void screenshot(View view) {
screenshot(view, "");
}
public void screenshotViaName(Activity activity, String name) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
Screenshot.snapActivity(activity).setName(name).record();
}
}
protected void screenshotViaName(View view, String name) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
Screenshot.snap(view).setName(name).record();
}
}
protected void screenshot(View view, String prefix) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
Screenshot.snap(view).setName(createName(prefix)).record();
}
}
protected void screenshot(Activity sut) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
Screenshot.snapActivity(sut).setName(createName()).record();
}
}
protected void screenshot(DialogFragment dialogFragment, String prefix) {
screenshot(Objects.requireNonNull(dialogFragment.requireDialog().getWindow()).getDecorView(), prefix);
}
private String createName() {
return createName("");
}
public String createName(String name, String prefix) {
if (!TextUtils.isEmpty(prefix)) {
name = name + "_" + prefix;
}
if (!DARK_MODE.isEmpty()) {
name = name + "_" + DARK_MODE;
}
if (!COLOR.isEmpty()) {
name = name + "_" + COLOR;
}
return name;
}
private String createName(String prefix) {
String name = TestNameDetector.getTestClass() + "_" + TestNameDetector.getTestName();
return createName(name, prefix);
}
public static String getUserId(User user) {
return AccountManager.get(targetContext).getUserData(user.toPlatformAccount(), KEY_USER_ID);
}
public String getRandomName() {
return getRandomName(5);
}
public String getRandomName(int length) {
return RandomStringGenerator.make(length);
}
protected static User getUser(Account account) {
Optional<User> optionalUser = UserAccountManagerImpl.fromContext(targetContext).getUser(account.name);
return optionalUser.orElseThrow(IllegalAccessError::new);
}
protected static Account createAccount(String name) {
AccountManager platformAccountManager = AccountManager.get(targetContext);
Account temp = new Account(name, MainApp.getAccountType(targetContext));
int atPos = name.lastIndexOf('@');
platformAccountManager.addAccountExplicitly(temp, "password", null);
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL,
name.substring(atPos + 1));
platformAccountManager.setUserData(temp, KEY_USER_ID, name.substring(0, atPos));
Account account = UserAccountManagerImpl.fromContext(targetContext).getAccountByName(name);
if (Objects.equals(account.type, targetContext.getString(R.string.anonymous_account_type))) {
throw new RuntimeException("Could not get account with name " + name);
}
return account;
}
protected static boolean removeAccount(Account account) {
return AccountManager.get(targetContext).removeAccountExplicitly(account);
}
protected MaterialSchemes getMaterialSchemesForCurrentUser() {
return new MaterialSchemesImpl(R.color.primary, false);
}
}
@@ -0,0 +1,421 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android
import android.accounts.Account
import android.accounts.AccountManager
import android.accounts.AuthenticatorException
import android.accounts.OperationCanceledException
import android.app.Activity
import android.app.Instrumentation
import android.content.Context
import android.os.Build
import android.view.View
import androidx.fragment.app.DialogFragment
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.accessibility.AccessibilityChecks
import androidx.test.espresso.contrib.DrawerActions
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry
import androidx.test.runner.lifecycle.Stage
import com.facebook.testing.screenshot.RecordBuilder
import com.facebook.testing.screenshot.Screenshot
import com.facebook.testing.screenshot.internal.TestNameDetector
import com.nextcloud.android.common.ui.theme.MaterialSchemes
import com.nextcloud.client.account.User
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.client.jobs.upload.FileUploadWorker
import com.nextcloud.client.network.ConnectivityManagerFactory
import com.nextcloud.client.network.ConnectivityService
import com.nextcloud.client.preferences.AppPreferencesImpl
import com.nextcloud.client.preferences.DarkMode
import com.nextcloud.common.NextcloudClient
import com.nextcloud.test.GrantStoragePermissionRule
import com.nextcloud.utils.PowerManagementFactory
import com.owncloud.android.datamodel.ArbitraryDataProvider
import com.owncloud.android.datamodel.ArbitraryDataProviderImpl
import com.owncloud.android.datamodel.FileDataStorageManager
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.datamodel.UploadsStorageManager
import com.owncloud.android.db.OCUpload
import com.owncloud.android.files.services.NameCollisionPolicy
import com.owncloud.android.lib.common.OwnCloudClient
import com.owncloud.android.lib.common.OwnCloudClientFactory
import com.owncloud.android.lib.common.accounts.AccountUtils
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_OC_BASE_URL
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation
import com.owncloud.android.lib.resources.status.CapabilityBooleanType
import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation
import com.owncloud.android.lib.resources.status.OCCapability
import com.owncloud.android.lib.resources.status.OwnCloudVersion
import com.owncloud.android.operations.CreateFolderOperation
import com.owncloud.android.operations.UploadFileOperation
import com.owncloud.android.utils.FileStorageUtils
import org.apache.commons.io.FileUtils
import org.junit.After
import org.junit.Assert.assertTrue
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Rule
import org.junit.rules.TestRule
import java.io.File
import java.io.IOException
import java.util.Locale
@Suppress("DEPRECATION")
abstract class AbstractIT {
@get:Rule
val storagePermissionRule: TestRule = GrantStoragePermissionRule.grant()
protected val connectivityServiceMock: ConnectivityService = ConnectivityManagerFactory.mock
private var currentActivity: Activity? = null
protected val storageManager = FileDataStorageManager(user, targetContext.contentResolver)
protected val arbitraryDataProvider: ArbitraryDataProvider = ArbitraryDataProviderImpl(targetContext)
protected val materialSchemesForCurrentUser: MaterialSchemes
get() = MaterialSchemes.fromColor(R.color.primary)
@Before
fun enableAccessibilityChecks() {
AccessibilityChecks.enable().setRunChecksFromRootView(true)
}
@After
open fun after() {
storageManager.removeLocalFiles(user, storageManager)
storageManager.deleteAllFiles()
}
@Throws(AccountUtils.AccountNotFoundException::class)
protected fun testOnlyOnServer(version: OwnCloudVersion) {
assumeTrue(getCapability().version.isNewerOrEqual(version))
}
@Throws(AccountUtils.AccountNotFoundException::class)
protected fun getCapability(): OCCapability {
val client = OwnCloudClientFactory.createNextcloudClient(user, targetContext)
return GetCapabilitiesRemoteOperation().execute(client).resultData
}
@Throws(IOException::class)
protected fun getFile(filename: String): File = instrumentation.context.assets.open(filename).use { asset ->
File.createTempFile("file", "file").also { FileUtils.copyInputStreamToFile(asset, it) }
}
protected fun waitForIdleSync() {
instrumentation.waitForIdleSync()
}
fun onIdleSync(recipient: Runnable) {
instrumentation.waitForIdle(recipient)
}
protected fun openDrawer(activityRule: IntentsTestRule<*>) {
val sut = activityRule.launchActivity(null)
shortSleep()
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
waitForIdleSync()
screenshot(sut)
}
protected fun getCurrentActivity(): Activity? {
instrumentation.runOnMainSync {
ActivityLifecycleMonitorRegistry.getInstance()
.getActivitiesInStage(Stage.RESUMED)
.firstOrNull()
?.let { currentActivity = it }
}
return currentActivity
}
protected fun longSleep() = sleepIgnoringInterrupt(LONG_SLEEP_MILLIS)
fun createFolder(remotePath: String) {
if (ExistenceCheckRemoteOperation(remotePath, false).execute(client).isSuccess) return
val result = CreateFolderOperation(remotePath, user, targetContext, storageManager).execute(client)
assertTrue(result.isSuccess)
}
fun uploadFile(file: File, remotePath: String) {
uploadOCUpload(OCUpload(file.absolutePath, remotePath, account.name))
}
open fun uploadOCUpload(ocUpload: OCUpload) {
executeUpload(ocUpload, NameCollisionPolicy.DEFAULT, FileUploadWorker.LOCAL_BEHAVIOUR_COPY)
}
protected fun executeUpload(ocUpload: OCUpload, nameCollisionPolicy: NameCollisionPolicy, localBehaviour: Int) {
val uploadsStorageManager = UploadsStorageManager(
UserAccountManagerImpl.fromContext(targetContext),
targetContext.contentResolver
)
val existingFile: OCFile? = null
val onWifiOnly = false
val whileChargingOnly = false
val operation = UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
PowerManagementFactory.mock,
user,
existingFile,
ocUpload,
nameCollisionPolicy,
localBehaviour,
targetContext,
onWifiOnly,
whileChargingOnly,
storageManager
).apply {
addRenameUploadListener { }
setRemoteFolderToBeCreated()
}
val result = operation.execute(client)
assertTrue(result.logMessage, result.isSuccess)
}
protected fun enableRTL() = applyLocale(Locale.forLanguageTag("ar"))
protected fun resetLocale() = applyLocale(Locale.forLanguageTag("en"))
@Suppress("DEPRECATION")
private fun applyLocale(locale: Locale) {
val resources = instrumentation.targetContext.resources
val config = resources.configuration.apply { setLocale(locale) }
resources.updateConfiguration(config, null)
}
fun screenshotViaName(activity: Activity?, name: String) =
recordScreenshot { Screenshot.snapActivity(activity).setName(name) }
protected fun screenshotViaName(view: View?, name: String) = recordScreenshot {
Screenshot.snap(view).setName(name)
}
@JvmOverloads
protected fun screenshot(view: View?, prefix: String = "") =
recordScreenshot { Screenshot.snap(view).setName(createName(prefix)) }
protected fun screenshot(sut: Activity?) = recordScreenshot { Screenshot.snapActivity(sut).setName(createName()) }
protected fun screenshot(dialogFragment: DialogFragment, prefix: String) =
screenshot(requireNotNull(dialogFragment.requireDialog().window).decorView, prefix)
private inline fun recordScreenshot(snap: () -> RecordBuilder) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) return
snap().record()
}
fun createName(name: String, prefix: String): String {
val suffixes = listOf(prefix, darkMode, color).filter { it.isNotEmpty() }
return (listOf(name) + suffixes).joinToString("_")
}
private fun createName(prefix: String = ""): String =
createName("${TestNameDetector.getTestClass()}_${TestNameDetector.getTestName()}", prefix)
companion object {
private const val TEST_ACCOUNT_NAME = "test@https://nextcloud.localhost"
private const val TEST_ACCOUNT_PASSWORD = "password"
private const val DUMMY_FILE_LINE = "123123123123123123123123123\n"
private const val SHORT_SLEEP_MILLIS = 2_000L
private const val LONG_SLEEP_MILLIS = 20_000L
private const val DARK = "dark"
private const val LIGHT = "light"
private const val DEFAULT_COLOR = "blue"
private val DUMMY_FILE_LINE_COUNTS = linkedMapOf(
"empty.txt" to 0,
"nonEmpty.txt" to 100,
"chunkedFile.txt" to 500_000
)
private val SERVER_COLORS = mapOf(
"red" to "#7c0000",
"green" to "#00ff00",
"white" to "#ffffff",
"black" to "#000000",
"lightgreen" to "#aaff00"
)
private val CLIENT_SETUP_FAILURES = listOf(
OperationCanceledException::class.java,
IOException::class.java,
AccountUtils.AccountNotFoundException::class.java,
AuthenticatorException::class.java
)
private val instrumentation: Instrumentation
get() = InstrumentationRegistry.getInstrumentation()
@JvmStatic
protected lateinit var client: OwnCloudClient
@JvmStatic
protected lateinit var nextcloudClient: NextcloudClient
@JvmStatic
protected lateinit var account: Account
@JvmStatic
protected lateinit var user: User
@JvmStatic
protected lateinit var targetContext: Context
private var darkMode = ""
private var color = ""
@BeforeClass
@JvmStatic
fun beforeAll() {
targetContext = instrumentation.targetContext
removeAccountsOfType(MainApp.getAccountType(targetContext))
rethrowClientSetupFailure {
account = createAccount(TEST_ACCOUNT_NAME)
user = getUser(account)
client = OwnCloudClientFactory.createOwnCloudClient(account, targetContext)
nextcloudClient = OwnCloudClientFactory.createNextcloudClient(user, targetContext)
}
val arguments = InstrumentationRegistry.getArguments()
arguments.getString("COLOR")?.takeIf { it.isNotEmpty() }?.let(::applyServerColor)
arguments.getString("DARKMODE")?.let(::applyDarkMode)
if (LIGHT.equals(darkMode, ignoreCase = true) && DEFAULT_COLOR.equals(color, ignoreCase = true)) {
darkMode = ""
color = ""
}
}
private fun applyServerColor(colorArgument: String) {
color = colorArgument
val fileDataStorageManager = FileDataStorageManager(user, targetContext.contentResolver)
val capability = fileDataStorageManager.getCapability(account.name).apply {
groupfolders = CapabilityBooleanType.TRUE
SERVER_COLORS[colorArgument]?.let { serverColor = it }
}
fileDataStorageManager.saveCapabilities(capability)
}
private fun applyDarkMode(darkModeArgument: String) {
if (!DARK.equals(darkModeArgument, ignoreCase = true)) {
darkMode = LIGHT
return
}
darkMode = DARK
AppPreferencesImpl.fromContext(targetContext).setDarkThemeMode(DarkMode.DARK)
MainApp.setAppTheme(DarkMode.DARK)
}
@JvmStatic
protected fun <T> rethrowClientSetupFailure(setup: () -> T): T = try {
setup()
} catch (e: Exception) {
if (CLIENT_SETUP_FAILURES.none { it.isInstance(e) }) throw e
throw RuntimeException("Error setting up clients", e)
}
@JvmStatic
protected fun removeAccountsOfType(accountType: String) = with(AccountManager.get(targetContext)) {
accounts
.filter { it.type.equals(accountType, ignoreCase = true) }
.forEach(this::removeAccountExplicitly)
}
@JvmStatic
@Throws(IOException::class)
protected fun createDummyFiles(): List<File> {
val tempPath = File(FileStorageUtils.getTemporalPath(account.name))
if (!tempPath.exists()) assertTrue(tempPath.mkdirs())
assertTrue(tempPath.exists())
return DUMMY_FILE_LINE_COUNTS.map { (name, lineCount) -> createFile(name, lineCount) }
}
@JvmStatic
@Throws(IOException::class)
protected fun getDummyFile(name: String): File {
val file = File(FileStorageUtils.getInternalTemporalPath(account.name, targetContext), name)
return when {
file.exists() -> file
name.endsWith("/") -> file.apply { mkdirs() }
else -> createFile(name, DUMMY_FILE_LINE_COUNTS.getOrElse(name) { 0 })
}
}
@JvmStatic
@Throws(IOException::class)
fun createFile(name: String, iteration: Int): File {
val file = File(FileStorageUtils.getTemporalPath(account.name), name)
val parent = requireNotNull(file.parentFile)
if (!parent.exists()) assertTrue(parent.mkdirs())
file.bufferedWriter().use { writer -> repeat(iteration) { writer.write(DUMMY_FILE_LINE) } }
return file
}
@JvmStatic
protected fun shortSleep() = sleepIgnoringInterrupt(SHORT_SLEEP_MILLIS)
@JvmStatic
protected fun sleepIgnoringInterrupt(millis: Long) {
try {
Thread.sleep(millis)
} catch (e: InterruptedException) {
e.printStackTrace()
}
}
@JvmStatic
fun getUserId(user: User): String = requireNotNull(
AccountManager.get(targetContext).getUserData(user.toPlatformAccount(), KEY_USER_ID)
) { "No user id stored for ${user.accountName}" }
@JvmStatic
protected fun getUser(account: Account): User =
UserAccountManagerImpl.fromContext(targetContext).getUser(account.name).orElseThrow { IllegalAccessError() }
@JvmStatic
protected fun createAccount(name: String): Account {
val platformAccount = Account(name, MainApp.getAccountType(targetContext))
AccountManager.get(targetContext).run {
addAccountExplicitly(platformAccount, TEST_ACCOUNT_PASSWORD, null)
setUserData(platformAccount, KEY_OC_BASE_URL, name.substringAfterLast('@'))
setUserData(platformAccount, KEY_USER_ID, name.substringBeforeLast('@'))
}
return getRegisteredAccount(name)
}
@JvmStatic
protected fun getRegisteredAccount(name: String): Account {
val account = UserAccountManagerImpl.fromContext(targetContext).getAccountByName(name)
if (account.type == targetContext.getString(R.string.anonymous_account_type)) {
throw RuntimeException("Could not get account with name $name")
}
return account
}
@JvmStatic
protected fun removeAccount(account: Account): Boolean =
AccountManager.get(targetContext).removeAccountExplicitly(account)
}
}
@@ -1,260 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.net.Uri;
import android.os.Bundle;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.nextcloud.utils.PowerManagementFactory;
import com.nextcloud.client.jobs.upload.FileUploadWorker;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.UploadsStorageManager;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.files.services.NameCollisionPolicy;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation;
import com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation;
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation;
import com.owncloud.android.lib.resources.files.model.RemoteFile;
import com.owncloud.android.operations.RefreshFolderOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.MimeType;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.junit.After;
import org.junit.Assert;
import org.junit.BeforeClass;
import java.io.File;
import java.io.IOException;
import java.util.Objects;
import java.util.Optional;
import androidx.test.platform.app.InstrumentationRegistry;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/// Common base for all integration tests requiring a server connection.
/// ATTENTION: Deletes ALL files of the test user on the server after each test run.
/// So you MUST use a dedicated test user.
/// Uses server, user and password given as `testInstrumentationRunnerArgument`
/// - TEST_SERVER_URL
/// - TEST_SERVER_USERNAME
/// - TEST_SERVER_PASSWORD
/// These are supplied via build.gradle, which takes them from gradle.properties.
/// So look in the latter file to set to your own server & test user.
public abstract class AbstractOnServerIT extends AbstractIT {
@BeforeClass
public static void beforeAll() {
try {
// clean up
targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
AccountManager platformAccountManager = AccountManager.get(targetContext);
for (Account account : platformAccountManager.getAccounts()) {
if (account.type.equalsIgnoreCase("nextcloud")) {
platformAccountManager.removeAccountExplicitly(account);
}
}
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
Uri baseUrl = Uri.parse(arguments.getString("TEST_SERVER_URL"));
String loginName = arguments.getString("TEST_SERVER_USERNAME");
String password = arguments.getString("TEST_SERVER_PASSWORD");
Account temp = new Account(loginName + "@" + baseUrl, MainApp.getAccountType(targetContext));
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
if (!accountManager.exists(temp)) {
platformAccountManager.addAccountExplicitly(temp, password, null);
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(UserAccountManager.ACCOUNT_VERSION));
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_VERSION, "14.0.0.0");
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL, baseUrl.toString());
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_USER_ID, loginName); // same as userId
}
final UserAccountManager userAccountManager = UserAccountManagerImpl.fromContext(targetContext);
account = userAccountManager.getAccountByName(loginName + "@" + baseUrl);
if (Objects.equals(account.type, targetContext.getString(R.string.anonymous_account_type))) {
throw new RuntimeException("Could not get account with name " + loginName + "@" + baseUrl);
}
Optional<User> optionalUser = userAccountManager.getUser(account.name);
user = optionalUser.orElseThrow(IllegalAccessError::new);
client = OwnCloudClientFactory.createOwnCloudClient(account, targetContext);
nextcloudClient = OwnCloudClientFactory.createNextcloudClient(user, targetContext);
createDummyFiles();
waitForServer(client, baseUrl);
// deleteAllFilesOnServer(); // makes sure that no file/folder is in root
} catch (OperationCanceledException |
IOException |
AccountUtils.AccountNotFoundException |
AuthenticatorException e) {
throw new RuntimeException("Error setting up clients", e);
}
}
@After
public void after() {
deleteAllFilesOnServer();
super.after();
}
private static boolean isFolder(RemoteFile file) {
// TODO: should probably move to RemoteFile class
return MimeType.DIRECTORY.equals(file.getMimeType()) || MimeType.WEBDAV_FOLDER.equals(file.getMimeType());
}
public static void deleteAllFilesOnServer() {
var result = new ReadFolderRemoteOperation("/").execute(client);
assertTrue(result.getLogMessage(targetContext), result.isSuccess());
for (Object object : result.getData()) {
RemoteFile remoteFile = (RemoteFile) object;
if (!Objects.equals(remoteFile.getRemotePath(), "/")) {
if (remoteFile.isEncrypted()) {
ToggleEncryptionRemoteOperation operation = new ToggleEncryptionRemoteOperation(remoteFile.getLocalId(),
remoteFile.getRemotePath(),
false);
boolean operationResult = operation
.execute(client)
.isSuccess();
if (!operationResult && isFolder(remoteFile)) {
// Deleting encrypted folder is not possible due to bug
// https://github.com/nextcloud/end_to_end_encryption/issues/421
// Toggling encryption also fails, when the folder is not empty. So we ignore this folder
continue;
}
assertTrue(operationResult);
}
if (remoteFile.getPermissions().contains("M")) {
// skip Teamfolders
continue;
}
boolean removeResult = false;
for (int i = 0; i < 5; i++) {
removeResult = new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess();
if (removeResult) {
break;
}
shortSleep();
}
assertTrue("Remove of " + remoteFile.getRemotePath() + " failed", removeResult);
}
}
}
private static void waitForServer(OwnCloudClient client, Uri baseUrl) {
GetMethod get = new GetMethod(baseUrl + "/status.php");
try {
int i = 0;
while (client.executeMethod(get) != HttpStatus.SC_OK && i < 3) {
System.out.println("wait…");
Thread.sleep(60 * 1000);
i++;
}
if (i == 3) {
Assert.fail("Server not ready!");
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
public void uploadOCUpload(OCUpload ocUpload) {
uploadOCUpload(ocUpload, FileUploadWorker.LOCAL_BEHAVIOUR_COPY);
}
public void uploadOCUpload(OCUpload ocUpload, int localBehaviour) {
final var powerManagementServiceMock = PowerManagementFactory.getMock();
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
UploadsStorageManager uploadsStorageManager = new UploadsStorageManager(accountManager,
targetContext.getContentResolver());
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.OVERWRITE,
localBehaviour,
targetContext,
false,
false,
getStorageManager()
);
newUpload.addRenameUploadListener(() -> {
// dummy
});
newUpload.setRemoteFolderToBeCreated();
var result = newUpload.execute(client);
assertTrue(result.getLogMessage(), result.isSuccess());
OCFile parentFolder = getStorageManager()
.getFileByEncryptedRemotePath(new File(ocUpload.getRemotePath()).getParent() + "/");
String uploadedFileName = new File(ocUpload.getRemotePath()).getName();
OCFile uploadedFile = getStorageManager().
getFileByDecryptedRemotePath(parentFolder.getDecryptedRemotePath() + uploadedFileName);
assertNotNull(uploadedFile);
assertNotNull(uploadedFile.getRemoteId());
assertNotNull(uploadedFile.getPermissions());
if (localBehaviour == FileUploadWorker.LOCAL_BEHAVIOUR_COPY ||
localBehaviour == FileUploadWorker.LOCAL_BEHAVIOUR_MOVE) {
assertTrue(new File(uploadedFile.getStoragePath()).exists());
}
}
protected void refreshFolder(String path) {
assertTrue(new RefreshFolderOperation(getStorageManager().getFileByEncryptedRemotePath(path),
System.currentTimeMillis(),
false,
false,
getStorageManager(),
user,
targetContext
).execute(client).isSuccess());
}
}
@@ -0,0 +1,203 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android
import android.accounts.Account
import android.accounts.AccountManager
import android.net.Uri
import android.os.Bundle
import androidx.test.platform.app.InstrumentationRegistry
import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.client.jobs.upload.FileUploadWorker
import com.owncloud.android.db.OCUpload
import com.owncloud.android.files.services.NameCollisionPolicy
import com.owncloud.android.lib.common.OwnCloudClient
import com.owncloud.android.lib.common.OwnCloudClientFactory
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_OC_ACCOUNT_VERSION
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_OC_BASE_URL
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_OC_VERSION
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation
import com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation
import com.owncloud.android.lib.resources.files.model.RemoteFile
import com.owncloud.android.operations.RefreshFolderOperation
import com.owncloud.android.utils.FileStorageUtils
import com.owncloud.android.utils.MimeType
import org.apache.commons.httpclient.HttpStatus
import org.apache.commons.httpclient.methods.GetMethod
import org.junit.After
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.BeforeClass
import java.io.File
import java.io.IOException
@Suppress("DEPRECATION")
abstract class AbstractOnServerIT : AbstractIT() {
@After
override fun after() {
deleteAllFilesOnServer()
super.after()
}
override fun uploadOCUpload(ocUpload: OCUpload) {
uploadOCUpload(ocUpload, FileUploadWorker.LOCAL_BEHAVIOUR_COPY)
}
fun uploadOCUpload(ocUpload: OCUpload, localBehaviour: Int) {
executeUpload(ocUpload, NameCollisionPolicy.OVERWRITE, localBehaviour)
val remotePath = ocUpload.remotePath
val parentPath = FileStorageUtils.getParentPath(remotePath)
?: throw AssertionError("$remotePath has no parent folder")
val parentFolder = storageManager.getFileByEncryptedRemotePath(parentPath)
?: throw AssertionError("Parent folder $parentPath not found")
val uploadedFile = storageManager.getFileByDecryptedRemotePath(
parentFolder.decryptedRemotePath + File(remotePath).name
) ?: throw AssertionError("Uploaded file $remotePath not found")
assertNotNull(uploadedFile.remoteId)
assertNotNull(uploadedFile.permissions)
if (localBehaviour in LOCAL_COPY_BEHAVIOURS) {
assertTrue(File(uploadedFile.storagePath).exists())
}
}
protected fun refreshFolder(path: String) {
val operation = RefreshFolderOperation(
storageManager.getFileByEncryptedRemotePath(path),
System.currentTimeMillis(),
false,
false,
storageManager,
user,
targetContext
)
assertTrue(operation.execute(client).isSuccess)
}
companion object {
private const val SERVER_ACCOUNT_TYPE = "nextcloud"
private const val SERVER_VERSION = "14.0.0.0"
private const val ROOT_PATH = "/"
private const val TEAM_FOLDER_PERMISSION = "M"
private const val REMOVE_ATTEMPTS = 5
private const val SERVER_READY_RETRIES = 3
private const val SERVER_READY_RETRY_DELAY_MILLIS = 60_000L
private val FOLDER_MIME_TYPES = setOf(MimeType.DIRECTORY, MimeType.WEBDAV_FOLDER)
private val LOCAL_COPY_BEHAVIOURS = setOf(
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
FileUploadWorker.LOCAL_BEHAVIOUR_MOVE
)
@BeforeClass
@JvmStatic
fun beforeAll() {
rethrowClientSetupFailure {
targetContext = InstrumentationRegistry.getInstrumentation().targetContext
removeAccountsOfType(SERVER_ACCOUNT_TYPE)
val arguments = InstrumentationRegistry.getArguments()
val baseUrl = Uri.parse(arguments.requireString("TEST_SERVER_URL"))
val loginName = arguments.requireString("TEST_SERVER_USERNAME")
val password = arguments.requireString("TEST_SERVER_PASSWORD")
val accountName = "$loginName@$baseUrl"
addServerAccountIfMissing(accountName, loginName, password, baseUrl)
account = getRegisteredAccount(accountName)
user = getUser(account)
client = OwnCloudClientFactory.createOwnCloudClient(account, targetContext)
nextcloudClient = OwnCloudClientFactory.createNextcloudClient(user, targetContext)
createDummyFiles()
waitForServer(client, baseUrl)
}
}
private fun addServerAccountIfMissing(accountName: String, loginName: String, password: String, baseUrl: Uri) {
val platformAccount = Account(accountName, MainApp.getAccountType(targetContext))
if (UserAccountManagerImpl.fromContext(targetContext).exists(platformAccount)) return
AccountManager.get(targetContext).run {
addAccountExplicitly(platformAccount, password, null)
setUserData(platformAccount, KEY_OC_ACCOUNT_VERSION, UserAccountManager.ACCOUNT_VERSION.toString())
setUserData(platformAccount, KEY_OC_VERSION, SERVER_VERSION)
setUserData(platformAccount, KEY_OC_BASE_URL, baseUrl.toString())
setUserData(platformAccount, KEY_USER_ID, loginName)
}
}
private fun isFolder(file: RemoteFile): Boolean = file.mimeType in FOLDER_MIME_TYPES
private fun isTeamFolder(file: RemoteFile): Boolean = file.permissions?.contains(TEAM_FOLDER_PERMISSION) == true
private fun deleteAllFilesOnServer() {
val result = ReadFolderRemoteOperation(ROOT_PATH).execute(client)
assertTrue(result.getLogMessage(targetContext), result.isSuccess)
result.data
.filterIsInstance<RemoteFile>()
.filterNot { it.remotePath == ROOT_PATH }
.forEach(::deleteRemoteFile)
}
private fun deleteRemoteFile(remoteFile: RemoteFile) {
if (remoteFile.isEncrypted) {
val isEncryptionDisabled = disableEncryption(remoteFile)
if (!isEncryptionDisabled && isFolder(remoteFile)) return
assertTrue(isEncryptionDisabled)
}
if (isTeamFolder(remoteFile)) return
assertTrue("Remove of ${remoteFile.remotePath} failed", removeWithRetry(remoteFile))
}
private fun disableEncryption(remoteFile: RemoteFile): Boolean =
ToggleEncryptionRemoteOperation(remoteFile.localId, remoteFile.remotePath, false)
.execute(client)
.isSuccess
private fun removeWithRetry(remoteFile: RemoteFile): Boolean {
repeat(REMOVE_ATTEMPTS) {
if (RemoveFileRemoteOperation(remoteFile.remotePath).execute(client).isSuccess) return true
shortSleep()
}
return false
}
private fun waitForServer(client: OwnCloudClient, baseUrl: Uri) {
val statusRequest = GetMethod("$baseUrl/status.php")
repeat(SERVER_READY_RETRIES) {
if (isServerReady(client, statusRequest)) return
println("wait…")
sleepIgnoringInterrupt(SERVER_READY_RETRY_DELAY_MILLIS)
}
assertTrue("Server not ready!", isServerReady(client, statusRequest))
}
private fun isServerReady(client: OwnCloudClient, statusRequest: GetMethod): Boolean = try {
client.executeMethod(statusRequest) == HttpStatus.SC_OK
} catch (e: IOException) {
e.printStackTrace()
false
}
private fun Bundle.requireString(key: String): String =
requireNotNull(getString(key)) { "Missing instrumentation argument $key" }
}
}
@@ -70,8 +70,8 @@ class DownloadIT : AbstractOnServerIT() {
refreshFolder(FOLDER)
var file1 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt")
var file2 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt")
var file1 = storageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt")
var file2 = storageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt")
if (file1 == null) {
fail("file 1 cannot be null")
@@ -88,8 +88,8 @@ class DownloadIT : AbstractOnServerIT() {
Assert.assertTrue(operation2Result.isSuccess)
refreshFolder(FOLDER)
file1 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt")
file2 = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt")
file1 = storageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt")
file2 = storageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty2.txt")
verifyDownload(file1, file2)
}
@@ -0,0 +1,251 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Daniele Verducci <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android
import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.client.database.entity.FileEntity
import com.nextcloud.client.network.NetworkModule
import com.nextcloud.test.SinceServer
import com.nextcloud.utils.e2ee.E2EEActionResolver
import com.nextcloud.utils.e2ee.E2EEKeyInspector
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation
import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation
import com.owncloud.android.lib.resources.status.NextcloudVersion
import com.owncloud.android.operations.CreateFolderOperation
import com.owncloud.android.operations.RefreshFolderOperation
import com.owncloud.android.operations.common.SyncOperation
import com.owncloud.android.operations.e2e.E2EDeletionService
import com.owncloud.android.ui.dialog.setupEncryption.CertificateValidator
import com.owncloud.android.ui.dialog.setupEncryption.EncryptionKeyGenerator
import com.owncloud.android.utils.EncryptionUtils
import junit.framework.TestCase.assertEquals
import kotlinx.coroutines.runBlocking
import org.junit.After
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
@SinceServer(majorVersion = 30)
open class EncryptedFoldersIT : AbstractOnServerIT() {
companion object {
val FOLDER = "/encryptedFolder/"
val SUBFOLDER = "encryptedSubfolder/"
val KEYWORDS = arrayListOf(
"ability",
"able",
"about",
"above",
"absent",
"absorb",
"abstract",
"absurd",
"abuse",
"access",
"accident",
"account",
"accuse"
)
}
private var e2eeActionResolver: E2EEActionResolver
private var encryptionKeyGenerator: EncryptionKeyGenerator
init {
val accountManager: UserAccountManager = UserAccountManagerImpl.fromContext(targetContext)
val inspector = E2EEKeyInspector(
targetContext,
storageManager,
CertificateValidator(),
arbitraryDataProvider,
accountManager
)
e2eeActionResolver = E2EEActionResolver(
storageManager,
arbitraryDataProvider,
accountManager,
connectivityServiceMock,
inspector
)
encryptionKeyGenerator = EncryptionKeyGenerator(targetContext, user)
}
/**
* This test covers both encrypted folder creation and encryption of an existing (empty) folder,
* as they are basically the same action (folder creation + encryption), the only difference being
* the latter is executed manually by the user later.
*/
@Test
fun testCreateEncryptedFolder() {
createEncryptedFolder(FOLDER)
}
@Test
fun testCreateEncryptedSubfolder() {
val parent = createEncryptedFolder(FOLDER)
createEncryptedSubfolder(SUBFOLDER, parent)
}
@Test
fun testReadEncryptedFolder() {
val remotePath = FOLDER
val ocFile = createEncryptedFolder(remotePath)
val files = listEncryptedFolder(ocFile)
assertEquals(files.size, 0)
}
@Test
fun testReadEncryptedSubfolder() {
val parent = createEncryptedFolder(FOLDER)
val subOCFile = createEncryptedSubfolder(SUBFOLDER, parent)
val files = listEncryptedFolder(subOCFile)
assertEquals(files.size, 0)
}
@Test
fun testUnencryptFolder() {
// Create encrypted folder
val ocFile = createEncryptedFolder(FOLDER)
assertTrue(ocFile.isFolder && ocFile.isEncrypted)
// Unencrypt it
encryptFolder(ocFile, false)
assertFalse(ocFile.isEncrypted)
}
@Before
fun encryptionSetup() {
testOnlyOnServer(NextcloudVersion.nextcloud_30)
// Fetch capability
val capability = GetCapabilitiesRemoteOperation(null).execute(client).getResultData()
storageManager.saveCapabilities(capability)
// Check if server supports end2end capability
assertTrue(capability.endToEndEncryption.isTrue)
// Delete existing encryption key, if any
assertTrue(
E2EDeletionService(NetworkModule().clientFactory(targetContext)).deleteKeysAndFiles(user)
)
// Create new encryption key
val privateKey: EncryptionKeyGenerator.PrivateKeyResult = runBlocking {
encryptionKeyGenerator.generatePrivateKey(KEYWORDS)
}
// Check the key was generated
assertTrue(privateKey is EncryptionKeyGenerator.PrivateKeyResult.Success)
}
@After
fun encryptionCleanup() {
// Delete existing encryption key, if any
assertTrue(
E2EDeletionService(NetworkModule().clientFactory(targetContext)).deleteKeysAndFiles(user)
)
}
private fun createEncryptedFolder(remotePath: String): OCFile {
val created = CreateFolderOperation(remotePath, user, targetContext, storageManager).apply {
setEncrypt(true)
}.execute(client)
assertTrue(created.toString(), created.isSuccess)
val ocFile = storageManager.getFileByRemotePath(remotePath)
assertNotNull(ocFile)
encryptFolder(ocFile!!, true)
return ocFile
}
fun encryptFolder(ocFile: OCFile, encrypt: Boolean) {
val encrypted = ToggleEncryptionRemoteOperation(ocFile.localId, ocFile.remotePath, encrypt)
.execute(client)
assertTrue(encrypted.toString(), encrypted.isSuccess)
// The server forbids locking a folder that is no longer encrypted, so metadata is only uploaded when encrypting
if (encrypt) {
uploadFolderMetadata(ocFile)
}
// Set file encryption state locally
ocFile.isEncrypted = encrypt
assertTrue(storageManager.saveFile(ocFile))
}
private fun uploadFolderMetadata(ocFile: OCFile) {
val publicKey = arbitraryDataProvider.getValue(user, EncryptionUtils.PUBLIC_KEY)
val privateKey = arbitraryDataProvider.getValue(user, EncryptionUtils.PRIVATE_KEY)
val uploadedMetadata = encryptionKeyGenerator.uploadEncryptedFolderMetadata(
ocFile,
client,
publicKey,
privateKey,
storageManager,
arbitraryDataProvider
)
assertTrue(uploadedMetadata)
}
fun createEncryptedSubfolder(folderName: String, parent: OCFile): OCFile {
// An encrypted subfolder is a normal folder inside an encrypted one
assertTrue(parent.isFolder && parent.isEncrypted)
// Create folder
val path = parent.decryptedRemotePath + folderName
val syncOp: SyncOperation = CreateFolderOperation(
path,
user,
targetContext,
storageManager
)
val result = syncOp.execute(client)
assertTrue(result.toString(), result.isSuccess)
// Check folder exists
val ocFile = storageManager.getFileByRemotePath(path)
assertNotNull(ocFile)
assertTrue(ocFile!!.isFolder && ocFile.isEncrypted)
return ocFile
}
private fun listEncryptedFolder(ocFile: OCFile): List<FileEntity> {
assertNotNull(ocFile)
val parent = storageManager.getFileById(ocFile.parentId)
assertNotNull(parent)
// Refresh folder
val refreshResult = RefreshFolderOperation(
parent,
System.currentTimeMillis(),
false,
false,
storageManager,
user,
targetContext
).execute(client)
assertTrue(refreshResult.toString(), refreshResult.isSuccess)
// Check folder metadata
runBlocking {
assertTrue(e2eeActionResolver.checkFolderMetadataKey(ocFile))
}
// Open folder
return runBlocking {
storageManager.fileDao.getFolderContentSuspended(ocFile.fileId)
}
}
}
@@ -7,6 +7,7 @@
package com.owncloud.android
import android.Manifest
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
@@ -22,7 +23,8 @@ import androidx.test.rule.GrantPermissionRule
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.ui.activity.SettingsActivity
import com.owncloud.android.ui.activity.SyncedFoldersActivity
import com.owncloud.android.ui.navigation.NavigatorActivity
import com.owncloud.android.ui.navigation.NavigatorScreen
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Assert.assertTrue
import org.junit.BeforeClass
@@ -103,7 +105,8 @@ class ScreenshotsIT : AbstractIT() {
@Test
@ScreenshotTest
fun autoUploadScreenshot() {
launchActivity<SyncedFoldersActivity>().use {
val intent = NavigatorActivity.intent(targetContext, NavigatorScreen.AutoUpload)
ActivityScenario.launch<NavigatorActivity>(intent).use {
onView(isRoot()).check(matches(isDisplayed()))
Screengrab.screenshot("05_autoUpload")
assertTrue(true)
@@ -1,438 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.nextcloud.utils.PowerManagementFactory;
import com.nextcloud.client.device.PowerManagementService;
import com.nextcloud.client.jobs.upload.FileUploadWorker;
import com.nextcloud.client.network.ConnectivityManagerFactory;
import com.nextcloud.client.network.ConnectivityService;
import com.nextcloud.test.SinceServer;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.UploadsStorageManager;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.files.services.NameCollisionPolicy;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.files.model.GeoLocation;
import com.owncloud.android.lib.resources.files.model.ImageDimension;
import com.owncloud.android.lib.resources.status.NextcloudVersion;
import com.owncloud.android.operations.RefreshFolderOperation;
import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
/**
* Tests related to file uploads.
*/
public class UploadIT extends AbstractOnServerIT {
private static final String FOLDER = "/testUpload/";
private UploadsStorageManager uploadsStorageManager =
new UploadsStorageManager(UserAccountManagerImpl.fromContext(targetContext),
targetContext.getContentResolver());
private final PowerManagementService powerManagementServiceMock = PowerManagementFactory.getMock();
@Before
public void before() throws IOException {
// make sure that every file is available, even after tests that remove source file
createDummyFiles();
}
@Test
public void testEmptyUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "empty.txt",
account.name);
uploadOCUpload(ocUpload);
}
@Test
public void testNonEmptyUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
FOLDER + "nonEmpty.txt",
account.name);
uploadOCUpload(ocUpload);
}
@Test
public void testUploadWithCopy() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
FOLDER + "nonEmpty.txt",
account.name);
uploadOCUpload(ocUpload, FileUploadWorker.LOCAL_BEHAVIOUR_COPY);
File originalFile = new File(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt");
OCFile uploadedFile = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt");
assertTrue(originalFile.exists());
assertTrue(new File(uploadedFile.getStoragePath()).exists());
verifyStoragePath(uploadedFile);
}
@Test
public void testUploadWithMove() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
FOLDER + "nonEmpty.txt",
account.name);
uploadOCUpload(ocUpload, FileUploadWorker.LOCAL_BEHAVIOUR_MOVE);
File originalFile = new File(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt");
OCFile uploadedFile = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt");
assertFalse(originalFile.exists());
assertTrue(new File(uploadedFile.getStoragePath()).exists());
verifyStoragePath(uploadedFile);
}
@Test
public void testUploadWithForget() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
FOLDER + "nonEmpty.txt",
account.name);
uploadOCUpload(ocUpload, FileUploadWorker.LOCAL_BEHAVIOUR_FORGET);
File originalFile = new File(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt");
OCFile uploadedFile = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt");
assertTrue(originalFile.exists());
assertFalse(new File(uploadedFile.getStoragePath()).exists());
assertTrue(uploadedFile.getStoragePath().isEmpty());
}
@Test
public void testUploadWithDelete() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt",
FOLDER + "nonEmpty.txt",
account.name);
uploadOCUpload(ocUpload, FileUploadWorker.LOCAL_BEHAVIOUR_DELETE);
File originalFile = new File(FileStorageUtils.getTemporalPath(account.name) + "/nonEmpty.txt");
OCFile uploadedFile = fileDataStorageManager.getFileByDecryptedRemotePath(FOLDER + "nonEmpty.txt");
assertFalse(originalFile.exists());
assertFalse(new File(uploadedFile.getStoragePath()).exists());
assertTrue(uploadedFile.getStoragePath().isEmpty());
}
@Test
public void testChunkedUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/chunkedFile.txt",
FOLDER + "chunkedFile.txt", account.name);
uploadOCUpload(ocUpload);
}
@Test
public void testUploadInNonExistingFolder() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "2/3/4/1.txt", account.name);
uploadOCUpload(ocUpload);
}
@Test
public void testUploadOnChargingOnlyButNotCharging() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "notCharging.txt", account.name);
ocUpload.setWhileChargingOnly(true);
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
true,
getStorageManager()
);
newUpload.setRemoteFolderToBeCreated();
newUpload.addRenameUploadListener(() -> {
// dummy
});
RemoteOperationResult result = newUpload.execute(client);
assertFalse(result.toString(), result.isSuccess());
assertEquals(RemoteOperationResult.ResultCode.DELAYED_FOR_CHARGING, result.getCode());
}
@Test
public void testUploadOnChargingOnlyAndCharging() {
final var powerManagementServiceMock = PowerManagementFactory.getMockCharging();
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "charging.txt", account.name);
ocUpload.setWhileChargingOnly(true);
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
true,
getStorageManager()
);
newUpload.setRemoteFolderToBeCreated();
newUpload.addRenameUploadListener(() -> {
// dummy
});
RemoteOperationResult result = newUpload.execute(client);
assertTrue(result.toString(), result.isSuccess());
}
@Test
public void testUploadOnWifiOnlyButNoWifi() {
ConnectivityService connectivityServiceMock = ConnectivityManagerFactory.INSTANCE.getWifi();
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "noWifi.txt", account.name);
ocUpload.setUseWifiOnly(true);
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
true,
false,
getStorageManager()
);
newUpload.setRemoteFolderToBeCreated();
newUpload.addRenameUploadListener(() -> {
// dummy
});
RemoteOperationResult result = newUpload.execute(client);
assertFalse(result.toString(), result.isSuccess());
assertEquals(RemoteOperationResult.ResultCode.DELAYED_FOR_WIFI, result.getCode());
}
@Test
public void testUploadOnWifiOnlyAndWifi() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "wifi.txt", account.name);
ocUpload.setWhileChargingOnly(true);
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
true,
false,
getStorageManager()
);
newUpload.setRemoteFolderToBeCreated();
newUpload.addRenameUploadListener(() -> {
// dummy
});
RemoteOperationResult result = newUpload.execute(client);
assertTrue(result.toString(), result.isSuccess());
// cleanup
new RemoveFileOperation(getStorageManager().getFileByDecryptedRemotePath(FOLDER),
false,
user,
false,
targetContext,
getStorageManager())
.execute(client);
}
@Test
public void testUploadOnWifiOnlyButMeteredWifi() {
ConnectivityService connectivityServiceMock = ConnectivityManagerFactory.INSTANCE.getMetered();
OCUpload ocUpload = new OCUpload(FileStorageUtils.getTemporalPath(account.name) + "/empty.txt",
FOLDER + "noWifi.txt",
account.name);
ocUpload.setUseWifiOnly(true);
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
true,
false,
getStorageManager()
);
newUpload.setRemoteFolderToBeCreated();
newUpload.addRenameUploadListener(() -> {
// dummy
});
RemoteOperationResult result = newUpload.execute(client);
assertFalse(result.toString(), result.isSuccess());
assertEquals(RemoteOperationResult.ResultCode.DELAYED_FOR_WIFI, result.getCode());
}
@Test
@SinceServer(majorVersion = 27)
public void testCreationAndUploadTimestamp() throws IOException, AccountUtils.AccountNotFoundException {
testOnlyOnServer(NextcloudVersion.nextcloud_27);
File file = getDummyFile("empty.txt");
String remotePath = "/testFile.txt";
OCUpload ocUpload = new OCUpload(file.getAbsolutePath(), remotePath, account.name);
assertTrue(
new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false,
getStorageManager()
)
.setRemoteFolderToBeCreated()
.execute(client)
.isSuccess()
);
long creationTimestamp = Files.readAttributes(file.toPath(), BasicFileAttributes.class)
.creationTime()
.to(TimeUnit.SECONDS);
long uploadTimestamp = System.currentTimeMillis() / 1000;
// RefreshFolderOperation
assertTrue(new RefreshFolderOperation(getStorageManager().getFileByDecryptedRemotePath("/"),
System.currentTimeMillis() / 1000,
false,
false,
getStorageManager(),
user,
targetContext).execute(client).isSuccess());
List<OCFile> files = getStorageManager().getFolderContent(getStorageManager().getFileByDecryptedRemotePath("/"),
false);
OCFile ocFile = files.get(0);
assertEquals(remotePath, ocFile.getRemotePath());
assertEquals(creationTimestamp, ocFile.getCreationTimestamp());
assertTrue(uploadTimestamp - 10 < ocFile.getUploadTimestamp() &&
uploadTimestamp + 10 > ocFile.getUploadTimestamp());
}
@Test
@SinceServer(majorVersion = 27)
public void testMetadata() throws IOException, AccountUtils.AccountNotFoundException {
testOnlyOnServer(NextcloudVersion.nextcloud_27);
File file = getFile("gps.jpg");
String remotePath = "/metadata.jpg";
OCUpload ocUpload = new OCUpload(file.getAbsolutePath(), remotePath, account.name);
assertTrue(
new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false,
getStorageManager()
)
.setRemoteFolderToBeCreated()
.execute(client)
.isSuccess()
);
// RefreshFolderOperation
assertTrue(new RefreshFolderOperation(getStorageManager().getFileByDecryptedRemotePath("/"),
System.currentTimeMillis() / 1000,
false,
false,
getStorageManager(),
user,
targetContext).execute(client).isSuccess());
List<OCFile> files = getStorageManager().getFolderContent(getStorageManager().getFileByDecryptedRemotePath("/"),
false);
OCFile ocFile = null;
for (OCFile f : files) {
if ("metadata.jpg".equals(f.getFileName())) {
ocFile = f;
break;
}
}
assertNotNull(ocFile);
assertEquals(remotePath, ocFile.getRemotePath());
assertEquals(new GeoLocation(64, -46), ocFile.getGeoLocation());
assertEquals(new ImageDimension(300f, 200f), ocFile.getImageDimension());
}
private void verifyStoragePath(OCFile file) {
assertEquals(FileStorageUtils.getSavePath(account.name) + FOLDER + file.getDecryptedFileName(),
file.getStoragePath());
}
}
@@ -0,0 +1,298 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.client.device.PowerManagementService
import com.nextcloud.client.jobs.upload.FileUploadWorker
import com.nextcloud.client.network.ConnectivityManagerFactory
import com.nextcloud.client.network.ConnectivityService
import com.nextcloud.test.SinceServer
import com.nextcloud.utils.PowerManagementFactory
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.datamodel.UploadsStorageManager
import com.owncloud.android.db.OCUpload
import com.owncloud.android.files.services.NameCollisionPolicy
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode
import com.owncloud.android.lib.resources.files.model.GeoLocation
import com.owncloud.android.lib.resources.files.model.ImageDimension
import com.owncloud.android.lib.resources.status.NextcloudVersion
import com.owncloud.android.operations.RefreshFolderOperation
import com.owncloud.android.operations.RemoveFileOperation
import com.owncloud.android.operations.UploadFileOperation
import com.owncloud.android.utils.FileStorageUtils
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import java.io.File
import java.nio.file.Files
import java.nio.file.attribute.BasicFileAttributes
import java.util.concurrent.TimeUnit
import kotlin.math.abs
@Suppress("DEPRECATION")
class UploadIT : AbstractOnServerIT() {
private val uploadsStorageManager = UploadsStorageManager(
UserAccountManagerImpl.fromContext(targetContext),
targetContext.contentResolver
)
private val powerManagementServiceMock = PowerManagementFactory.mock
@Before
fun before() {
createDummyFiles()
}
@Test
fun testEmptyUpload() {
uploadOCUpload(ocUpload(EMPTY_FILE, "$FOLDER$EMPTY_FILE"))
}
@Test
fun testNonEmptyUpload() {
uploadOCUpload(ocUpload(NON_EMPTY_FILE, "$FOLDER$NON_EMPTY_FILE"))
}
@Test
fun testUploadWithCopy() {
uploadOCUpload(nonEmptyUpload(), FileUploadWorker.LOCAL_BEHAVIOUR_COPY)
val uploadedFile = uploadedNonEmptyFile()
assertTrue(temporalFile(NON_EMPTY_FILE).exists())
assertTrue(File(uploadedFile.storagePath).exists())
verifyStoragePath(uploadedFile)
}
@Test
fun testUploadWithMove() {
uploadOCUpload(nonEmptyUpload(), FileUploadWorker.LOCAL_BEHAVIOUR_MOVE)
val uploadedFile = uploadedNonEmptyFile()
assertFalse(temporalFile(NON_EMPTY_FILE).exists())
assertTrue(File(uploadedFile.storagePath).exists())
verifyStoragePath(uploadedFile)
}
@Test
fun testUploadWithForget() {
uploadOCUpload(nonEmptyUpload(), FileUploadWorker.LOCAL_BEHAVIOUR_FORGET)
val uploadedFile = uploadedNonEmptyFile()
assertTrue(temporalFile(NON_EMPTY_FILE).exists())
assertFalse(File(uploadedFile.storagePath).exists())
assertTrue(uploadedFile.storagePath.isEmpty())
}
@Test
fun testUploadWithDelete() {
uploadOCUpload(nonEmptyUpload(), FileUploadWorker.LOCAL_BEHAVIOUR_DELETE)
val uploadedFile = uploadedNonEmptyFile()
assertFalse(temporalFile(NON_EMPTY_FILE).exists())
assertFalse(File(uploadedFile.storagePath).exists())
assertTrue(uploadedFile.storagePath.isEmpty())
}
@Test
fun testChunkedUpload() {
uploadOCUpload(ocUpload(CHUNKED_FILE, "$FOLDER$CHUNKED_FILE"))
}
@Test
fun testUploadInNonExistingFolder() {
uploadOCUpload(ocUpload(EMPTY_FILE, "${FOLDER}2/3/4/1.txt"))
}
@Test
fun testUploadOnChargingOnlyButNotCharging() {
val upload = ocUpload(EMPTY_FILE, "${FOLDER}notCharging.txt").apply { isWhileChargingOnly = true }
val result = uploadOperation(upload, whileChargingOnly = true).execute(client)
assertFalse(result.toString(), result.isSuccess)
assertEquals(ResultCode.DELAYED_FOR_CHARGING, result.code)
}
@Test
fun testUploadOnChargingOnlyAndCharging() {
val upload = ocUpload(EMPTY_FILE, "${FOLDER}charging.txt").apply { isWhileChargingOnly = true }
val result = uploadOperation(
upload,
powerManagementService = PowerManagementFactory.mockCharging,
whileChargingOnly = true
).execute(client)
assertTrue(result.toString(), result.isSuccess)
}
@Test
fun testUploadOnWifiOnlyButNoWifi() {
val upload = ocUpload(EMPTY_FILE, "${FOLDER}noWifi.txt").apply { isUseWifiOnly = true }
val result = uploadOperation(
upload,
connectivityService = ConnectivityManagerFactory.wifi,
onWifiOnly = true
).execute(client)
assertFalse(result.toString(), result.isSuccess)
assertEquals(ResultCode.DELAYED_FOR_WIFI, result.code)
}
@Test
fun testUploadOnWifiOnlyAndWifi() {
val upload = ocUpload(EMPTY_FILE, "${FOLDER}wifi.txt").apply { isWhileChargingOnly = true }
val result = uploadOperation(upload, onWifiOnly = true).execute(client)
assertTrue(result.toString(), result.isSuccess)
removeTestFolder()
}
@Test
fun testUploadOnWifiOnlyButMeteredWifi() {
val upload = ocUpload(EMPTY_FILE, "${FOLDER}noWifi.txt").apply { isUseWifiOnly = true }
val result = uploadOperation(
upload,
connectivityService = ConnectivityManagerFactory.metered,
onWifiOnly = true
).execute(client)
assertFalse(result.toString(), result.isSuccess)
assertEquals(ResultCode.DELAYED_FOR_WIFI, result.code)
}
@Test
@SinceServer(majorVersion = 27)
fun testCreationAndUploadTimestamp() {
testOnlyOnServer(NextcloudVersion.nextcloud_27)
val file = getDummyFile(EMPTY_FILE)
val remotePath = "/testFile.txt"
assertTrue(uploadOperation(OCUpload(file.absolutePath, remotePath, account.name)).execute(client).isSuccess)
val creationTimestamp = Files.readAttributes(file.toPath(), BasicFileAttributes::class.java)
.creationTime()
.to(TimeUnit.SECONDS)
val uploadTimestamp = nowInSeconds()
val ocFile = refreshRootAndGetContent().first()
assertEquals(remotePath, ocFile.remotePath)
assertEquals(creationTimestamp, ocFile.creationTimestamp)
assertTrue(abs(ocFile.uploadTimestamp - uploadTimestamp) < UPLOAD_TIMESTAMP_TOLERANCE_SECONDS)
}
@Test
@SinceServer(majorVersion = 27)
fun testMetadata() {
testOnlyOnServer(NextcloudVersion.nextcloud_27)
val file = getFile("gps.jpg")
val remotePath = "/$METADATA_FILE"
assertTrue(uploadOperation(OCUpload(file.absolutePath, remotePath, account.name)).execute(client).isSuccess)
val ocFile = checkNotNull(refreshRootAndGetContent().find { it.fileName == METADATA_FILE }) {
"$METADATA_FILE not found in root folder"
}
assertEquals(remotePath, ocFile.remotePath)
assertEquals(GeoLocation(EXPECTED_LATITUDE, EXPECTED_LONGITUDE), ocFile.geoLocation)
assertEquals(ImageDimension(EXPECTED_WIDTH, EXPECTED_HEIGHT), ocFile.imageDimension)
}
private fun uploadOperation(
upload: OCUpload,
connectivityService: ConnectivityService = connectivityServiceMock,
powerManagementService: PowerManagementService = powerManagementServiceMock,
onWifiOnly: Boolean = false,
whileChargingOnly: Boolean = false
): UploadFileOperation = UploadFileOperation(
uploadsStorageManager,
connectivityService,
powerManagementService,
user,
null,
upload,
NameCollisionPolicy.DEFAULT,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
onWifiOnly,
whileChargingOnly,
storageManager
).apply {
setRemoteFolderToBeCreated()
addRenameUploadListener {}
}
private fun refreshRootAndGetContent(): List<OCFile> {
val refreshResult = RefreshFolderOperation(
storageManager.getFileByDecryptedRemotePath(OCFile.ROOT_PATH),
nowInSeconds(),
false,
false,
storageManager,
user,
targetContext
).execute(client)
assertTrue(refreshResult.isSuccess)
return storageManager.getFolderContent(storageManager.getFileByDecryptedRemotePath(OCFile.ROOT_PATH), false)
}
private fun removeTestFolder() {
val folder = checkNotNull(storageManager.getFileByDecryptedRemotePath(FOLDER)) { "$FOLDER not found" }
RemoveFileOperation(folder, false, user, false, targetContext, storageManager).execute(client)
}
private fun temporalPath(name: String) = "${FileStorageUtils.getTemporalPath(account.name)}/$name"
private fun temporalFile(name: String) = File(temporalPath(name))
private fun ocUpload(localName: String, remotePath: String) =
OCUpload(temporalPath(localName), remotePath, account.name)
private fun nonEmptyUpload() = ocUpload(NON_EMPTY_FILE, "$FOLDER$NON_EMPTY_FILE")
private fun uploadedNonEmptyFile(): OCFile =
checkNotNull(storageManager.getFileByDecryptedRemotePath("$FOLDER$NON_EMPTY_FILE")) {
"$FOLDER$NON_EMPTY_FILE not found"
}
private fun nowInSeconds() = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())
private fun verifyStoragePath(file: OCFile) {
assertEquals(
FileStorageUtils.getSavePath(account.name) + FOLDER + file.decryptedFileName,
file.storagePath
)
}
companion object {
private const val FOLDER = "/testUpload/"
private const val EMPTY_FILE = "empty.txt"
private const val NON_EMPTY_FILE = "nonEmpty.txt"
private const val CHUNKED_FILE = "chunkedFile.txt"
private const val METADATA_FILE = "metadata.jpg"
private const val UPLOAD_TIMESTAMP_TOLERANCE_SECONDS = 10
private const val EXPECTED_LATITUDE = 64.0
private const val EXPECTED_LONGITUDE = -46.0
private const val EXPECTED_WIDTH = 300f
private const val EXPECTED_HEIGHT = 200f
}
}
@@ -18,7 +18,6 @@ class AuthenticatorActivityIT {
}
@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch() {
val color = try {
Color.parseColor("1")
@@ -30,7 +29,6 @@ class AuthenticatorActivityIT {
}
@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch2() {
val color = try {
Color.parseColor("")
@@ -42,7 +40,6 @@ class AuthenticatorActivityIT {
}
@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch3() {
val color = try {
Color.parseColor(null)
@@ -54,7 +51,6 @@ class AuthenticatorActivityIT {
}
@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch4() {
val color = try {
Color.parseColor("abc")
@@ -7,10 +7,15 @@
*/
package com.owncloud.android.datamodel;
import android.util.Pair;
import com.nextcloud.utils.extensions.FileDataStorageManagerExtensionsKt;
import com.owncloud.android.db.ProviderMeta;
import org.junit.Test;
import java.util.Arrays;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -44,4 +49,30 @@ public class FileDataStorageManagerContentProviderClientIT extends FileDataStora
assertEquals(file.getRemotePath(), read.getRemotePath());
}
@Test
public void testGenerateFileNameForConflictResolution() {
final var names = Arrays.asList(
// Files
new Pair<>("hello", "hello (1)"),
new Pair<>("hello.txt", "hello (1).txt"),
new Pair<>("hello (1).txt", "hello (2).txt"),
new Pair<>("hello (18y5).txt", "hello (18y5) (1).txt"),
new Pair<>("hello (hey)", "hello (hey) (1)"),
new Pair<>("hello (hey).txt", "hello (hey) (1).txt"),
new Pair<>(".hello", ".hello (1)"),
// Folders
new Pair<>("hello/", "hello (1)/"),
new Pair<>("hello (1)/", "hello (2)/"),
new Pair<>("hello.hello/", "hello.hello (1)/"),
new Pair<>("hello.hello (y)/", "hello.hello (y) (1)/"),
new Pair<>(".hello/", ".hello (1)/")
);
for (final var name: names) {
String gen = FileDataStorageManagerExtensionsKt.generateFileNameForConflictResolution(name.first);
assertEquals(gen, name.second);
}
}
}
@@ -7,6 +7,7 @@
*/
package com.owncloud.android.datamodel
import com.nextcloud.utils.extensions.saveFolder
import org.junit.Assert
import org.junit.Test
@@ -41,7 +42,7 @@ class FileDataStorageManagerContentResolverIT : FileDataStorageManagerIT() {
val storedFile = sut.getFileByDecryptedRemotePath("/folderA/file$it")
Assert.assertNotNull(storedFile)
storedFile
requireNotNull(storedFile)
}
// save files in folder
@@ -50,10 +50,11 @@ abstract public class FileDataStorageManagerIT extends AbstractOnServerIT {
// make sure everything is removed
sut.deleteAllFiles();
sut.deleteVirtuals(VirtualFolderType.GALLERY);
assertEquals(0, sut.getAllFiles().size());
capability = new GetCapabilitiesRemoteOperation(null).execute(client).getResultData();
final var result = new GetCapabilitiesRemoteOperation(null)
.execute(client);
assertTrue(result.isSuccess());
capability = result.getResultData();
}
@After
@@ -352,5 +353,4 @@ abstract public class FileDataStorageManagerIT extends AbstractOnServerIT {
assertEquals(capability.getUserStatus(), newCapability.getUserStatus());
}
}
@@ -10,7 +10,6 @@ package com.owncloud.android.files
import androidx.test.core.app.launchActivity
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.nextcloud.client.account.User
import com.nextcloud.client.jobs.download.FileDownloadWorker
import com.nextcloud.client.jobs.upload.FileUploadHelper
import com.nextcloud.test.TestActivity
import com.nextcloud.utils.EditorUtils
@@ -48,9 +47,6 @@ class FileMenuFilterIT : AbstractIT() {
@MockK
private lateinit var mockFileUploaderBinder: FileUploadHelper
@MockK
private lateinit var mockFileDownloadProgressListener: FileDownloadWorker.FileDownloadProgressListener
@MockK
private lateinit var mockOperationsServiceBinder: OperationsService.OperationsServiceBinder
@@ -64,7 +60,6 @@ class FileMenuFilterIT : AbstractIT() {
MockKAnnotations.init(this)
every { mockFileUploaderBinder.isUploading(any(), any()) } returns false
every { mockComponentsGetter.fileUploaderHelper } returns mockFileUploaderBinder
every { mockComponentsGetter.fileDownloadProgressListener } returns mockFileDownloadProgressListener
every { mockOperationsServiceBinder.isSynchronizing(any(), any()) } returns false
every { mockComponentsGetter.operationsServiceBinder } returns mockOperationsServiceBinder
every { mockStorageManager.getFileById(any()) } returns OCFile("/")
@@ -10,9 +10,12 @@
package com.owncloud.android.files.services
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.utils.PowerManagementFactory
import com.nextcloud.client.jobs.upload.FileUploadWorker
import com.nextcloud.utils.PowerManagementFactory
import com.nextcloud.utils.extensions.getRemotePathForConflictResolution
import com.nextcloud.utils.extensions.isTheSameAs
import com.owncloud.android.AbstractOnServerIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.datamodel.UploadsStorageManager
import com.owncloud.android.db.OCUpload
import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation
@@ -106,19 +109,71 @@ class FileUploaderIT : AbstractOnServerIT() {
assertRemoteFileLength(REMOTE_PATH, originalFile.length())
}
@Test
fun uploadAndCheckFileIsTheSame() {
val filename = NON_EMPTY_FILE
val remotePath = OCFile.PATH_SEPARATOR + filename
// Upload file
val originalFile = getDummyFile(filename)
val operation = uploadOperation(
originalFile,
NameCollisionPolicy.DEFAULT,
remotePath
).setRemoteFolderToBeCreated()
assertTrue(operation.execute(client).isSuccess)
// Check file metadata against remote one
val ocFile = storageManager.getFileByRemotePath(remotePath)
assertTrue(ocFile.isTheSameAs(originalFile))
}
@Test
fun uploadAndCheckFileIsNotTheSame() {
val filename = NON_EMPTY_FILE
// Upload file
val originalFile = getDummyFile(filename)
val operation = uploadOperation(
originalFile,
NameCollisionPolicy.DEFAULT
).setRemoteFolderToBeCreated()
assertTrue(operation.execute(client).isSuccess)
// Check file metadata against remote one
val ocFile = storageManager.getFileByRemotePath(REMOTE_PATH)
assertFalse(ocFile.isTheSameAs(originalFile))
}
@Test
fun uploadAndCheckConflictingName() {
val originalFile = getDummyFile(EMPTY_FILE)
uploadOriginalFile(originalFile)
val newPath = getRemotePathForConflictResolution(
client,
OCFile.PATH_SEPARATOR,
REMOTE_FILE
)
assertEquals(newPath, "${OCFile.PATH_SEPARATOR}$REMOTE_FILE_NAME (1).$REMOTE_FILE_EXTENSION")
}
private fun uploadOriginalFile(originalFile: File) {
val operation = uploadOperation(originalFile, NameCollisionPolicy.DEFAULT).setRemoteFolderToBeCreated()
assertTrue(operation.execute(client).isSuccess)
assertRemoteFileLength(REMOTE_PATH, originalFile.length())
}
private fun uploadOperation(localFile: File, nameCollisionPolicy: NameCollisionPolicy) = UploadFileOperation(
private fun uploadOperation(
localFile: File,
nameCollisionPolicy: NameCollisionPolicy,
remotePath: String = REMOTE_PATH
) = UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
OCUpload(localFile.absolutePath, REMOTE_PATH, account.name),
OCUpload(localFile.absolutePath, remotePath, account.name),
nameCollisionPolicy,
FileUploadWorker.LOCAL_BEHAVIOUR_COPY,
targetContext,
@@ -134,7 +189,10 @@ class FileUploaderIT : AbstractOnServerIT() {
}
companion object {
private const val REMOTE_PATH = "/testFile.txt"
private const val REMOTE_FILE_NAME = "testFile"
private const val REMOTE_FILE_EXTENSION = "txt"
private const val REMOTE_FILE = "$REMOTE_FILE_NAME.$REMOTE_FILE_EXTENSION"
private const val REMOTE_PATH = "${OCFile.PATH_SEPARATOR}$REMOTE_FILE"
private const val REMOTE_PATH_RENAMED = "/testFile (2).txt"
private const val CHUNKED_FILE = "chunkedFile.txt"
private const val NON_EMPTY_FILE = "nonEmpty.txt"
@@ -0,0 +1,88 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.operations
import com.owncloud.android.AbstractOnServerIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.common.operations.RemoteOperationResult
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation
import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation
import com.owncloud.android.lib.resources.files.UploadFileRemoteOperation
import com.owncloud.android.lib.resources.files.model.RemoteFile
import org.junit.Assert.assertTrue
import java.io.File
@Suppress("DEPRECATION")
abstract class AbstractInternalTwoWaySyncIT : AbstractOnServerIT() {
companion object {
const val TWO_WAY_SYNC_ENABLED = 0L
const val BINARY_MIME_TYPE = "application/octet-stream"
const val MILLIS_IN_SECOND = 1000
const val POLL_ATTEMPTS = 10
const val SMALL_DUMMY_FILE = "nonEmpty.txt"
const val LARGE_DUMMY_FILE = "chunkedFile.txt"
const val FILE_NAME = "file.bin"
}
protected fun sync(remotePath: String): RemoteOperationResult<*> =
SynchronizeFolderOperation(targetContext, remotePath, user, storageManager, false, true)
.execute(targetContext)
protected fun syncAndAssertSuccess(remotePath: String) = assertTrue(sync(remotePath).isSuccess)
protected fun setUpTwoWaySyncFolder(remotePath: String): OCFile {
createFolder(remotePath)
syncAndAssertSuccess(remotePath)
return storageManager.getFileByPath(remotePath).apply {
internalFolderSyncTimestamp = TWO_WAY_SYNC_ENABLED
storageManager.saveFile(this)
}
}
protected fun setUpTwoWaySyncFolderWithFile(remotePath: String): OCFile = setUpTwoWaySyncFolder(remotePath).also {
uploadFile(getDummyFile(SMALL_DUMMY_FILE), it.childPath(FILE_NAME))
syncAndAssertSuccess(it.remotePath)
}
protected fun uploadDirectlyToServer(localFile: File, remotePath: String) {
val modificationTimestamp = System.currentTimeMillis() / MILLIS_IN_SECOND
val result = UploadFileRemoteOperation(
localFile.absolutePath,
remotePath,
BINARY_MIME_TYPE,
modificationTimestamp
).execute(client)
assertTrue(result.isSuccess)
}
protected fun existsOnServer(remotePath: String): Boolean =
ExistenceCheckRemoteOperation(remotePath, false).execute(client).isSuccess
protected fun serverEtagOf(remotePath: String): String? = ReadFileRemoteOperation(remotePath)
.execute(client)
.takeIf { it.isSuccess }
?.let { (it.data.first() as RemoteFile).etag }
protected fun waitUntil(condition: () -> Boolean): Boolean = (1..POLL_ATTEMPTS).any {
val fulfilled = condition()
if (!fulfilled) {
shortSleep()
}
fulfilled
}
protected fun waitUntilServerEtagChanges(remotePath: String, previousEtag: String): Boolean = waitUntil {
serverEtagOf(remotePath)?.let { etag -> etag != previousEtag } == true
}
protected fun OCFile.childPath(name: String): String = remotePath + name
protected fun OCFile.childFolderPath(name: String): String = remotePath + name + OCFile.PATH_SEPARATOR
}
@@ -12,8 +12,9 @@ import com.owncloud.android.lib.resources.e2ee.DeleteEncryptedFilesRemoteOperati
import com.owncloud.android.lib.resources.users.DeletePrivateKeyRemoteOperation
import com.owncloud.android.lib.resources.users.DeletePublicKeyRemoteOperation
import com.owncloud.android.lib.resources.users.GetPrivateKeyRemoteOperation
import com.owncloud.android.lib.resources.users.GetPublicKeyRemoteOperation
import com.owncloud.android.lib.resources.users.GetCertificateRemoteOperation
import com.owncloud.android.lib.resources.users.StorePrivateKeyRemoteOperation
import com.owncloud.android.ui.dialog.setupEncryption.EncryptionKeyGenerator
import com.owncloud.android.utils.EncryptionUtils
import com.owncloud.android.utils.crypto.CryptoHelper
import org.junit.Assert.assertFalse
@@ -31,7 +32,7 @@ class DeleteE2ERemoteOperationIT : AbstractOnServerIT() {
@Test
fun testDeletePrivateKey() {
val keyPair = EncryptionUtils.generateKeyPair()
val keyPair = EncryptionKeyGenerator.generateKeyPair()
val privateKey = keyPair.private
val keyPhrase = "moreovertelevisionfactorytendencyindependenceinternationalintellectualimpress" +
"interestvolunteer"
@@ -57,7 +58,7 @@ class DeleteE2ERemoteOperationIT : AbstractOnServerIT() {
val result = sut.execute(nextcloudClient)
assertTrue(result.isSuccess)
val getResult = GetPublicKeyRemoteOperation().execute(nextcloudClient)
val getResult = GetCertificateRemoteOperation().execute(nextcloudClient)
assertFalse(getResult.isSuccess)
}
}
@@ -0,0 +1,188 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.operations
import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
import java.io.File
@Suppress("DEPRECATION")
class InternalTwoWaySyncIT : AbstractInternalTwoWaySyncIT() {
companion object {
private const val NESTED_FILE_NAME = "nested.bin"
private const val SUB_FOLDER_NAME = "sub"
}
@Test
fun testWhenLocalFileCreatedGivenShouldUploadToServer() {
val folder = setUpTwoWaySyncFolder("/twoWaySyncLocalCreateFile/")
File(folder.storagePath, FILE_NAME).writeText("hello")
syncAndAssertSuccess(folder.remotePath)
val uploaded = storageManager.getFileByPath(folder.childPath(FILE_NAME))
assertNotNull(uploaded)
assertTrue(File(uploaded.storagePath).exists())
assertTrue(existsOnServer(folder.childPath(FILE_NAME)))
}
@Test
fun testWhenLocalFolderWithContentsCreatedGivenShouldCreateFolderAndUploadContents() {
val folder = setUpTwoWaySyncFolder("/twoWaySyncLocalCreateFolder/")
val subFolder = File(folder.storagePath, SUB_FOLDER_NAME).apply { mkdir() }
File(subFolder, NESTED_FILE_NAME).writeText("nested")
syncAndAssertSuccess(folder.remotePath)
val remoteSubFolder = storageManager.getFileByPath(folder.childFolderPath(SUB_FOLDER_NAME))
assertNotNull(remoteSubFolder)
assertTrue(remoteSubFolder.isFolder)
val nested = storageManager.getFileByPath(remoteSubFolder.childPath(NESTED_FILE_NAME))
assertNotNull(nested)
assertTrue(File(nested.storagePath).exists())
}
@Test
fun testWhenLocalFileUpdatedGivenShouldUploadNewVersion() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncLocalUpdate/")
val before = storageManager.getFileByPath(folder.childPath(FILE_NAME))
shortSleep()
File(before.storagePath).writeText("updated by test")
syncAndAssertSuccess(folder.remotePath)
assertTrue(
"Locally modified file was not uploaded within timeout",
waitUntilServerEtagChanges(folder.childPath(FILE_NAME), before.etag)
)
}
@Test
fun testWhenLocalFileDeletedGivenShouldRemoveFromServer() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncLocalDelete/")
val file = storageManager.getFileByPath(folder.childPath(FILE_NAME))
assertTrue(File(file.storagePath).delete())
syncAndAssertSuccess(folder.remotePath)
assertNull(storageManager.getFileByPath(folder.childPath(FILE_NAME)))
assertFalse(existsOnServer(folder.childPath(FILE_NAME)))
}
@Test
fun testWhenRemoteFileCreatedGivenShouldDownload() {
val folder = setUpTwoWaySyncFolder("/twoWaySyncRemoteCreateFile/")
uploadDirectlyToServer(getDummyFile(SMALL_DUMMY_FILE), folder.childPath(FILE_NAME))
syncAndAssertSuccess(folder.remotePath)
val downloaded = storageManager.getFileByPath(folder.childPath(FILE_NAME))
assertNotNull(downloaded)
assertTrue(File(downloaded.storagePath).exists())
}
@Test
fun testWhenRemoteFolderWithContentsCreatedGivenShouldDownloadFolderAndContents() {
val folder = setUpTwoWaySyncFolder("/twoWaySyncRemoteCreateFolder/")
val subFolderPath = folder.childFolderPath(SUB_FOLDER_NAME)
assertTrue(CreateFolderRemoteOperation(subFolderPath, true).execute(client).isSuccess)
uploadDirectlyToServer(getDummyFile(SMALL_DUMMY_FILE), subFolderPath + NESTED_FILE_NAME)
syncAndAssertSuccess(folder.remotePath)
val remoteSubFolder = storageManager.getFileByPath(subFolderPath)
assertNotNull(remoteSubFolder)
assertTrue(remoteSubFolder.isFolder)
syncAndAssertSuccess(subFolderPath)
val nested = storageManager.getFileByPath(subFolderPath + NESTED_FILE_NAME)
assertNotNull(nested)
assertTrue(File(nested.storagePath).exists())
}
@Test
fun testWhenRemoteFileUpdatedGivenShouldDownloadNewVersion() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncRemoteUpdate/")
val before = storageManager.getFileByPath(folder.childPath(FILE_NAME))
val newVersion = getDummyFile(LARGE_DUMMY_FILE)
uploadDirectlyToServer(newVersion, folder.childPath(FILE_NAME))
syncAndAssertSuccess(folder.remotePath)
val after = storageManager.getFileByPath(folder.childPath(FILE_NAME))
assertNotEquals(before.etag, after.etag)
assertEquals(newVersion.length(), File(after.storagePath).length())
}
@Test
fun testWhenRemoteFileDeletedGivenShouldRemoveLocally() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncRemoteDeleteFile/")
val localFile = File(storageManager.getFileByPath(folder.childPath(FILE_NAME)).storagePath)
assertTrue(localFile.exists())
assertTrue(RemoveFileRemoteOperation(folder.childPath(FILE_NAME)).execute(client).isSuccess)
syncAndAssertSuccess(folder.remotePath)
assertNull(storageManager.getFileByPath(folder.childPath(FILE_NAME)))
assertFalse(localFile.exists())
}
@Test
fun testWhenRemoteFolderWithContentsDeletedGivenShouldRemoveLocally() {
val folder = setUpTwoWaySyncFolder("/twoWaySyncRemoteDeleteFolder/")
val subFolderPath = folder.childFolderPath(SUB_FOLDER_NAME)
val subFolder = File(folder.storagePath, SUB_FOLDER_NAME).apply { mkdir() }
File(subFolder, NESTED_FILE_NAME).writeText("nested")
syncAndAssertSuccess(folder.remotePath)
assertNotNull(storageManager.getFileByPath(subFolderPath))
assertTrue(RemoveFileRemoteOperation(subFolderPath).execute(client).isSuccess)
syncAndAssertSuccess(folder.remotePath)
assertNull(storageManager.getFileByPath(subFolderPath))
assertFalse(subFolder.exists())
}
@Test
fun testWhenBothSidesChangedGivenShouldMarkConflict() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncConflict/")
val before = storageManager.getFileByPath(folder.childPath(FILE_NAME))
shortSleep()
File(before.storagePath).writeText("local edit")
uploadDirectlyToServer(getDummyFile(LARGE_DUMMY_FILE), folder.childPath(FILE_NAME))
sync(folder.remotePath)
val after = storageManager.getFileByPath(folder.childPath(FILE_NAME))
assertNotNull("Concurrently changed file should have been flagged as conflicting", after.etagInConflict)
}
@Test
fun testWhenNoChangesGivenShouldSecondSyncNotWork() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncNoop/")
val before = storageManager.getFileByPath(folder.childPath(FILE_NAME))
syncAndAssertSuccess(folder.remotePath)
val after = storageManager.getFileByPath(folder.childPath(FILE_NAME))
assertEquals(before.etag, after.etag)
assertEquals(before.fileId, after.fileId)
}
}
@@ -0,0 +1,84 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.operations
import android.media.MediaScannerConnection
import android.net.Uri
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test
import java.io.File
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicReference
class InternalTwoWaySyncLocalEditIT : AbstractInternalTwoWaySyncIT() {
companion object {
private const val IMAGE_ASSET = "image.jpg"
private const val IMAGE_NAME = "edited.jpg"
private const val MEDIA_SCAN_TIMEOUT_SECONDS = 10L
private val EDITED_BYTES = byteArrayOf(0, 1, 2, 3)
}
@Test
fun testWhenLocalImageEditedGivenShouldKeepLocalAndServerCopyAcrossSyncs() {
val folder = setUpTwoWaySyncFolder("/twoWaySyncEditedImage/")
val localImage = File(folder.storagePath, IMAGE_NAME)
getFile(IMAGE_ASSET).copyTo(localImage)
syncAndAssertSuccess(folder.remotePath)
val before = storageManager.getFileByPath(folder.childPath(IMAGE_NAME))
assertNotNull(before)
assertEquals(localImage, File(before.storagePath))
scanIntoMediaStore(localImage)
shortSleep()
localImage.appendBytes(EDITED_BYTES)
syncAndAssertSuccess(folder.remotePath)
assertTrue(
"Edited image was not uploaded within timeout",
waitUntil { storageManager.getFileByPath(folder.childPath(IMAGE_NAME))?.etag != before.etag }
)
assertTrue("Edited image was removed locally after upload", localImage.exists())
syncAndAssertSuccess(folder.remotePath)
assertTrue("Edited image was removed locally after next sync", localImage.exists())
assertTrue("Edited image was removed from server after next sync", existsOnServer(before.remotePath))
}
@Test
fun testWhenLocalFileMissingAndServerChangedGivenShouldDownloadInsteadOfDeletingOnServer() {
val folder = setUpTwoWaySyncFolderWithFile("/twoWaySyncMissingLocallyChangedOnServer/")
val localFile = File(storageManager.getFileByPath(folder.childPath(FILE_NAME)).storagePath)
assertTrue(localFile.delete())
val newVersion = getDummyFile(LARGE_DUMMY_FILE)
uploadDirectlyToServer(newVersion, folder.childPath(FILE_NAME))
syncAndAssertSuccess(folder.remotePath)
assertTrue(existsOnServer(folder.childPath(FILE_NAME)))
assertTrue(localFile.exists())
assertEquals(newVersion.length(), localFile.length())
}
private fun scanIntoMediaStore(file: File) {
val latch = CountDownLatch(1)
val scannedUri = AtomicReference<Uri?>()
MediaScannerConnection.scanFile(targetContext, arrayOf(file.absolutePath), null) { _, uri ->
scannedUri.set(uri)
latch.countDown()
}
assertTrue("Media scan did not finish", latch.await(MEDIA_SCAN_TIMEOUT_SECONDS, TimeUnit.SECONDS))
assertNotNull("Image is not indexed by MediaStore", scannedUri.get())
}
}
Loaded 100 of 859 files, more files were not shown because too many files have changed in this diff. Show more