Compare commits

...
Author SHA1 Message Date
tobiasKaminsky 4f852195ac local videos cannot be used for preview
Signed-off-by: tobiasKaminsky <[email protected]>
2025-11-04 07:56:07 +01:00
Andy Scherzinger 90ebd53227 Merge pull request #15893 from nextcloud/renovate/github-codeql-action-4.x
chore(deps): update github/codeql-action action to v4.31.2
2025-11-03 23:09:39 +01:00
renovate[bot] 04bd74ac09 chore(deps): update github/codeql-action action to v4.31.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-03 09:25:47 +00:00
Alper Öztürk 104d1e6663 Merge pull request #15873 from nextcloud/fix/yml-files
fix: yml files
2025-11-03 10:24:46 +01:00
Alper Öztürk 04aec3f7c8 Merge branch 'master' into fix/yml-files
Signed-off-by: Alper Öztürk <[email protected]>
2025-11-03 09:33:53 +01:00
Alper Öztürk f5814b9822 Merge pull request #15890 from nextcloud/rakekniven-patch-2
chore(i18n): Removed quotation mark
2025-11-03 09:32:23 +01:00
Alper Öztürk 0710c82101 Merge pull request #15756 from nextcloud/fix/handle-slow-internet-connection-better-for-fetching-shares
fix: handle slow internet connection better for fetching shares
2025-11-03 09:20:25 +01:00
alperozturk e8b0d378f3 fix github actions
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:15:59 +01:00
alperozturk cd4c43ce82 fix github actions
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:15:59 +01:00
alperozturk d384dc5a43 fix yml file
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:15:59 +01:00
alperozturk f7c1f921bb fix: yml files
Signed-off-by: alperozturk <[email protected]>

# Conflicts:
#	scripts/buildDev
2025-11-03 09:15:59 +01:00
alperozturk d31db26d00 fix git conflict
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:14:12 +01:00
alperozturk dff8ee60a3 add: new no internet icon
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:14:12 +01:00
alperozturk 9be50ef142 fix: codacy
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:14:12 +01:00
alperozturk 3a8bbd0ebb fix: showFederatedShareAvatar
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:14:12 +01:00
alperozturk 0dbaf81dbb add: task timeout
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:14:12 +01:00
alperozturk d9d0f88bce add: task timeout
Signed-off-by: alperozturk <[email protected]>
2025-11-03 09:14:12 +01:00
alperozturk 0f7ce1e33f add: new empty list type
Signed-off-by: alperozturk <[email protected]>

# Conflicts:
#	app/src/main/res/values/strings.xml
2025-11-03 09:14:12 +01:00
alperozturk 4c80d1c5c3 fix: handle slow internet connection better for fetching shares
Signed-off-by: alperozturk <[email protected]>

# Conflicts:
#	build.gradle
2025-11-03 09:14:12 +01:00
Tobias Kaminsky ed4b7addff Merge pull request #15847 from nextcloud/renovate/playservicesbaseversion
fix(deps): update dependency com.google.android.gms:play-services-base to v18.9.0
2025-11-03 09:08:53 +01:00
renovate[bot] 300b499a10 fix(deps): update dependency com.google.android.gms:play-services-base to v18.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-03 07:13:44 +00:00
Tobias Kaminsky 6fa1ed5c3d Merge pull request #15892 from nextcloud/adjustBuildDev
adjust buildDev script to .kts syntax
2025-11-03 08:00:48 +01:00
tobiasKaminsky dfddbf0e07 adjust buildDev script to .kts syntax
Signed-off-by: tobiasKaminsky <[email protected]>
2025-11-03 07:58:46 +01:00
Nextcloud bot 24053b5bd9 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-11-03 02:44:59 +00:00
rakekniven bc3b4218a1 chore(i18n): Removed quotation mark
Signed-off-by: rakekniven <[email protected]>
2025-11-02 17:14:44 +01:00
Nextcloud bot 9a2a313b8f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-11-01 02:39:53 +00:00
Alper Öztürk b5a3e6be29 Merge pull request #15879 from nextcloud/fix/set-current-file
fix: set current file
2025-10-31 15:48:09 +01:00
Alper Öztürk a5c7b87bf1 Merge pull request #15818 from nextcloud/add/idle-empty-list-state
fix: folder picker activity empty list state
2025-10-31 15:20:27 +01:00
alperozturk e89141a714 fix: set current file
Signed-off-by: alperozturk <[email protected]>
2025-10-31 09:38:03 +01:00
Alper Öztürk dc3b8c6918 Merge pull request #15876 from nextcloud/style/noid/mimetypeIconForWhiteboard
Add mimetype icon for Nextcloud whiteboard files
2025-10-31 08:20:32 +01:00
Nextcloud bot 54dd53c6ff fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-31 02:42:32 +00:00
Andy Scherzinger 96f6cc3a43 Merge pull request #15875 from nextcloud/fix/empty-list-loading-text-color
fix: empty list loading text color
2025-10-30 22:31:50 +01:00
Andy Scherzinger 9d0740294c style(icons): Add mimetype icon for Nextcloud whiteboard files
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-30 18:57:20 +01:00
Alper Öztürk 4fe9328b4c Merge pull request #15714 from eltos/eltos-remove-share-button
Hide share button in portrait mode to save space
2025-10-30 16:15:18 +01:00
alperozturk 349c1bc919 fix: empty list loading text color
Signed-off-by: alperozturk <[email protected]>
2025-10-30 16:08:35 +01:00
Philipp Niedermayer e69f2976a0 Hide share button in portrait mode to save space
Signed-off-by: Philipp Niedermayer <[email protected]>
2025-10-30 15:52:56 +01:00
Alper Öztürk dd87b213d7 Merge pull request #15859 from jimlyas/chore/gradle-new
Chore: Improve Gradle Configuration
2025-10-30 08:53:31 +01:00
Jimly Asshiddiqy 96debdd3a5 chore(gradle): update libraries
Signed-off-by: Jimly Asshiddiqy <[email protected]>
2025-10-30 13:36:14 +07:00
Jimly Asshiddiqy bdc9bb1829 chore(gradle): update header
Signed-off-by: Jimly Asshiddiqy <[email protected]>
2025-10-30 13:36:14 +07:00
Jimly Asshiddiqy 07c09e1e99 chore(gradle): Resolve comments
Signed-off-by: Jimly Asshiddiqy <[email protected]>
2025-10-30 13:36:14 +07:00
Jimly Asshiddiqy 5fd2e2942c chore(gradle): Improve Gradle Configuration
- Rename build.gradle to build.gradle.kts
- Rename settings.gradle to settings.gradle
- Rename jacoco.gradle to jacoco.gradle.kts
- Refactor some entries in the libs.versions.toml
- Change running test task from to run jacoco task to trigger task, now it's reversed... we run the test task that will trigger the jacoco task

Signed-off-by: Jimly Asshiddiqy <[email protected]>
2025-10-30 13:36:14 +07:00
Tobias Kaminsky 2bb71c8b89 Merge pull request #15863 from nextcloud/galleryMenu
Gallery Bottom Sheet can be shown during search
2025-10-30 07:16:20 +01:00
Nextcloud bot 64f79d8462 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-30 02:41:35 +00:00
Alper Öztürk ac7d82a7f0 Merge pull request #15855 from nextcloud/fix/open-file-intent-crash
fix: open file intent crash
2025-10-29 11:16:32 +01:00
alperozturk 27340def2c fix: ui glitch when press back from shortcut
Signed-off-by: alperozturk <[email protected]>
2025-10-29 11:06:00 +01:00
alperozturk e8a8a82671 fix: open file intent crash
Signed-off-by: alperozturk <[email protected]>
2025-10-29 11:06:00 +01:00
tobiasKaminsky 7a1ac3b3bf Gallery Bottom Sheet can be shown during search
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-29 07:17:54 +01:00
Nextcloud bot 416e2b80f8 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-29 02:46:33 +00:00
Alper Öztürk 176577aae8 Merge pull request #15860 from nextcloud/revert-input-stream-binder
revert input stream changes
2025-10-28 10:22:20 +01:00
alperozturk 2500a692a7 revert input stream changes
Signed-off-by: alperozturk <[email protected]>
2025-10-28 10:21:05 +01:00
Nextcloud bot 076972789e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-28 02:46:17 +00:00
Andy Scherzinger 0c737e04c5 Merge pull request #15842 from nextcloud/renovate/kotlin-monorepo
fix(deps): update kotlin monorepo to v2.2.21
2025-10-27 16:26:37 +01:00
renovate[bot] 46d1253210 chore(deps): update kotlin to v2.2.21
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 13:44:40 +01:00
renovate[bot] 2719530f7a chore(deps): update dependency com.google.devtools.ksp to v2.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 13:20:13 +01:00
renovate[bot] 72ff3a5f26 fix(deps): update kotlin monorepo to v2.2.21
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 13:18:37 +01:00
Andy Scherzinger 0028b6f0fd Merge pull request #15852 from nextcloud/renovate/composebom
fix(deps): update dependency androidx.compose:compose-bom to v2025.10.01
2025-10-27 13:18:08 +01:00
Andy Scherzinger e77b10ebdc ci(lint): Lower lint sore
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-27 10:11:12 +01:00
Andy Scherzinger 88fc3f362b ci(chksm): Add meta-data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-27 09:31:16 +01:00
Andy Scherzinger 1d19cc6992 ci(lint): Lower score to reflect current state
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-27 09:31:16 +01:00
renovate[bot] d831a8b96d fix(deps): update dependency androidx.compose:compose-bom to v2025.10.01
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 09:31:15 +01:00
Alper Öztürk 3453a7a1f3 Merge pull request #15806 from nextcloud/use-dao-in-upload-list-adapter-for-consistency
use dao in upload list adapter
2025-10-27 08:57:32 +01:00
alperozturk 2f58e63b45 fix: load upload group async load
Signed-off-by: alperozturk <[email protected]>
2025-10-27 08:53:52 +01:00
alperozturk cbe2e9e433 use dao in upload list adapter
Signed-off-by: alperozturk <[email protected]>
2025-10-27 08:53:52 +01:00
Alper Öztürk 17e6e553e5 Merge pull request #15669 from PhilLab/fix_15636_deleting_from_slideshow
Fix deleting from slideshow
2025-10-27 08:33:59 +01:00
Philipp Hasper 4453eaf5d3 fix: deletion from slideshow for cases were user is not present
In that case, deleting the currently viewed file had the following issues:
1. When deleting the first image, the UI just stayed with it.
2. When deleting another image, the UI switched to the previous image,
   instead of the next one, which is inconsistent to the behavior when
   user is available
3. When switching to the next image, the title shown at the top did
   not correctly update

Signed-off-by: Philipp Hasper <[email protected]>
2025-10-27 08:30:21 +01:00
Philipp Hasper 21e0c82e65 fix: deletion from slideshow works again
The patch added in #14782 prevented that the callback
onRemoteOperationFinish() was ever called.

Secondly, the manual update of adapter and pager is only needed if user
is not present. When user is present, the initViewPager() takes care
of everything.

Signed-off-by: Philipp Hasper <[email protected]>
2025-10-27 08:30:21 +01:00
Andy Scherzinger 7a5f707e9a Merge pull request #15843 from nextcloud/renovate/mockkversion
fix(deps): update mockkversion to v1.14.6
2025-10-27 07:12:41 +01:00
Andy Scherzinger cbe4932b85 Merge pull request #15846 from nextcloud/renovate/androidcommonlibraryversion
fix(deps): update dependency com.github.nextcloud.android-common:ui to v0.29.0
2025-10-27 07:12:02 +01:00
renovate[bot] be2b8416da fix(deps): update dependency com.github.nextcloud.android-common:ui to v0.29.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 22:18:31 +00:00
renovate[bot] 57acd7d046 fix(deps): update mockkversion to v1.14.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 22:12:18 +00:00
Andy Scherzinger 622e22f801 Merge pull request #15840 from nextcloud/renovate/fbcontribversion
fix(deps): update dependency com.mebigfatguy.fb-contrib:fb-contrib to v7.6.15
2025-10-26 22:39:35 +01:00
Andy Scherzinger 8bc660e9b0 Merge pull request #15845 from nextcloud/renovate/github-codeql-action-4.x
chore(deps): update github/codeql-action action to v4.31.0
2025-10-26 22:38:39 +01:00
renovate[bot] b431522ceb chore(deps): update github/codeql-action action to v4.31.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 21:38:00 +00:00
renovate[bot] aa5d00dc85 fix(deps): update dependency com.mebigfatguy.fb-contrib:fb-contrib to v7.6.15
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 22:35:47 +01:00
Andy Scherzinger 675017c0b7 Merge pull request #15848 from nextcloud/renovate/major-github-artifact-actions
chore(deps): update actions/upload-artifact action to v5
2025-10-26 22:33:06 +01:00
Andy Scherzinger 79f3938a10 Merge pull request #15698 from nextcloud/renovate/daggerversion
fix(deps): update daggerversion to v2.57.2
2025-10-26 22:11:38 +01:00
renovate[bot] 55ee6af50c chore(deps): update actions/upload-artifact action to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 19:02:04 +00:00
Andy Scherzinger 02684cb212 ci(test): Sort fav and forlder on top
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-26 19:15:21 +01:00
Andy Scherzinger 8169857a28 ci(chksm): Update meta data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-26 19:15:21 +01:00
Andy Scherzinger 145b79633e ci(test): Fix test
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-26 19:15:20 +01:00
renovate[bot] eb6282f885 fix(deps): update daggerversion to v2.57.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 19:15:20 +01:00
Andy Scherzinger a66095eead Merge pull request #15841 from nextcloud/renovate/jacoco_version
fix(deps): update jacoco_version to v0.8.14
2025-10-26 19:14:49 +01:00
Andy Scherzinger 5cc8c43531 Merge pull request #15839 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.4
2025-10-26 19:14:08 +01:00
Andy Scherzinger 1036b44975 Merge pull request #15851 from nextcloud/renovate/gradle-actions-5.x
chore(deps): update gradle/actions action to v5
2025-10-26 19:13:30 +01:00
renovate[bot] 8510970467 fix(deps): update jacoco_version to v0.8.14
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 18:09:33 +00:00
renovate[bot] 782adad8a5 fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 18:05:40 +00:00
Andy Scherzinger f3df1dd4f5 Merge pull request #15850 from nextcloud/renovate/fsfe-reuse-action-6.x
chore(deps): update fsfe/reuse-action action to v6
2025-10-26 18:51:14 +01:00
renovate[bot] 94fed2aa62 chore(deps): update gradle/actions action to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 16:59:17 +00:00
renovate[bot] bca8dae206 chore(deps): update fsfe/reuse-action action to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 16:59:12 +00:00
Andy Scherzinger a7f42e8caa Merge pull request #15686 from nextcloud/renovate/composebom
fix(deps): update dependency androidx.compose:compose-bom to v2025.09.01
2025-10-26 17:17:01 +01:00
Andy Scherzinger 8a315b9f9f ci(chksm): Add metadata
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-26 15:58:50 +01:00
tobiasKaminsky bcbc089094 new lib material-icons-core needed
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-26 14:24:05 +01:00
renovate[bot] 2fbf25e765 fix(deps): update dependency androidx.compose:compose-bom to v2025.09.01
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 14:24:05 +01:00
Andy Scherzinger 4e0c1083bb Merge pull request #15836 from nextcloud/update-library-2025-10-26
Update library to 2025-10-26
2025-10-26 14:23:37 +01:00
Andy Scherzinger 1ae05df898 ci(chksm): Update meta data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-10-26 13:04:40 +01:00
Tobias Kaminsky 699cbc525b Update library to 2025-10-26
Signed-off-by: Tobias Kaminsky <[email protected]>
2025-10-26 12:49:47 +01:00
Nextcloud bot e1a80b64f4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-26 02:43:02 +00:00
Nextcloud bot 52bb721afc fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-25 02:42:18 +00:00
Nextcloud bot bb1782e7cc fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-24 02:42:38 +00:00
Alper Öztürk 004f14ea7f Merge pull request #15407 from nextcloud/sorting
folders/favorites first as option
2025-10-23 16:11:16 +02:00
alperozturk b1d842c6f6 fix: git conflict, kotlin spotless bugs, coda analytics
Signed-off-by: alperozturk <[email protected]>
2025-10-23 16:10:10 +02:00
alperozturk f5acb815b3 fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-23 16:00:34 +02:00
Alper Öztürk feed19eea4 Merge pull request #14299 from nextcloud/powerWarning
enable power warning for emulators
2025-10-23 15:58:42 +02:00
Alper Öztürk 7dbfa0d551 Merge pull request #14796 from nextcloud/breadcrumb
Fix breadcumb with details view
2025-10-23 15:55:05 +02:00
tobiasKaminsky a222d55b0c Fix breadcumb with details view
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-23 15:54:53 +02:00
tobiasKaminsky 16996c7601 enable power warning for emulators
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-22 15:28:56 +02:00
Alper Öztürk 3a3072612d Merge pull request #15595 from nextcloud/printAsyncDirectory
SpotBugs: Fix Method ignores exceptional return value - PrintAsyncTask
2025-10-22 09:13:28 +02:00
Tobias Kaminsky f7dee5449f Merge pull request #15644 from Saeedhany/master
Create Readme-AR.md
2025-10-22 07:58:01 +02:00
Nextcloud bot f1434d833d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-22 02:39:21 +00:00
Alex 195c398ca4 updated method
Signed-off-by: Alex <[email protected]>
2025-10-21 12:19:00 -04:00
Alex 5a86c0f00a fix make directories
Signed-off-by: Alex <[email protected]>
2025-10-21 12:19:00 -04:00
alperozturk a9a00f0619 fix: folder picker activity empty list state 2025-10-21 10:58:15 +02:00
Alper Öztürk db0d113b52 Merge pull request #15815 from nextcloud/fix/local-file-list-adapter-scroll-to-top
fix: local file list adapter scroll to top
2025-10-21 10:37:52 +02:00
Nextcloud bot 8fac856d87 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-21 02:39:43 +00:00
Andy Scherzinger 083c393c0b Merge pull request #15817 from nextcloud/renovate/ubuntu-noble
chore(deps): update ubuntu:noble docker digest to 66460d5
2025-10-20 18:29:55 +02:00
renovate[bot] 07e81c2c87 chore(deps): update ubuntu:noble docker digest to 66460d5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 10:12:20 +00:00
alperozturk 5b9a7d291b fix: local file list |adapter scroll to top
Signed-off-by: alperozturk <[email protected]>
2025-10-20 10:14:02 +02:00
Alper Öztürk 3bb1c7f4d8 Merge pull request #15513 from nextcloud/createNewBackground
Create new dialog: non white background
2025-10-20 09:45:51 +02:00
Alper Öztürk 7e9c8ccbfc Merge pull request #15591 from nextcloud/renameFileDirectory
SpotBugs: Fix Method ignores exceptional return value - RenameFileOperation
2025-10-20 09:41:38 +02:00
tobiasKaminsky 3686edd55c Create new dialog: non white background
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-20 09:31:51 +02:00
Alex 62a51e4063 delete if exists
Signed-off-by: Alex <[email protected]>
2025-10-20 09:30:45 +02:00
Alex 5b11ed7b20 fix Exception
Signed-off-by: Alex <[email protected]>
2025-10-20 09:30:45 +02:00
Alex 4e9247a130 Handle exceptions
Signed-off-by: Alex <[email protected]>
2025-10-20 09:30:45 +02:00
Alex 81296dcf8b fix entire function to use newer API
Signed-off-by: Alex <[email protected]>
2025-10-20 09:30:45 +02:00
Alex Knop a704326574 use create file and different delete function
Signed-off-by: Alex Knop <[email protected]>
2025-10-20 09:30:45 +02:00
Alper Öztürk 3cab716a97 Merge pull request #15597 from nextcloud/fileStorageDelete
SpotBugs: Fix Method ignores exceptional return value - FileStorageUtils
2025-10-20 08:57:05 +02:00
Andy Scherzinger 596264d5cd Merge pull request #15807 from nextcloud/fix/npe-left-fragment-adapter
fix: npe left fragment adapter
2025-10-20 08:12:50 +02:00
Andy Scherzinger 50d4b8d187 Merge pull request #15795 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-10-20 07:26:01 +02:00
Nextcloud bot cf5cbb1635 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-20 02:38:17 +00:00
nextcloud-android-bot a71c7fd1d9 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-10-20 02:34:54 +00:00
Nextcloud bot ea3d6407c5 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-19 02:38:09 +00:00
Nextcloud bot b4bba97efc fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-18 02:38:49 +00:00
Alex 84be18b5fb delete if exists
Signed-off-by: Alex <[email protected]>
2025-10-17 13:07:23 -04:00
Alex 2a64e26c10 fix Exception
Signed-off-by: Alex <[email protected]>
2025-10-17 13:07:23 -04:00
Alex 67a638ad4e add exception
Signed-off-by: Alex <[email protected]>
2025-10-17 13:07:23 -04:00
Alex 8f4096e6dc using modern Files delete method
Signed-off-by: Alex <[email protected]>
2025-10-17 13:07:23 -04:00
alperozturk a26beacc40 fix: npe left fragment adapter
Signed-off-by: alperozturk <[email protected]>
2025-10-17 15:53:48 +02:00
Alper Öztürk 1a40920dd7 Merge pull request #15759 from nextcloud/fix/auto-upload-state
fix: auto upload db state
2025-10-17 15:21:49 +02:00
alperozturk 6de9b48fd3 fix: git conflicts
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 1000c82d5e fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk f03f517593 revert changes due to split prs
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 3155c65a74 fix: upload list state
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 7e1880c3de fix: cant get file from URI
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 794d48e665 fix: pagination
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 5d033e7986 fix: pagination
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 279b5fa209 fix: CursorIndexOutOfBoundsException
Signed-off-by: alperozturk <[email protected]>

# Conflicts:
#	app/src/main/java/com/nextcloud/client/database/dao/SyncedFolderDao.kt
2025-10-17 11:14:41 +02:00
alperozturk d562e5feb3 add: comments
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 18481f45d7 fix: id incrementation
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
alperozturk 683ed9b0b8 fix: git conflicts
Signed-off-by: alperozturk <[email protected]>
2025-10-17 11:14:41 +02:00
Alper Öztürk d4e131e81f Merge pull request #15799 from nextcloud/fix/bidi-control-character-incomplete-trailing-escape
fix: incomplete trailing space during decoding filename
2025-10-17 09:10:32 +02:00
Alper Öztürk 484fe04245 Merge pull request #15800 from nextcloud/fix/file-upload-limit-message-visibility
fix: file upload limit message visibility
2025-10-17 09:08:07 +02:00
Nextcloud bot b0f429b477 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-17 02:39:10 +00:00
alperozturk 13f40c4026 fix: file upload limit message visibility
Signed-off-by: alperozturk <[email protected]>
2025-10-16 12:06:34 +02:00
alperozturk 2ea35f2f0b fix: incomplete trailing space during decoding filename
Signed-off-by: alperozturk <[email protected]>
2025-10-16 11:24:20 +02:00
Alper Öztürk 9e4197e4b9 Merge pull request #15712 from nextcloud/fix/cancel-upload
fix: upload cancel
2025-10-16 09:29:00 +02:00
Alper Öztürk 7a021f4be9 Merge pull request #15797 from nextcloud/fix/handle-not-modified-and-no-content-response
fix: handle not modified response in input stream binder implementation
2025-10-16 08:58:41 +02:00
Nextcloud bot 03c22ee4a0 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-16 02:38:05 +00:00
alperozturk 4fbaaa307d chore: update lib
Signed-off-by: alperozturk <[email protected]>
2025-10-15 17:41:57 +02:00
alperozturk 7275d8b14e fix: handle not modified
Signed-off-by: alperozturk <[email protected]>
2025-10-15 16:52:05 +02:00
alperozturk 199e754e9b fix: handle not modified and no content response
Signed-off-by: alperozturk <[email protected]>
2025-10-15 16:50:46 +02:00
alperozturk db028503d9 fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:15:36 +02:00
alperozturk 8a028567d1 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:10:04 +02:00
alperozturk 7a97e558c3 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>

# Conflicts:
#	build.gradle
2025-10-15 14:10:02 +02:00
alperozturk b83ac7d6a4 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:10:00 +02:00
alperozturk 6bdbbcb0d7 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:10:00 +02:00
alperozturk 45a5e6bd26 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:09:59 +02:00
alperozturk 8d2182a29e fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:09:57 +02:00
alperozturk 5479c135eb fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:09:57 +02:00
alperozturk 3c5aaad6d6 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:09:57 +02:00
alperozturk eb13420f35 fix: upload cancel
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:09:55 +02:00
alperozturk 26158aba2c fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-15 14:09:52 +02:00
Alper Öztürk c89832b1ff Merge pull request #15796 from nextcloud/fix/save-file-download-in-folder-download
fix: saving file for folder download
2025-10-15 14:07:54 +02:00
Alper Öztürk 6e3f63d4d4 Merge pull request #15791 from nextcloud/fix/make-file-upload-worker-long-running-job
fix: make file upload worker long running task
2025-10-15 14:07:23 +02:00
alperozturk eedd3473f5 fix: save file for folder download
Signed-off-by: alperozturk <[email protected]>
2025-10-15 13:53:28 +02:00
alperozturk 5ebb4cfad2 fix: save file for folder download
Signed-off-by: alperozturk <[email protected]>
2025-10-15 13:00:45 +02:00
Alper Öztürk 8baa0a6988 Merge pull request #15743 from nextcloud/build/upgrade-android-sdk-16
upgrade android sdk 36
2025-10-15 10:47:59 +02:00
alperozturk 1f900b7a55 fix: back press of fda
Signed-off-by: alperozturk <[email protected]>
2025-10-15 10:47:47 +02:00
alperozturk c18278b973 fix: back press of fda
Signed-off-by: alperozturk <[email protected]>
2025-10-15 10:14:22 +02:00
alperozturk 7fe00834ed add: Unsupported platform APIs and unable to migrate due to outdated PreferenceActivity for SettingsActivity
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
alperozturk 83d3cfba1d fix: code analytics
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
alperozturk 30e67b530f fix: code analytics
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
alperozturk a4eb0c9275 fix: custom back press navigation
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
alperozturk 39a7aff33c fix: custom back press navigation
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
alperozturk 07e7484c5a refactor: update back press gesture
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
alperozturk a1ce48da06 chore: upgrade android sdk 36
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:05:42 +02:00
Alper Öztürk 8dd522d600 Merge pull request #14166 from nextcloud/feature/sync-worker
Add Sync Worker
2025-10-15 09:05:07 +02:00
alperozturk b489ddae99 rename to folder download worker
Signed-off-by: alperozturk <[email protected]>
2025-10-15 09:04:35 +02:00
Nextcloud bot 80552ca895 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-15 02:38:07 +00:00
alperozturk e6aa4471b8 rename to folder download worker
Signed-off-by: alperozturk <[email protected]>
2025-10-14 17:06:35 +02:00
Alper Öztürk 79d2ed8889 Merge pull request #15792 from nextcloud/fix/local-file-list-adapter-duplicate-item
fix: local file list duplicate item and load
2025-10-14 17:05:17 +02:00
alperozturk 2a6ba436aa fix: folder download 2025-10-14 16:53:49 +02:00
alperozturk 4e9f63873c fix: local file list duplicate item
Signed-off-by: alperozturk <[email protected]>
2025-10-14 15:44:06 +02:00
alperozturk 895fd68e84 fix: make file upload worker long running task
Signed-off-by: alperozturk <[email protected]>
2025-10-14 11:49:14 +02:00
Alper Öztürk 614bacc074 Merge pull request #15731 from nextcloud/fix/local-file-list-adapter-file-listing
paginate: local file list adapter
2025-10-14 09:26:11 +02:00
Alper Öztürk e7d0c1d0ec Merge pull request #15785 from nextcloud/fix/file-sort-order-by-size
fix: file sort order by size
2025-10-14 08:46:32 +02:00
Alper Öztürk fc927e7bac Merge pull request #15784 from nextcloud/fix/sync-folder-layout-shimmer-order
fix: sync folder layout shimmer order
2025-10-14 08:46:23 +02:00
Nextcloud bot d52dbb705c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-14 02:53:19 +00:00
Alper Öztürk ea07d3c5ee Merge pull request #15786 from nextcloud/fix/background-job-factory-test
fix: BackgroundJobFactoryTest
2025-10-13 14:46:08 +02:00
Alper Öztürk 50fc0d3d7f Merge pull request #15764 from nextcloud/fix/auto-upload-collect-change-files-file-from-uri
fix: auto upload collect changed files
2025-10-13 14:45:47 +02:00
alperozturk 1587631797 fix: BackgroundJobFactoryTest.kt
Signed-off-by: alperozturk <[email protected]>
2025-10-13 14:10:51 +02:00
alperozturk 3f9ed092df fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-13 13:41:21 +02:00
alperozturk 63f6edc1d4 fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-13 13:40:04 +02:00
Alper Öztürk 0f237fc3dc Merge pull request #15767 from nextcloud/fix/content-observer-work
fix: content observer work
2025-10-13 13:20:20 +02:00
alperozturk 0776265f6d fix: file sort order by size
Signed-off-by: alperozturk <[email protected]>
2025-10-13 12:12:17 +02:00
alperozturk 312be7b171 fix: sync folder layout shimmer order
Signed-off-by: alperozturk <[email protected]>
2025-10-13 10:19:43 +02:00
Nextcloud bot 3b26d54de5 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-13 07:38:59 +00:00
Nextcloud bot 1ba667e925 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-12 03:00:16 +00:00
Andy Scherzinger 1bc0e70453 Merge pull request #15777 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-10-11 07:47:23 +02:00
nextcloud-android-bot 1be313a21c 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-10-11 05:46:13 +00:00
Nextcloud bot 37e936b19a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-11 02:44:43 +00:00
Alper Öztürk 3aaf7603f9 Merge pull request #15744 from nextcloud/fix/unified-search-filter
fix: unified search filter
2025-10-10 13:40:10 +02:00
Alper Öztürk f6c790f13c Merge pull request #15729 from nextcloud/fix/sync-icon-logic-during-folder-item-download
fix: sync icon logic for folder item download
2025-10-10 13:39:56 +02:00
alperozturk f0ebd7d2c7 fix: content observer work
Signed-off-by: alperozturk <[email protected]>
2025-10-10 12:56:58 +02:00
alperozturk e307143074 fix: content observer work
Signed-off-by: alperozturk <[email protected]>
2025-10-10 12:41:48 +02:00
alperozturk f5b288b59f fix: content observer work
Signed-off-by: alperozturk <[email protected]>
2025-10-10 12:41:48 +02:00
Alper Öztürk bef0cfa885 Merge pull request #15766 from nextcloud/fix/media-folder-detection-worker
fix: media folder detection worker
2025-10-10 12:38:23 +02:00
Alper Öztürk 5e895ec306 Merge pull request #15765 from nextcloud/fix/background-job-factory-tests
fix: background job factory test
2025-10-10 12:31:37 +02:00
alperozturk 9122d0a261 fix: media folder detection worker
Signed-off-by: alperozturk <[email protected]>
2025-10-10 11:54:07 +02:00
alperozturk 98c4ea9c77 fix: background job factory test
Signed-off-by: alperozturk <[email protected]>
2025-10-10 11:46:05 +02:00
Alper Öztürk a1aa3a5455 Merge pull request #15749 from nextcloud/feat/indicate-auto-upload-scan-interval
feat: indicate auto upload scan interval
2025-10-10 08:51:17 +02:00
Nextcloud bot 20ea984885 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-10 05:05:22 +00:00
alperozturk 5dbe8d5eab make scan indicator text style normal
Signed-off-by: alperozturk <[email protected]>
2025-10-09 16:36:22 +02:00
alperozturk d267d4cb2c fix: lint
Signed-off-by: alperozturk <[email protected]>
2025-10-09 16:34:11 +02:00
alperozturk 24a11c5e5e add subtitle
Signed-off-by: alperozturk <[email protected]>
2025-10-09 16:34:11 +02:00
alperozturk f639788ebc fix: lint
Signed-off-by: alperozturk <[email protected]>
2025-10-09 16:34:11 +02:00
alperozturk b622174c95 feat: indicate auto upload scan interval
Signed-off-by: alperozturk <[email protected]>
2025-10-09 16:34:11 +02:00
alperozturk 31fa1c4413 feat: indicate auto upload scan interval
Signed-off-by: alperozturk <[email protected]>
2025-10-09 16:34:11 +02:00
Tobias Kaminsky 2f6b724540 Merge pull request #15761 from nextcloud/unused
remove synced_folder_padding_end
2025-10-09 14:57:17 +02:00
tobiasKaminsky 0814e10937 remove synced_folder_padding_end
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-09 14:53:20 +02:00
alperozturk 18e9019a14 fix: code analytics
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk 86e35bc871 add: file helper tests
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk a85379bafb fix: sorting order
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk d1d06c144f refactor: pagination
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk 7352fa05e4 refactor: pagination
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk fad3ed061f paginate: local file list adapter
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk b90110b605 paginate: local file list adapter
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
alperozturk 5d5e5106d1 paginate: local file list adapter
Signed-off-by: alperozturk <[email protected]>
2025-10-08 17:01:39 +02:00
Alper Öztürk 032e906778 Merge pull request #15694 from nextcloud/fix/auto-upload-worker
fix: auto upload worker
2025-10-08 08:57:39 +02:00
Alper Öztürk 84de8e64c4 Merge pull request #15745 from nextcloud/fix/rotate-bitmap-according-to-the-exif
fix: rotate bitmap according to the exif
2025-10-08 08:56:39 +02:00
Andy Scherzinger 4f873754f8 Merge pull request #15751 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-10-07 23:26:53 +02:00
nextcloud-android-bot 7531426c0b 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-10-07 22:58:06 +02:00
Andy Scherzinger 65e93d8500 Merge pull request #15747 from nextcloud/renovate/gradle-actions-4.x
chore(deps): update gradle/actions action to v4.4.4
2025-10-07 22:51:36 +02:00
renovate[bot] f065874a96 chore(deps): update gradle/actions action to v4.4.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 20:04:42 +00:00
Andy Scherzinger 1956e0e582 Merge pull request #15746 from nextcloud/renovate/ubuntu-noble
chore(deps): update ubuntu:noble docker digest to 728785b
2025-10-07 22:02:52 +02:00
renovate[bot] e1877d0cb4 chore(deps): update ubuntu:noble docker digest to 728785b
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 17:21:45 +00:00
Alper Öztürk 505d6b72ac Merge pull request #15750 from nextcloud/make-placeholders-non-translatable
make placeholders non translatable
2025-10-07 19:19:47 +02:00
alperozturk 74a5282dbb remove translations for placeholders
Signed-off-by: alperozturk <[email protected]>
2025-10-07 16:47:45 +02:00
alperozturk 94a1a7e34d add missing non translatable placeholders
Signed-off-by: alperozturk <[email protected]>
2025-10-07 16:41:47 +02:00
alperozturk 2cbda4ed42 make placeholders non translatable
Signed-off-by: alperozturk <[email protected]>
2025-10-07 16:05:02 +02:00
alperozturk 9c80a480f4 fix: kt spotless check
Signed-off-by: alperozturk <[email protected]>
2025-10-07 11:47:25 +02:00
alperozturk af76c5c9b6 fix: auto upload worker
Signed-off-by: alperozturk <[email protected]>
2025-10-07 11:16:57 +02:00
alperozturk 4503d4431e fix: code analytics GetExifOrientationTests
Signed-off-by: alperozturk <[email protected]>
2025-10-07 10:38:57 +02:00
alperozturk 29a0956614 fix: rotate bitmap according to the exif
Signed-off-by: alperozturk <[email protected]>
2025-10-07 10:38:57 +02:00
Tobias Kaminsky 2aeb912938 Merge pull request #15738 from nextcloud/update-library-2025-10-05
Update library to 2025-10-05
2025-10-07 09:13:29 +02:00
Tobias Kaminsky a92e11967c Update library to 2025-10-05
Signed-off-by: Tobias Kaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2025-10-07 07:33:25 +02:00
Nextcloud bot b6e7310e39 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-07 03:10:03 +00:00
alperozturk 1c7749bcb4 fix: unified search filter
Signed-off-by: alperozturk <[email protected]>
2025-10-06 16:51:32 +02:00
Alper Öztürk 3242b07782 Merge pull request #15580 from nextcloud/feat/enhance-unified-search
feat: enhance unified search
2025-10-06 16:21:40 +02:00
Alper Öztürk 361d9fa69e Merge pull request #15722 from nextcloud/feat/indicate-skipped-auto-upload-due-to-battery-saver-mode
feat: indicate skipped auto upload due to battery saver mode
2025-10-06 16:20:33 +02:00
alperozturk ede66e8fa4 fix: vertical padding, theming
Signed-off-by: alperozturk <[email protected]>
2025-10-06 13:43:06 +02:00
alperozturk 7f200295b3 chore: resolve merge conflict
Signed-off-by: alperozturk <[email protected]>
2025-10-06 13:43:06 +02:00
alperozturk 83d6ed4f6a feat: enhance unified search no result page
Signed-off-by: alperozturk <[email protected]>
2025-10-06 13:43:06 +02:00
alperozturk 949282e638 feat: enhance unified search add new actions
Signed-off-by: alperozturk <[email protected]>
2025-10-06 13:43:06 +02:00
alperozturk 239f33f44c feat: enhance unified search
Signed-off-by: alperozturk <[email protected]>
2025-10-06 13:43:06 +02:00
Nextcloud bot 7f4f85200e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-06 03:07:41 +00:00
Nextcloud bot 02a3a9e0a5 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-05 03:07:15 +00:00
Andy Scherzinger b83c773cec Merge pull request #15737 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-10-04 11:58:56 +02:00
nextcloud-android-bot 22f3ee5fc5 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-10-04 09:23:15 +00:00
Nextcloud bot 9722e882e8 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-04 03:06:34 +00:00
Andy Scherzinger 677d855a4c Merge pull request #15736 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-10-03 09:56:26 +02:00
nextcloud-android-bot 0c427262fd 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-10-03 07:37:28 +00:00
Nextcloud bot 05ee6abd95 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-03 03:12:00 +00:00
Saeedhany 93d4244859 Merge branch 'master' into master 2025-10-02 15:53:09 +03:00
Alper Öztürk 40ec339c3e Merge pull request #15730 from nextcloud/behavior/faster-hide-view-on-scroll
behavior: faster hide view on scroll
2025-10-02 10:55:08 +02:00
alperozturk 3df4e98916 align: with toolbar item
Signed-off-by: alperozturk <[email protected]>
2025-10-02 10:41:06 +02:00
alperozturk be8d6b3d95 use: material button
Signed-off-by: alperozturk <[email protected]>
2025-10-02 10:31:33 +02:00
alperozturk 21b28d3429 add: indicate in auto upload overview
Signed-off-by: alperozturk <[email protected]>
2025-10-02 10:31:33 +02:00
alperozturk fc034019e3 feat: indicate skipped auto upload due to battery saver mode
Signed-off-by: alperozturk <[email protected]>
2025-10-02 10:31:33 +02:00
Nextcloud bot 9c4322f3cf fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-02 03:09:41 +00:00
Andy Scherzinger 3e811defc5 Merge pull request #15697 from nextcloud/fix/ci-tests
fix: tests
2025-10-01 14:53:02 +02:00
Andy Scherzinger 18c7759040 Merge pull request #15723 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-10-01 14:45:10 +02:00
Saeedhany 726fcbc8e4 Update Readme-AR.md
Signed-off-by: Saeedhany <[email protected]>
2025-10-01 15:15:07 +03:00
Saeedhany aab2051f5f Update Readme-AR.md
Signed-off-by: Saeedhany <[email protected]>
2025-10-01 15:10:29 +03:00
alperozturk 39c7dcf6ce behavior: faster hide view on scroll
Signed-off-by: alperozturk <[email protected]>
2025-10-01 12:43:46 +02:00
alperozturk 18133fc98b behavior: faster hide view on scroll
Signed-off-by: alperozturk <[email protected]>
2025-10-01 12:29:17 +02:00
alperozturk 7a80da65cb fix: sync icon logic for folder item download
Signed-off-by: alperozturk <[email protected]>
2025-10-01 10:36:21 +02:00
Alper Öztürk 975150c93a Merge pull request #15720 from nextcloud/fix/npe-current-file-fda
fix: current file npe fda
2025-10-01 09:37:18 +02:00
Nextcloud bot 5795a91119 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-10-01 03:08:54 +00:00
nextcloud-android-bot 7386cae700 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-10-01 02:33:43 +00:00
alperozturk 68257e6eb9 fix: current file npe fda
Signed-off-by: alperozturk <[email protected]>
2025-09-30 16:22:37 +02:00
Alper Öztürk 244719e80e Merge pull request #15681 from nextcloud/style/noid/searchToolbarColor
Use M3 color for search bar
2025-09-30 12:38:03 +02:00
Andy Scherzinger 94aa44b0c5 style(toolbar): use M3 color for search bar
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-30 09:33:41 +02:00
Nextcloud bot 03dc62a840 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-30 03:06:34 +00:00
Tobias Kaminsky 63c16c729e Merge pull request #15708 from hidrohase/patch-1
Adding Obtainium
2025-09-29 09:24:46 +02:00
Nextcloud bot afad33e363 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-29 03:07:51 +00:00
Nextcloud bot f48d05d8a6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-28 03:07:19 +00:00
hidrohase 679b8ef364 Adding Obtainium
Adding the Obtainium Get-it-Logo with the Link to add nextcloud/andoid to the Obtainium-App with filters for the latest release and the "nextcloud-*.apk" version

Signed-off-by: hidrohase <[email protected]>
2025-09-27 17:24:41 +02:00
Andy Scherzinger 288f5a2d99 Merge pull request #15703 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-09-27 08:38:45 +02:00
nextcloud-android-bot c3e12ccb22 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-09-27 06:30:15 +00:00
Nextcloud bot b7e6c92f4b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-27 03:06:24 +00:00
Nextcloud bot 525f8f19f4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-26 03:05:28 +00:00
alperozturk 1ecf6fa3e6 fix: ci tests
Signed-off-by: alperozturk <[email protected]>
2025-09-25 16:44:36 +02:00
Tobias Kaminsky e3b03034a4 Merge pull request #15695 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.30.4
2025-09-25 15:46:54 +02:00
renovate[bot] ff7f278079 chore(deps): update github/codeql-action action to v3.30.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 13:43:31 +00:00
Tobias Kaminsky ecf9c94d92 Merge pull request #15446 from nextcloud/renovate/slf4j-monorepo
fix(deps): update dependency org.slf4j:jcl-over-slf4j to v1.7.36
2025-09-25 15:42:03 +02:00
Alper Öztürk ab7a295a46 Merge pull request #15442 from nextcloud/fix/remove-hardcoded-brand-check-for-power-management-warning
fix: remove redundant code to prevent unnecessary power management popups
2025-09-25 14:07:47 +02:00
Alper Öztürk 9769568b27 Merge pull request #15586 from nextcloud/fix/auto-upload
fix: auto upload
2025-09-25 11:18:15 +02:00
Alper Öztürk c703e6f640 Merge pull request #15688 from nextcloud/fix/make-notifications-silent-for-workers
fix: make notifications silent for workers
2025-09-25 11:17:15 +02:00
alperozturk c6a34b9e4d add: missing backoff and constraints for immediate sync
Signed-off-by: alperozturk <[email protected]>
2025-09-25 11:06:05 +02:00
alperozturk 7e473ceed6 add better logs for auto upload
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk fe1a90a15e fix: add back off criteria and constraints for worker
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk d6ab287416 fix: add notification
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk d01134d095 fix: add start notification
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk f1cbb3595f refactor: simplify functions
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk e597d04fbe fix: execution order, introduced dao
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk abff643d2a chore: resolve merge conflict
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk 741f7441e4 fix: auto upload
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:42:07 +02:00
alperozturk 8a9a5d60b1 fix: notification channel importance
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:28:34 +02:00
alperozturk f2643692a2 fix: notification channel importance
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:26:34 +02:00
alperozturk 654fb6f08c Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-09-25 10:26:33 +02:00
alperozturk 77af02b5ba fix: make notifications silent for workers
Signed-off-by: alperozturk <[email protected]>
2025-09-25 08:52:54 +02:00
renovate[bot] 155a353871 fix(deps): update dependency org.slf4j:jcl-over-slf4j to v1.7.36
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 04:33:26 +00:00
Nextcloud bot 37ed66906a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-25 03:05:02 +00:00
Andy Scherzinger e93c8f3ff0 Merge pull request #15683 from nextcloud/renovate/actions-cache-4.x
chore(deps): update actions/cache action to v4.3.0
2025-09-24 16:22:15 +02:00
renovate[bot] b5696ae9f3 chore(deps): update actions/cache action to v4.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 14:20:07 +00:00
Tobias Kaminsky f7f6246a55 Merge pull request #15594 from nextcloud/storageMigrationDirectory
SpotBugs: Fix Method ignores exceptional return value - StorageMigration
2025-09-24 15:56:56 +02:00
Tobias Kaminsky b765998bb8 Merge pull request #15593 from nextcloud/diskLRUFile
SpotBugs: Fix Method ignores exceptional return value - DiskLRUImageCacheFileProvider
2025-09-24 15:56:45 +02:00
Tobias Kaminsky beae24ac6d Merge pull request #15596 from nextcloud/OCFileExecute
SpotBugs: Fix Method ignores exceptional return value - OCFileListFragment
2025-09-24 15:56:25 +02:00
Tobias Kaminsky 1810de536a Merge pull request #15592 from nextcloud/uploadFileDirectory
SpotBugs: Fix Method ignores exceptional return value - UploadFileOperation
2025-09-24 15:48:23 +02:00
Tobias Kaminsky e970fe0ab1 Merge pull request #15590 from nextcloud/downloadFileDirectory
SpotBugs: Fix Method ignores exceptional return value - DownloadFileOperation
2025-09-24 15:48:14 +02:00
Tobias Kaminsky 7bd657784a Merge pull request #15589 from nextcloud/pushUtilsDirectory
SpotBugs: Fix Method ignores exceptional return value - PushUtils
2025-09-24 06:57:17 +02:00
Nextcloud bot 980b199933 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-24 03:06:39 +00:00
tobiasKaminsky e28e6e3c31 Add missing import
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-23 12:08:12 +02:00
Tobias Kaminsky 86e43a57b2 Merge pull request #15494 from nextcloud/add/better-default-browser-launch-handling
add: better default browser launch handling
2025-09-23 09:57:01 +02:00
Tobias Kaminsky f22a9642ee Merge pull request #15584 from nextcloud/previewSortedFavorites
Preview: obey sort order when favorites
2025-09-23 09:41:50 +02:00
Tobias Kaminsky a68f18b78f Merge pull request #15673 from nextcloud/obeyCorrectFolderForBottomSheet
Previously directory was assigned on registerFabListener, thus it was always "/"
2025-09-23 09:30:32 +02:00
tobiasKaminsky 9730b78492 Preview: obey sort order when favorites
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-23 09:22:02 +02:00
Tobias Kaminsky 98c9912dd6 Merge pull request #15656 from nextcloud/officeDownloadFile
Office: download file to public download dir
2025-09-23 08:25:45 +02:00
Tobias Kaminsky 69c647126e Merge pull request #15655 from nextcloud/allowDeleteEncryptedFiles
allow to delete encrypted files
2025-09-23 08:24:49 +02:00
tobiasKaminsky 6f93f301bc Previously directory was assigned on registerFabListener, thus it was always "/"
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-23 08:17:09 +02:00
Nextcloud bot d27622480d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-23 03:06:07 +00:00
Andy Scherzinger 8d041af4ba Merge pull request #15668 from nextcloud/update-library-2025-09-21
Update library to 2025-09-21
2025-09-21 17:41:57 +02:00
Tobias Kaminsky 3438ec12a6 Update library to 2025-09-21
Signed-off-by: Tobias Kaminsky <[email protected]>
2025-09-21 10:52:22 +02:00
Nextcloud bot 5d79759e40 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-21 03:04:45 +00:00
Nextcloud bot 7480a7bafa fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-20 03:06:59 +00:00
Andy Scherzinger 5e523f9a47 Merge pull request #15657 from nextcloud/renovate/firebasemessagingversion
fix(deps): update dependency com.google.firebase:firebase-messaging to v25.0.1
2025-09-19 11:20:00 +02:00
Andy Scherzinger 7a64807645 ci(lint): Update lint score
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-19 11:19:30 +02:00
renovate[bot] 70bbf2860b fix(deps): update dependency com.google.firebase:firebase-messaging to v25.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 11:19:29 +02:00
Andy Scherzinger a332ee0abf Merge pull request #15659 from nextcloud/renovate/gradle-9.x
chore(deps): update gradle to v9.1.0
2025-09-19 09:13:30 +02:00
renovate[bot] 28e176f22d chore(deps): update gradle to v9.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 04:37:45 +00:00
Nextcloud bot 6236ebf049 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-19 03:06:30 +00:00
tobiasKaminsky d81acbf96e Office: download file to public download dir
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-18 15:25:21 +02:00
tobiasKaminsky ce9217a4e5 allow to delete encrypted files
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-18 14:53:05 +02:00
Tobias Kaminsky 0376033c44 Merge pull request #15623 from eltos/patch-1
Fix: Make "open in notes" banner honour ecosystem app preference
2025-09-18 09:01:33 +02:00
Andy Scherzinger 5dc101e3f3 Merge pull request #15652 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.2
2025-09-18 08:04:20 +02:00
Andy Scherzinger 9c4bc28bd0 Merge pull request #15651 from nextcloud/renovate/lifecycleviewmodelktxversion
fix(deps): update dependency androidx.lifecycle:lifecycle-viewmodel-ktx to v2.9.4
2025-09-18 07:26:23 +02:00
Nextcloud bot 753e2a932f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-18 03:06:15 +00:00
renovate[bot] 383d7e050b fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-18 01:58:46 +00:00
renovate[bot] 65eed51ead fix(deps): update dependency androidx.lifecycle:lifecycle-viewmodel-ktx to v2.9.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-18 01:55:36 +00:00
Nextcloud bot bd5ba98f29 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-17 03:02:08 +00:00
renovate[bot] 3f4da24b17 chore(deps): update ubuntu:noble docker digest to 353675e (#15650)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 00:58:29 +00:00
Andy Scherzinger f2efe8bcda Merge pull request #15647 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.1
2025-09-16 18:37:33 +02:00
renovate[bot] 2eeddd3efe fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-16 07:26:46 +02:00
renovate[bot] 688de64360 chore(deps): update ubuntu:noble docker digest to 590e57a (#15646)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-16 02:09:07 +00:00
Saeedhany b7b250bb2f Create Readme-AR.md
Signed-off-by: Saeedhany <[email protected]>
2025-09-15 17:29:29 +03:00
Andy Scherzinger c9e9dab8fe Merge pull request #15641 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.0
2025-09-15 07:50:25 +02:00
renovate[bot] e4c7ee0c77 fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 00:46:55 +00:00
Andy Scherzinger 8ed3b16e15 Merge pull request #15639 from nextcloud/docs/15634/changelog
Add all missing stable releases
2025-09-14 20:21:56 +02:00
Andy Scherzinger 9f5a72cf96 docs(changelog): Add all missing stable releases
Resolves #15634

Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-14 20:20:49 +02:00
Nextcloud bot 3a0d8a9411 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-14 03:00:51 +00:00
Andy Scherzinger a5dbe2a46a Merge pull request #15632 from nextcloud/renovate/roomversion
fix(deps): update roomversion to v2.8.0
2025-09-13 14:12:00 +02:00
Andy Scherzinger dfc8fb9791 Merge pull request #15633 from nextcloud/renovate/glide
fix(deps): update glide to v5.0.5
2025-09-13 14:11:24 +02:00
Andy Scherzinger 51d42575a7 Merge pull request #15631 from nextcloud/renovate/playservicesbaseversion
fix(deps): update dependency com.google.android.gms:play-services-base to v18.8.0
2025-09-13 14:10:44 +02:00
renovate[bot] f2643d2f97 fix(deps): update roomversion to v2.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-13 05:06:29 +00:00
renovate[bot] a5f2a634b3 fix(deps): update dependency com.google.android.gms:play-services-base to v18.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-13 05:02:42 +00:00
renovate[bot] 4a7105d502 fix(deps): update glide to v5.0.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-13 05:01:48 +00:00
Nextcloud bot cff3cfcdb6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-13 03:02:35 +00:00
Andy Scherzinger dbb49e107a Merge pull request #15630 from nextcloud/renovate/composebom
fix(deps): update dependency androidx.compose:compose-bom to v2025.09.00
2025-09-13 01:09:13 +02:00
renovate[bot] 17b758ed27 fix(deps): update dependency androidx.compose:compose-bom to v2025.09.00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-12 22:22:47 +00:00
Andy Scherzinger 82cb46643d Merge pull request #15628 from nextcloud/renovate/workruntime
fix(deps): update workruntime to v2.10.4
2025-09-12 23:56:30 +02:00
Andy Scherzinger 59efb5ed2f Merge pull request #15616 from nextcloud/renovate/kotlin-monorepo
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.2.20
2025-09-12 23:43:11 +02:00
renovate[bot] c9a12d8c34 fix(deps): update workruntime to v2.10.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-12 23:22:20 +02:00
renovate[bot] daad4b58ef fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.2.20
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-12 23:20:57 +02:00
Andy Scherzinger 432743e00b Merge pull request #15607 from nextcloud/renovate/ksp-monorepo
chore(deps): update dependency com.google.devtools.ksp to v2.2.20-2.0.3
2025-09-12 22:28:36 +02:00
renovate[bot] 057b9a2846 chore(deps): update dependency com.google.devtools.ksp to v2.2.20-2.0.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-12 19:47:05 +02:00
Andy Scherzinger 749d8d779a Merge pull request #15615 from nextcloud/renovate/gsonversion
fix(deps): update dependency com.google.code.gson:gson to v2.13.2
2025-09-12 19:46:37 +02:00
renovate[bot] c9bfd3dacd fix(deps): update dependency com.google.code.gson:gson to v2.13.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-12 15:44:30 +00:00
alperozturk bc935f9d32 fix: add fallback token
Signed-off-by: alperozturk <[email protected]>
2025-09-12 16:21:50 +02:00
alperozturk 4dc4f0a505 fix: add fallback poll url and token
Signed-off-by: alperozturk <[email protected]>
2025-09-12 16:12:17 +02:00
alperozturk 1e7ed9d5c0 fix: add fallback url
Signed-off-by: alperozturk <[email protected]>
2025-09-12 16:11:48 +02:00
alperozturk 1083997359 add: better-default-browser-launch-handling
Signed-off-by: alperozturk <[email protected]>
2025-09-12 16:11:48 +02:00
Alper Öztürk 1ccc351cdb Merge pull request #15622 from nextcloud/deleteFavoritedFile
Remove deleted file on view
2025-09-12 15:51:31 +02:00
alperozturk 728401ee63 chore: fix kotlin spotless on remove file operation finish
Signed-off-by: alperozturk <[email protected]>
2025-09-12 15:50:48 +02:00
tobiasKaminsky 4a1940ac94 Remove deleted file on view
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-12 15:42:32 +02:00
Alper Öztürk 835a82bf2f Merge pull request #15618 from nextcloud/exitActionModeAfterFavoriteAction
Exit action mode after favorite action
2025-09-12 15:42:15 +02:00
tobiasKaminsky 017df65d8b Exit action mode after favorite action
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-12 15:39:41 +02:00
Andy Scherzinger 097a56b66a Merge pull request #15621 from nextcloud/chore/version-bump-3.35.0-alpha1
chore: bump version to v3.35.0 alpha1
2025-09-12 12:38:38 +02:00
Andy Scherzinger 64ac912f92 chore(deps): Bump android-lib to latest
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-12 12:37:32 +02:00
Philipp Niedermayer 8901f564b0 Fix "open in notes" to honour ecosystem app preference
Fixes #15614 

Signed-off-by: Philipp Niedermayer <[email protected]>
2025-09-12 11:09:54 +02:00
alperozturk d2296a0fb6 chore: bump version to v3.35.0 alpha1
Signed-off-by: alperozturk <[email protected]>
2025-09-12 10:20:06 +02:00
Alper Öztürk 8fb887daf5 Merge pull request #15544 from nextcloud/fix/listen-unnecessary-worker-download-state
fix: download progress listener
2025-09-12 09:33:08 +02:00
Alper Öztürk 636314ed49 Merge pull request #15605 from nextcloud/fix/showing-file-already-exists-for-auto-upload
fix: show file already exists notification only for manual upload
2025-09-12 09:32:23 +02:00
Nextcloud bot e5bbd98738 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-12 03:05:27 +00:00
Andy Scherzinger 559df47acf Merge pull request #15611 from nextcloud/feat/glide-v5
chore: glide v5
2025-09-11 19:47:29 +02:00
alperozturk c31cba30f5 fix: group folder overlay icon
Signed-off-by: alperozturk <[email protected]>
2025-09-11 16:37:02 +02:00
alperozturk b5818fd0b5 chore: fix build
Signed-off-by: alperozturk <[email protected]>
2025-09-11 16:26:58 +02:00
Andy Scherzinger f2cf44166f ci(chksm): Add meta data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-11 16:03:58 +02:00
alperozturk 5d71b9a05c fix: git conflict
Signed-off-by: alperozturk <[email protected]>
2025-09-11 13:52:25 +02:00
alperozturk 4727b8ae44 feat: glide v5
Signed-off-by: alperozturk <[email protected]>
2025-09-11 13:46:31 +02:00
renovate[bot] cdf29a20d7 fix(deps): update glide to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-11 13:46:29 +02:00
Alper Öztürk 71c84b8803 Merge pull request #15049 from nextcloud/bugfix/hide-home-search-toolbar-and-sort-list-button-for-favorites
fix: toolbar inconsistency
2025-09-11 13:45:16 +02:00
Alper Öztürk a9a53215c0 Merge pull request #15612 from nextcloud/chore/kotlin-2.2.20
chore: kotlin 2.2.20 🎉
2025-09-11 13:44:16 +02:00
Andy Scherzinger 87ac2c5c2b chore(chksm): Update meta data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-11 12:04:28 +02:00
alperozturk e9cd78d0f8 chore: kotlin 2.2.20
Signed-off-by: alperozturk <[email protected]>
2025-09-11 11:43:50 +02:00
renovate[bot] 2e85fedc91 chore(deps): update kotlin to v2.2.20
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-11 11:43:46 +02:00
Alper Öztürk 9fb3f5fcad Merge pull request #15540 from nextcloud/fix/green-check-mark-folder-sync
fix: add sync icon for downloaded folder
2025-09-11 10:44:53 +02:00
alperozturk 6daeb80aa1 fix: gallery adapter test item count
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:43:00 +02:00
alperozturk 726e0b44d6 fix: gallery adapter test item count
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:23:28 +02:00
alperozturk 88369d8fbd fix: sync icon for folder downloading
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:23:28 +02:00
alperozturk 8ab2235f9c fix: add cleanup function
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:23:28 +02:00
alperozturk 72f3d82cda fix: add sync icon for downloaded folder
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:23:28 +02:00
alperozturk 8d5783900b chore: add comment for setup toolbar
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:07:12 +02:00
alperozturk 29a8ec164a chore: add comment for setup toolbar
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:07:12 +02:00
alperozturk b1013ad3a6 fix: toolbar inconsistency
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:07:12 +02:00
alperozturk b5220141f8 fix: show file already exists notification only for manual upload
Signed-off-by: alperozturk <[email protected]>
2025-09-11 09:02:37 +02:00
Nextcloud bot c47e51a130 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-11 03:04:53 +00:00
Andy Scherzinger 26f2a09c9a Merge pull request #15606 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.30.3
2025-09-10 20:16:44 +02:00
renovate[bot] bd3d77a4e5 chore(deps): update github/codeql-action action to v3.30.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 18:12:51 +00:00
Nextcloud bot 38413ffc09 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-10 03:07:40 +00:00
Andy Scherzinger dd6b62cf13 Merge pull request #15600 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.30.2
2025-09-09 21:23:18 +02:00
renovate[bot] 68d580cdb3 chore(deps): update github/codeql-action action to v3.30.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-09 18:55:44 +00:00
Andy Scherzinger 530361cd4c Merge pull request #15585 from nextcloud/renovate/gradle-actions-4.x
chore(deps): update gradle/actions action to v4.4.3
2025-09-09 17:13:19 +02:00
renovate[bot] 6a8cdd6376 chore(deps): update gradle/actions action to v4.4.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-09 16:00:55 +02:00
Alex Knop 7e1706b55f use execute function
Signed-off-by: Alex Knop <[email protected]>
2025-09-09 09:51:32 -04:00
Alex Knop bc7a1916c8 use newer functions in Storage Migration
Signed-off-by: Alex Knop <[email protected]>
2025-09-09 09:48:40 -04:00
Alex Knop f5695051e7 use newer createFile function
Signed-off-by: Alex Knop <[email protected]>
2025-09-09 09:46:54 -04:00
Alex Knop 73e3cf48c6 use newer methods that dont return values
Signed-off-by: Alex Knop <[email protected]>
2025-09-09 09:45:13 -04:00
Alex Knop 2f56f04fc9 use Create Directory
Signed-off-by: Alex Knop <[email protected]>
2025-09-09 09:35:41 -04:00
Alex Knop abd48a4f8c use createDirectory
Signed-off-by: Alex Knop <[email protected]>
2025-09-09 09:30:35 -04:00
Alper Öztürk 5e0bc0eabd Merge pull request #15527 from nextcloud/fix/initial-thumbnail-generation
fix: initial thumbnail generation
2025-09-09 14:12:22 +02:00
Alper Öztürk cfcf6e6b18 Merge pull request #15529 from nextcloud/feat/do-not-show-loading-spinner-automatically
feat: do not show loading spinner
2025-09-09 14:12:08 +02:00
Tobias Kaminsky 95fd955841 Merge pull request #15546 from nextcloud/fix/manage-space-activity-back-button
fix: manage space activity back button
2025-09-09 13:32:47 +02:00
Tobias Kaminsky dc0b720a2b Merge pull request #15588 from nextcloud/xavi-b/master
Add federated groups
2025-09-09 13:04:15 +02:00
Alper Öztürk 8371f2816a Merge pull request #15516 from nextcloud/refactor/make-screenshot-test-logic-generic
refactor: make screenshot test logic generic
2025-09-09 12:55:07 +02:00
xavi-b 7a020a93b0 Add federated groups
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-09 12:34:14 +02:00
alperozturk 19e44f0990 feat: do not show loading spinner
Signed-off-by: alperozturk <[email protected]>
2025-09-09 12:19:05 +02:00
Alper Öztürk f19b598f51 Merge pull request #15576 from nextcloud/fix/accessing-result-data
fix: accessing result data
2025-09-09 10:17:43 +02:00
alperozturk a33bf852ca fix: suppress EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS
Signed-off-by: alperozturk <[email protected]>
2025-09-09 09:08:04 +02:00
alperozturk f78ddf501b fix: spotbugs
Signed-off-by: alperozturk <[email protected]>
2025-09-09 09:02:11 +02:00
alperozturk d449731f9d fix: spotbugs
Signed-off-by: alperozturk <[email protected]>
2025-09-09 09:02:11 +02:00
alperozturk beccd79b29 fix: accessing result data
Signed-off-by: alperozturk <[email protected]>
2025-09-09 09:02:11 +02:00
Nextcloud bot 12b8ed756d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-09 03:06:47 +00:00
Alper Öztürk eba9f99d02 Merge pull request #15577 from nextcloud/fix/oc-file-list-bottom-sheet-dialog-npe-file
fix: oc file list bottom sheet dialog npe file
2025-09-08 13:18:35 +02:00
alperozturk c0d776a7ce fix: oc file list bottom sheet dialog npe
Signed-off-by: alperozturk <[email protected]>
2025-09-08 10:56:41 +02:00
alperozturk 9933671937 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-09-08 10:56:40 +02:00
Andy Scherzinger 9183fcb9e4 Merge pull request #15571 from nextcloud/statusBackground
Status: no background for emojis
2025-09-08 10:31:22 +02:00
Tobias Kaminsky 5f645b6cf2 Merge pull request #15543 from nextcloud/style/noid/statusButtons
Style(status): 50/50 button sizing
2025-09-08 10:16:38 +02:00
tobiasKaminsky cd394c906d Status: no background for emojis
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-08 09:32:31 +02:00
Nextcloud bot eee4f10a21 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-08 06:26:23 +00:00
Tobias Kaminsky 8862924874 Merge pull request #15570 from nextcloud/clear_status_message_after
rename text name to avoid transifex problem
2025-09-08 08:24:16 +02:00
tobiasKaminsky 34f295d3e3 rename text name to avoid transifex problem
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-08 08:00:50 +02:00
Andy Scherzinger 3bda3337aa Merge pull request #15524 from nextcloud/renovate/materialversion
fix(deps): update dependency com.google.android.material:material to v1.13.0
2025-09-06 20:27:02 +02:00
Andy Scherzinger db3e868b1d chore(lint): Update lint score
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-06 19:03:45 +02:00
Andy Scherzinger 2983d87407 fix(deps): update dependency android-common to v0.28.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-06 19:02:42 +02:00
renovate[bot] 30be0af6a2 fix(deps): update dependency com.google.android.material:material to v1.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-06 19:02:42 +02:00
Andy Scherzinger 6610b63223 Merge pull request #15550 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.3.0
2025-09-05 17:59:06 +02:00
renovate[bot] 7c82fd84f8 fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 14:31:23 +00:00
Andy Scherzinger f15308f18a Style(status): 50/50 button sizing
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 16:12:03 +02:00
Alper Öztürk f54c11e321 Merge pull request #15449 from nextcloud/fix/fetch-uploads-by-ids
fix: correct query to fetch uploads by IDs and account name
2025-09-05 16:08:27 +02:00
Andy Scherzinger d5bb3634f9 Merge pull request #15547 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.30.1
2025-09-05 15:50:54 +02:00
renovate[bot] 7d0c268340 chore(deps): update github/codeql-action action to v3.30.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 13:49:20 +00:00
alperozturk 89e0def4f7 fix: add account check logic
Signed-off-by: alperozturk <[email protected]>
2025-09-05 15:47:21 +02:00
alperozturk caf7be5bea refactor: revert master if check
Signed-off-by: alperozturk <[email protected]>
2025-09-05 15:47:21 +02:00
alperozturk 0ce0653d64 refactor: remove unused upload storage manager functions
Signed-off-by: alperozturk <[email protected]>
2025-09-05 15:47:21 +02:00
alperozturk bd94526ce2 fix: correct DAO query to fetch uploads by IDs and account name
Previously, the DAO was returning incorrect uploads because it did not filter by both
IDs and account name properly. This fixes the query to ensure only uploads that
match the provided IDs and the given account name are returned.

Signed-off-by: alperozturk <[email protected]>
2025-09-05 15:47:21 +02:00
alperozturk 37df0dca9d fix: download progress listener
Signed-off-by: alperozturk <[email protected]>
2025-09-05 15:46:21 +02:00
Alper Öztürk 05e83cb275 Merge pull request #15541 from nextcloud/refactor/reduce-spotbugs
refactor: reduce spotbugs
2025-09-05 15:46:05 +02:00
alperozturk c06be56a54 fix: manage space activity back button
Signed-off-by: alperozturk <[email protected]>
2025-09-05 15:42:57 +02:00
alperozturk 196a1937e1 refactor: reduce file operation helper spotbugs
Signed-off-by: alperozturk <[email protected]>
2025-09-05 11:54:38 +02:00
alperozturk 3ff3226f43 refactor: reduce file operation helper spotbugs
Signed-off-by: alperozturk <[email protected]>
2025-09-05 11:30:29 +02:00
alperozturk ff0e98610d fix: add cleanup function
Signed-off-by: alperozturk <[email protected]>
2025-09-05 11:30:29 +02:00
alperozturk 08a431ad6f fix: add sync icon for downloaded folder
Signed-off-by: alperozturk <[email protected]>
2025-09-05 11:30:29 +02:00
Andy Scherzinger 1b8922fc8c Merge pull request #15441 from nextcloud/busy
split up set status dialog
2025-09-05 11:21:16 +02:00
Alper Öztürk 159ed52397 Merge pull request #15528 from nextcloud/fix/stuck-sync-dialog
fix: stuck sync dialog
2025-09-05 10:48:58 +02:00
Alper Öztürk 2088049bf6 Merge pull request #15536 from nextcloud/fix/manage-space-activity-screen
fix: manage space activity screen
2025-09-05 10:44:42 +02:00
alperozturk 3a1ff78ab4 fix: manage space activity status bar
Signed-off-by: alperozturk <[email protected]>
2025-09-05 09:02:47 +02:00
Andy Scherzinger 7a93e41f09 fix(test): Update tests for new bottomsheet constructor
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:41:13 +02:00
Andy Scherzinger 25efa940f2 fix(ktlint): Remove whitespace character
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:04 +02:00
Andy Scherzinger 84f184a1f0 style: Impreove status bottom sheet layout alignments
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:03 +02:00
Andy Scherzinger b83c36cf9e fix(lint): Remove unused file
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:03 +02:00
Andy Scherzinger bab32993e3 Style(status): Improve button sizing
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:02 +02:00
Andy Scherzinger 6137573286 style(status): Make invisible status color dark/light aware
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:02 +02:00
tobiasKaminsky c6d5ab94c7 busy is only shown with NC32
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-05 08:08:01 +02:00
Andy Scherzinger 3b50aeb33d style(status): Add more spacing between elements
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:01 +02:00
Andy Scherzinger b309a3268a style(status): Change cards styling to be more M3 card view aligned
Signed-off-by: Andy Scherzinger <[email protected]>
2025-09-05 08:08:00 +02:00
tobiasKaminsky 68d22b8748 split up set status dialog
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-05 08:07:59 +02:00
Nextcloud bot ad79ed3daa fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-05 03:03:45 +00:00
Andy Scherzinger 6bed9e6791 Merge pull request #15530 from nextcloud/renovate/codecov-codecov-action-5.x
chore(deps): update codecov/codecov-action action to v5.5.1
2025-09-04 18:54:31 +02:00
alperozturk 57810705ab fix: manage space activity screen
Signed-off-by: alperozturk <[email protected]>
2025-09-04 17:04:17 +02:00
renovate[bot] 644e48f8ad chore(deps): update codecov/codecov-action action to v5.5.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 14:58:11 +00:00
alperozturk ba31ccffc3 fix: stuck sync dialog
Signed-off-by: alperozturk <[email protected]>
2025-09-04 16:41:34 +02:00
Alper Öztürk b4aff053ba Merge pull request #15475 from nextcloud/fix/empty-list-text-state-handling
fix: empty list state handling
2025-09-04 16:10:24 +02:00
alperozturk b846aa56c2 fix: initial thumbnail generation
Signed-off-by: alperozturk <[email protected]>
2025-09-04 12:40:24 +02:00
Andy Scherzinger a7f50c1450 Merge pull request #15523 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.7
2025-09-04 07:35:05 +02:00
Andy Scherzinger 1e1d64c041 Merge pull request #15525 from nextcloud/renovate/actions-stale-10.x
chore(deps): update actions/stale action to v10
2025-09-04 07:33:42 +02:00
renovate[bot] 6ca492a11d chore(deps): update actions/stale action to v10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 05:03:12 +00:00
renovate[bot] b9405370ea fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 04:58:05 +00:00
Nextcloud bot 170b223561 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-04 02:57:30 +00:00
alperozturk e7b137368e refactor: make screenshot test logic generic
Signed-off-by: alperozturk <[email protected]>
2025-09-03 14:32:27 +02:00
Alper Öztürk 25a4ee37d4 Merge pull request #15453 from nextcloud/perf/remove-file
perf: increase file deletion performance 🚀
2025-09-03 11:19:04 +02:00
Alper Öztürk 737a489a0d Merge pull request #15459 from nextcloud/dropNC19
Drop NC18/19
2025-09-03 11:09:43 +02:00
tobiasKaminsky a859cf1639 Drop NC18/19
Signed-off-by: tobiasKaminsky <[email protected]>
2025-09-03 11:07:08 +02:00
alperozturk 48ce57e631 refactor: remove unnecessary extra handler
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:55:14 +02:00
alperozturk 6b0eed42af fix: empty list state argument
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:52:55 +02:00
alperozturk 26680fc9c5 fix: empty list state
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:52:55 +02:00
alperozturk b880273e52 fix: empty list state
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:52:55 +02:00
alperozturk b0b9c41c50 fix: empty list text
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:52:55 +02:00
alperozturk a398bb964c chore: reduce spotbugs
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:51:28 +02:00
alperozturk d0cc3a858b add: generate resize image if image is deleted only locally, to save server request
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:49:17 +02:00
alperozturk 63ed7704c6 perf: display the snackbar message only when a single file is deleted.
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:49:17 +02:00
alperozturk 6bd8269083 perf: display the snackbar message only when more than one file is deleted
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:49:17 +02:00
alperozturk 16ac534ca9 perf: increase file deletion performance
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:49:17 +02:00
alperozturk 1f42252bb2 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-09-03 10:49:17 +02:00
Alper Öztürk 9a0447d8e7 Merge pull request #15511 from nextcloud/fix/file-detail-share-fragment-remote-share-repo-npe-init
fix: npe init of remote share repository
2025-09-03 10:20:24 +02:00
Tobias Kaminsky a71209a8e3 Merge pull request #15440 from nextcloud/feat/metadata-sync-worker
feat: metadata worker 🚀
2025-09-03 09:51:19 +02:00
alperozturk a7135c46a7 fix: check file storage manager npe
Signed-off-by: alperozturk <[email protected]>
2025-09-03 09:25:49 +02:00
alperozturk 49ca25ca7f fix: npe init of remote share repository
Signed-off-by: alperozturk <[email protected]>
2025-09-03 09:24:31 +02:00
renovate[bot] a393f6f3d0 chore(deps): update ubuntu:noble docker digest to 9cbed75 (#15510)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-03 07:21:53 +00:00
Alper Öztürk c34a8cdd0c Merge pull request #15504 from nextcloud/chore/dependencies-toml-3
chore: add more dependencies to toml
2025-09-03 08:58:40 +02:00
Nextcloud bot 715db982b7 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-03 02:56:34 +00:00
Andy Scherzinger 693e0404c7 Merge pull request #15508 from nextcloud/renovate/androidpluginversion
fix(deps): update dependency com.android.tools.build:gradle to v8.13.0
2025-09-03 01:42:10 +02:00
renovate[bot] 1a3dd76e44 fix(deps): update dependency com.android.tools.build:gradle to v8.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-02 20:32:05 +00:00
Andy Scherzinger b7c495b7ec Merge pull request #15495 from nextcloud/feat/separate-view-holder-for-recommended-files
feat: add recommended item view holder
2025-09-02 22:11:15 +02:00
alperozturk b79e6371bb chore: add regions to the toml
Signed-off-by: alperozturk <[email protected]>
2025-09-02 17:25:35 +02:00
alperozturk af08563a22 chore: add regions to the dependencies
Signed-off-by: alperozturk <[email protected]>
2025-09-02 17:18:34 +02:00
alperozturk aa88901c54 chore: add new dependencies to the toml file
Signed-off-by: alperozturk <[email protected]>
2025-09-02 17:14:40 +02:00
alperozturk 0e0707a745 refactor: remove unused code
Signed-off-by: alperozturk <[email protected]>
2025-09-02 16:43:24 +02:00
alperozturk f21edf0676 chore: reduce lint
Signed-off-by: alperozturk <[email protected]>
2025-09-02 16:41:34 +02:00
alperozturk a534e51c5b refactor: simplify code
Signed-off-by: alperozturk <[email protected]>
2025-09-02 16:41:17 +02:00
alperozturk ec3557fd5c fix: multi select
Signed-off-by: alperozturk <[email protected]>
2025-09-02 16:19:00 +02:00
alperozturk 5c68528f66 fix: disable multi select since cannot recommended file cannot have multi select actions
Signed-off-by: alperozturk <[email protected]>
2025-09-02 16:07:35 +02:00
alperozturk 0a79fbc0da fix: recommended file actions
Signed-off-by: alperozturk <[email protected]>
2025-09-02 15:05:04 +02:00
alperozturk 42195c2e94 fix: recommended file actions
Signed-off-by: alperozturk <[email protected]>
2025-09-02 15:04:16 +02:00
alperozturk 529785d9dc fix: recommended file item layout alignment 2025-09-02 14:41:48 +02:00
alperozturk 3b4eee4308 feat: add recommended item view holder
Signed-off-by: alperozturk <[email protected]>
2025-09-02 14:12:34 +02:00
Alper Öztürk a4b5712e5c Merge pull request #15501 from nextcloud/fix/recommended-files-consider-account-during-caching
fix: add account name to fetch recommended files
2025-09-02 14:12:11 +02:00
alperozturk b80d726fd0 add: new db schema 2025-09-02 13:37:30 +02:00
alperozturk f4ddbf5c33 chore: remove unnecessary db version 2025-09-02 12:28:45 +02:00
alperozturk ea5bfa4be0 chore: kotlin spotless check 2025-09-02 12:27:52 +02:00
alperozturk 2102e689f8 fix: user selection 2025-09-02 12:27:06 +02:00
alperozturk dec952328a fix: add account name to fetch recommended files
Signed-off-by: alperozturk <[email protected]>
2025-09-02 11:57:32 +02:00
Andy Scherzinger f4a098bbd6 Merge pull request #15500 from nextcloud/renovate/ubuntu-noble
chore(deps): update ubuntu:noble docker digest to f3b7f1b
2025-09-02 07:29:28 +02:00
renovate[bot] 1c77c7d896 chore(deps): update ubuntu:noble docker digest to f3b7f1b
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-02 04:21:42 +00:00
Nextcloud bot 14dbf15b4f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-02 02:56:32 +00:00
Andy Scherzinger d37d844513 Merge pull request #15497 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.30.0
2025-09-01 19:35:05 +02:00
renovate[bot] ca57da7683 chore(deps): update github/codeql-action action to v3.30.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-01 16:27:26 +00:00
Alper Öztürk c618521bd7 Merge pull request #15463 from nextcloud/fix/extended-list-fragment-on-key-listener
fix: extended list fragment on key listener
2025-09-01 14:51:13 +02:00
Alper Öztürk 50c2ffac49 Merge pull request #15402 from nextcloud/feat/enhance-recommended-files
feat: enhance recommended file list
2025-09-01 14:46:29 +02:00
Alper Öztürk c8847d66b6 Merge pull request #15487 from nextcloud/fix/offline-operations-sync
fix: offline operations worker
2025-09-01 14:44:55 +02:00
alperozturk c6a7b09056 chore: code analytics
Signed-off-by: alperozturk <[email protected]>
2025-09-01 11:19:03 +02:00
alperozturk 8903f65547 fix: notification initial progress count
Signed-off-by: alperozturk <[email protected]>
2025-09-01 11:17:05 +02:00
alperozturk 1aeaa69747 fix: do not kill previous worker
Signed-off-by: alperozturk <[email protected]>
2025-09-01 11:16:20 +02:00
alperozturk 19a3e4ced1 fix: create file operation path
Signed-off-by: alperozturk <[email protected]>
2025-09-01 10:53:35 +02:00
alperozturk 99262748d0 fix: execution logic
Signed-off-by: alperozturk <[email protected]>
2025-09-01 10:32:43 +02:00
alperozturk a61b242444 fix: notification dismiss logic
Signed-off-by: alperozturk <[email protected]>
2025-09-01 09:43:08 +02:00
Alper Öztürk eea9580f54 Merge pull request #15451 from nextcloud/feat/better-offline-operation-notification-handling
feat: better offline operations notification handling
2025-09-01 09:11:50 +02:00
Nextcloud bot a5b988cd4b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-09-01 02:53:51 +00:00
Andy Scherzinger 448a5f817f Merge pull request #15478 from nextcloud/renovate/com.mebigfatguy.fb-contrib-fb-contrib-7.x
fix(deps): update dependency com.mebigfatguy.fb-contrib:fb-contrib to v7.6.14
2025-08-30 07:09:30 +02:00
Nextcloud bot 9969e146a3 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-30 02:55:30 +00:00
renovate[bot] 4f7c5a7f99 fix(deps): update dependency com.mebigfatguy.fb-contrib:fb-contrib to v7.6.14
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-30 00:50:02 +00:00
Andy Scherzinger d73545928a Merge pull request #15464 from nextcloud/feat/preview-image-activity-better-display-cutout-handling
feat: preview image activity better display cutout handling
2025-08-29 21:23:27 +02:00
alperozturk 89c3e20e43 feat: add display cutout check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 13:17:26 +02:00
alperozturk fa71fd145e chore: resolve codacy code analysis
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:56:29 +02:00
alperozturk 30a02e5ea0 fix: eTag check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:48:43 +02:00
alperozturk 02f5686aa5 fix: eTag check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:47:50 +02:00
alperozturk 0d3cbf9983 fix: eTag check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:44:32 +02:00
alperozturk 8e4253dcaf fix: eTag check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:42:07 +02:00
alperozturk 98f2e883c8 add: empty eTag check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:25:28 +02:00
alperozturk 5c3dae18af perf: remove unnecessary checks
Signed-off-by: alperozturk <[email protected]>
2025-08-29 12:02:49 +02:00
alperozturk fc55795967 fix: remove redundant code to prevent unnecessary power management popups for specific brands
Signed-off-by: alperozturk <[email protected]>
2025-08-29 11:49:44 +02:00
alperozturk 8845986198 perf: remove unnecessary checks
Signed-off-by: alperozturk <[email protected]>
2025-08-29 11:43:12 +02:00
alperozturk c283c0e9f3 perf: increase eTag check performance no need to have oc file
Signed-off-by: alperozturk <[email protected]>
2025-08-29 10:44:56 +02:00
alperozturk 0d430ab61e add: onlyFileMetadata true
Signed-off-by: alperozturk <[email protected]>
2025-08-29 09:54:58 +02:00
alperozturk eee561f79d add: up-to-date subfolders
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 2899c21bc0 add: eTag check
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 63036905a4 add: current dir to subfolders
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 846b832695 fix: spotbugs
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 4c3ca044c2 chore: fix codacy analytics
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 0b1e1885bc add: detailed logs
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk b16ce04487 add: detailed logs
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk d4a2ef98b2 add: detailed logs
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 8d2096ac96 add: etag related logs
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk f1ba224b4d fix: metadata worker sync logic
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk 568026c325 add: metadata worker sync logic
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
alperozturk f77044b48a add: metadata worker
Signed-off-by: alperozturk <[email protected]>
2025-08-29 08:48:51 +02:00
Andy Scherzinger 2b0655447e Merge pull request #15467 from nextcloud/renovate/androidpluginversion
fix(deps): update dependency com.android.tools.build:gradle to v8.12.2
2025-08-29 07:54:19 +02:00
Andy Scherzinger d48d3fb2c5 Merge pull request #15468 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.6
2025-08-29 07:53:27 +02:00
Nextcloud bot 5d74deda1b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-29 02:58:32 +00:00
renovate[bot] 5aef9077bc fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 00:50:25 +00:00
renovate[bot] 6e4bb2bde7 fix(deps): update dependency com.android.tools.build:gradle to v8.12.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 00:48:30 +00:00
alperozturk 6c2996253d fix: extended list fragment on key listener
Signed-off-by: alperozturk <[email protected]>
2025-08-28 14:17:32 +02:00
alperozturk 75d6becf23 add: logs
Signed-off-by: alperozturk <[email protected]>
2025-08-28 11:00:31 +02:00
alperozturk 1c47a34e21 add: cancel text
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:49:06 +02:00
alperozturk 8583b560d7 feat: add offline operation notification channel and cancel notification action
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:49:06 +02:00
alperozturk f2be557682 add: edge to edge support for recommended file list
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk 04fc3eb489 chore: resolve lint warnings
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk 2bb557611f chore: codacy static code analytics
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk fa3bdf3095 chore: resolve merge conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk 6baa4b1513 fix: use oc file in the adapter
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk 0c094743c4 add: caching mechanism
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk bdc42311b9 add: recommended file entity usage
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk 5571bcbab1 add: recommended file entity to database
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk b56fe51346 fix: recommend file multi select
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk aa26ff24da add: oc file list grid item view holder
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
alperozturk 295e79f2d9 fix: thumbnail and icon appearance
Signed-off-by: alperozturk <[email protected]>
2025-08-28 10:41:01 +02:00
Tobias Kaminsky ce685646ed Merge pull request #15443 from nextcloud/refactor/remove-unused-rename-public-share-dialog-fragment
refactor: remove unused rename public share dialog fragment
2025-08-28 09:12:48 +02:00
Tobias Kaminsky 2ec0896945 Merge pull request #15392 from nextcloud/fix/share-updating
fix: share updating
2025-08-28 09:05:25 +02:00
alperozturk 1157919a64 fix: lint
Signed-off-by: alperozturk <[email protected]>
2025-08-28 08:51:46 +02:00
alperozturk 7a9ccf113d refactor: remove unused rename public share dialog fragment
Signed-off-by: alperozturk <[email protected]>
2025-08-28 08:48:42 +02:00
Nextcloud bot 75e8727b0a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-28 02:57:45 +00:00
Andy Scherzinger f2ccc6f82f Merge pull request #15455 from nextcloud/renovate/lifecycleviewmodelktxversion
fix(deps): update lifecycleviewmodelktxversion to v2.9.3
2025-08-27 23:59:38 +02:00
renovate[bot] 760b05436e fix(deps): update lifecycleviewmodelktxversion to v2.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 21:08:52 +00:00
Andy Scherzinger 0a1aec1969 Merge pull request #15454 from nextcloud/renovate/composebom
fix(deps): update dependency androidx.compose:compose-bom to v2025.08.01
2025-08-27 22:51:40 +02:00
Andy Scherzinger 3291d5bd21 Merge pull request #15445 from nextcloud/renovate/kotlin-monorepo
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.2.10
2025-08-27 22:50:53 +02:00
renovate[bot] 48e692718d fix(deps): update dependency androidx.compose:compose-bom to v2025.08.01
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 19:33:03 +00:00
renovate[bot] fe18db0b9b fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.2.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 21:18:22 +02:00
Andy Scherzinger 3258c51ad9 Merge pull request #15385 from nextcloud/renovate/com.mebigfatguy.fb-contrib-fb-contrib-7.x
fix(deps): update dependency com.mebigfatguy.fb-contrib:fb-contrib to v7.6.13
2025-08-27 21:17:13 +02:00
renovate[bot] 37f5cf0a51 fix(deps): update dependency com.mebigfatguy.fb-contrib:fb-contrib to v7.6.13
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 12:18:45 +02:00
Andy Scherzinger b42f88eea3 Merge pull request #15358 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.5
2025-08-27 12:18:23 +02:00
alperozturk b29a9072b4 add: share remote id check to the update share info action
Signed-off-by: alperozturk <[email protected]>
2025-08-27 08:44:57 +02:00
alperozturk 402075dab1 fix: share updating
Signed-off-by: alperozturk <[email protected]>
2025-08-27 08:37:07 +02:00
renovate[bot] 284addaeb5 fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 04:31:02 +00:00
Nextcloud bot 9a5def6c91 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-27 02:56:03 +00:00
Andy Scherzinger 18851098a8 Merge pull request #15444 from nextcloud/chore/dependencies-toml-2
chore: update dependencies to TOML format
2025-08-26 20:34:05 +02:00
alperozturk 6d1830be74 chore: update dependencies to TOML format
Signed-off-by: alperozturk <[email protected]>
2025-08-26 17:09:00 +02:00
Alper Öztürk c2a7ad454c Merge pull request #15413 from nextcloud/fix/emptiness-check
fix: empty user input checks
2025-08-26 16:13:43 +02:00
Alper Öztürk 1463c2502d Merge pull request #15437 from nextcloud/perf/remove-e2ee-refresh-folder-event
perf: improve e2ee file upload performance
2025-08-26 14:24:08 +02:00
Alper Öztürk 21c2cfee90 Merge pull request #15432 from nextcloud/fix/preview-media-activity-layout
fix: preview media activity layout
2025-08-26 11:23:12 +02:00
Nextcloud bot f77d913d3e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-26 07:06:25 +00:00
Andy Scherzinger 0928eba4db Merge pull request #15411 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-26 07:13:29 +02:00
Andy Scherzinger bf34e2b483 Merge pull request #15421 from nextcloud/update-library-2025-08-24
Update library to 2025-08-24
2025-08-26 07:12:58 +02:00
Andy Scherzinger 660a508d0a Merge pull request #15433 from nextcloud/fix/share-link-label
fix: share link label
2025-08-26 07:12:03 +02:00
Nextcloud bot 63f237c7d6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-26 02:55:52 +00:00
nextcloud-android-bot e3c32f5355 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-26 02:33:03 +00:00
Andy Scherzinger b9b546411c Merge pull request #15436 from nextcloud/chore/dependencies-toml
chore: convert androidx dependencies to TOML format
2025-08-25 22:46:40 +02:00
Andy Scherzinger 5e0b95a6f5 Merge pull request #15435 from nextcloud/3.34.0-next-minor-version
add: 3.34.0 next minor release
2025-08-25 18:55:40 +02:00
alperozturk a442571c3a perf: improve e2ee file upload performance
Signed-off-by: alperozturk <[email protected]>
2025-08-25 16:21:45 +02:00
alperozturk e35b8ae3b0 chore: convert androidx dependencies to TOML format
Signed-off-by: alperozturk <[email protected]>
2025-08-25 16:02:05 +02:00
Alper Öztürk e3114f29c6 Merge pull request #15434 from nextcloud/fix/login-flow-2-margin
fix: login flow v2 margin
2025-08-25 15:50:09 +02:00
alperozturk 105b98f0ee add: 3.34.0 next minor release
Signed-off-by: alperozturk <[email protected]>
2025-08-25 15:48:18 +02:00
Alper Öztürk eea5a27196 Merge pull request #15430 from nextcloud/release/version-bumps-3.33.0
add: version bumps to android 8.1
2025-08-25 15:02:36 +02:00
alperozturk 0fc66177e0 fix: v27 styles
Signed-off-by: alperozturk <[email protected]>
2025-08-25 14:59:22 +02:00
alperozturk 67e73b6165 revert styles changes
Signed-off-by: alperozturk <[email protected]>
2025-08-25 14:55:12 +02:00
alperozturk 42e966f7bc revert styles changes
Signed-off-by: alperozturk <[email protected]>
2025-08-25 14:54:44 +02:00
alperozturk 4a6c006741 remove: unavailable resource files
Signed-off-by: alperozturk <[email protected]>
2025-08-25 14:51:34 +02:00
alperozturk 81acf16099 add: version bumps to android 8.1
Signed-off-by: alperozturk <[email protected]>
2025-08-25 14:51:34 +02:00
Alper Öztürk b11093eace Merge pull request #15412 from nextcloud/fix/unnecessary-refresh-folder-event-triggers
fix: unnecessary refresh folder event triggers 🚀
2025-08-25 14:42:24 +02:00
alperozturk 09f2615e26 fix: login flow v2 margin
Signed-off-by: alperozturk <[email protected]>
2025-08-25 13:31:31 +02:00
alperozturk 30f217ef6e fix: share link label
Signed-off-by: alperozturk <[email protected]>
2025-08-25 13:05:16 +02:00
alperozturk aa11388cbe fix: preview media activity layout
Signed-off-by: alperozturk <[email protected]>
2025-08-25 11:28:56 +02:00
Andy Scherzinger a251356d2e Merge pull request #15428 from nextcloud/fix/extended-file-list-fragment-back-press-npe
fix: extended list fragment current npe
2025-08-25 10:01:21 +02:00
alperozturk e5b9849e36 fix: extended list fragment current npe
Signed-off-by: alperozturk <[email protected]>
2025-08-25 09:29:59 +02:00
Tobias Kaminsky 2e337af091 Update library to 2025-08-24
Signed-off-by: Tobias Kaminsky <[email protected]>
2025-08-24 00:01:23 +02:00
Andy Scherzinger e21ed79d3f Merge pull request #15388 from nextcloud/fix/left-to-right-filename-sanitization-v2
fix: left to right filename sanitization
2025-08-23 09:34:33 +02:00
Nextcloud bot db193872b2 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-23 02:57:36 +00:00
Andy Scherzinger d3cc4d8454 Merge pull request #15356 from nextcloud/renovate/kotlin
chore(deps): update kotlin to v2.2.10
2025-08-22 17:22:33 +02:00
Andy Scherzinger e22ed33ee1 Merge pull request #15414 from nextcloud/fix/splash-logo-alignment
fix: splash logo alignment
2025-08-22 16:59:53 +02:00
alperozturk c72abc8d69 add: landscape guideline
Signed-off-by: alperozturk <[email protected]>
2025-08-22 16:26:57 +02:00
alperozturk 74a6356f92 add: landscape guideline
Signed-off-by: alperozturk <[email protected]>
2025-08-22 16:26:52 +02:00
alperozturk df57012a84 fix: empty user input checks
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:47:40 +02:00
alperozturk 013caa14c9 remove: file list grid controller
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 618330cacb fix: codacy analysis title max width
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk b4451ec013 fix: title layout alignment
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 2f9da59fd5 add: max file name
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk b8fe4e3c8f fix: title max width
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk e31d94af95 fix: title max width
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 1dfb02b8f5 add: missing bidi character
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 2a7f54f694 fix: layout alignment
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 2aab5de022 fix: file features layout alignment
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 82e8de22cb fix: layout padding
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk c713db1328 fix: more button alignment
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 6a5791785c fix: use only one more button
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk d863a8b90d add: new tests
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk a7c0f2e755 add: new tests
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk f3cfd576c2 fix: dodgy code in oc file list adapter
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 27194f2617 add: title and extension in file actions bottom sheet
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 4f38a4f4d8 add: grid layout recalculation
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 1e2b1ea8e1 bi,di2
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 345367f8e0 add: more button margin
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 600ca3cfd0 fix: git conflicts
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk e256b29d60 fix: folder name max width
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 54d468bdbc fix: padding between thumbnail and file name
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 739f21aca6 fix: overly concrete parameter usage
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 3872e0ec36 add: filename container to the grid view holder
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 632b54e665 add: simpler configuration functions
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 0eb2b07a1e add: orientation utility function
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 73692d0c4b add: file name landscape margin value
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 9a7a8e2681 fix: configure only for grid view
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 00cfdaa170 fix: layout for small screen devices
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 2ce7fa6c3f fix: layout order
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk acc424672a add: dimens for grid layout
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk e3a0d9e6cc fix: path of screenshot test
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 60b190b8f5 fix: more button layout constraint
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 55487a4b0a add: unit and screenshot tests
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk f9e8000928 add: extension text view element
Signed-off-by: alperozturk <[email protected]>
2025-08-22 15:16:40 +02:00
alperozturk 9706c451b3 fix: network listener on refresh
Signed-off-by: alperozturk <[email protected]>
2025-08-22 11:33:12 +02:00
alperozturk 26de62b0f1 fix: remove unnecessary refresh folder events
Signed-off-by: alperozturk <[email protected]>
2025-08-22 11:19:19 +02:00
renovate[bot] 5bef6b6161 chore(deps): update dependency com.google.devtools.ksp to v2.2.10-2.0.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-22 10:07:31 +02:00
renovate[bot] b18bafba99 chore(deps): update kotlin to v2.2.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-22 10:04:04 +02:00
Andy Scherzinger c3187eed04 Merge pull request #15405 from nextcloud/renovate/daggerversion
fix(deps): update daggerversion to v2.57.1
2025-08-22 09:52:27 +02:00
Alper Öztürk 94d64aaa73 Merge pull request #14948 from nextcloud/javawarnings
Various Small Optimizations
2025-08-22 08:59:21 +02:00
renovate[bot] 3efb7dc1b1 fix(deps): update daggerversion to v2.57.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-22 04:28:11 +00:00
Nextcloud bot fe3ece4bd6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-22 02:56:18 +00:00
Andy Scherzinger ffe6da3b03 Merge pull request #15403 from nextcloud/renovate/codecov-codecov-action-5.x
chore(deps): update codecov/codecov-action action to v5.5.0
2025-08-21 23:30:03 +02:00
Andy Scherzinger cb74de9ea1 Merge pull request #15410 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.29.11
2025-08-21 23:28:14 +02:00
Alex Knop 2ba9064186 touching up
Signed-off-by: Alex Knop <[email protected]>
2025-08-21 14:55:24 -04:00
Alex Knop fe019fe8a1 readability
Signed-off-by: Alex Knop <[email protected]>
2025-08-21 14:55:24 -04:00
Alex Knop ed9ea6a619 java warning fixes
Signed-off-by: Alex Knop <[email protected]>
2025-08-21 14:55:24 -04:00
renovate[bot] ebf770fd0c chore(deps): update codecov/codecov-action action to v5.5.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 14:25:46 +00:00
renovate[bot] 8ca9a6bf21 chore(deps): update github/codeql-action action to v3.29.11
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 14:13:57 +00:00
Alper Öztürk 89308e8358 Merge pull request #15400 from nextcloud/fix/restart-intent-action
fix: file display activity restart intent handling
2025-08-21 10:22:07 +02:00
alperozturk d9b8637fde fix: file display activity restart intent handling
Signed-off-by: alperozturk <[email protected]>
2025-08-21 09:43:11 +02:00
Andy Scherzinger 96451c0d03 Merge pull request #15406 from nextcloud/renovate/actions-setup-java-5.x
chore(deps): update actions/setup-java action to v5
2025-08-21 08:08:19 +02:00
renovate[bot] 8d2baa17a8 chore(deps): update actions/setup-java action to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 04:23:43 +00:00
Alper Öztürk f24ef3a4f2 Merge pull request #15161 from nextcloud/bugfix/gallery-image-scaling
fix: gallery image scaling
2025-08-20 14:13:07 +02:00
Tobias Kaminsky 6979ce88ca Merge pull request #15399 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-20 12:46:13 +02:00
nextcloud-android-bot bd67ee4aed 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-20 10:09:06 +00:00
alperozturk 34e62bf3af fix: codacy detect get image size
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:55:07 +02:00
alperozturk 7c8ef33957 fix: first time layout loading
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 4a7eb53ecc fix: inconsistency detection
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 970aba2ebc scale better
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 729d7a4d35 fix kt spotless fix
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk c3230d1e40 do not use scale for downloaded images
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 33060c85e6 better debug
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 1d03bbea38 optimizations
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 91b6d78bf9 kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 43125e461e revert
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 6aa2e9ad06 revert
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
tobiasKaminsky f034dba42b - use width and height for imageView
- do not use scaleType, since this would also scale, if width/height is slightly off

Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 5d185f91e6 fix
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 2745352940 create OCFileUtils.kt
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 4af230007f temp
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk 5b77729006 temp
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
alperozturk f663a4d9a2 temp
Signed-off-by: alperozturk <[email protected]>
2025-08-20 11:54:04 +02:00
Alper Öztürk 4c297865db Merge pull request #15351 from nextcloud/fix/file-display-activity-intent-handling
fix: file display activity intent handling
2025-08-20 11:15:56 +02:00
Andy Scherzinger 7febaa084f Merge pull request #15398 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-20 11:01:05 +02:00
nextcloud-android-bot 7407708025 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-20 08:31:59 +00:00
alperozturk 0181865985 fix: file display activity kotlin spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-20 10:18:15 +02:00
alperozturk cb8ade66a5 add: handle intents in kt file
Signed-off-by: alperozturk <[email protected]>
2025-08-20 10:17:34 +02:00
Alper Öztürk c2f4b8aaa6 Merge pull request #14982 from nextcloud/add-create-rich-workspace-to-file-repository
Add CreateRichWorkspace To RemoteFilesRepository
2025-08-20 10:17:18 +02:00
Alper Öztürk df099a6587 Merge pull request #15384 from nextcloud/fix/empty-file-display-activity
fix: settings activity back button behaviour
2025-08-20 10:16:40 +02:00
Tobias Kaminsky 294a1f2bdb Merge pull request #15383 from nextcloud/fix/inform-user-for-same-file-upload
fix: inform user for same file upload
2025-08-20 09:53:41 +02:00
Tobias Kaminsky 6791e830fa Merge pull request #15394 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-20 09:43:20 +02:00
alperozturk dbf34dfd03 fix: correct client usage
Signed-off-by: alperozturk <[email protected]>
2025-08-20 09:21:04 +02:00
alperozturk 4e13a133ea fix: correct client usage
Signed-off-by: alperozturk <[email protected]>
2025-08-20 09:18:48 +02:00
alperozturk 74d6ad3ed0 add createRichWorkspace
Signed-off-by: alperozturk <[email protected]>
2025-08-20 08:59:59 +02:00
tobiasKaminsky bbe2db3e87 license
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-20 08:59:11 +02:00
nextcloud-android-bot 6a5e37d9d6 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-20 08:56:52 +02:00
nextcloud-android-bot a46c8eac31 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-20 06:32:56 +00:00
Nextcloud bot 4178971111 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-20 02:56:31 +00:00
Alper Öztürk 4d30751614 Merge pull request #15386 from nextcloud/fix/capabilities-npe-check-on-update-header
fix: update header null pointer exceptions
2025-08-19 16:40:12 +02:00
Tobias Kaminsky d1949adc9e Merge pull request #15393 from nextcloud/moveQA
QA will now be via config repo
2025-08-19 16:02:03 +02:00
tobiasKaminsky 84b08ca168 QA will now be via config repo
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-19 15:58:34 +02:00
alperozturk a740bf3c3b fix: update header null pointer exceptions
Signed-off-by: alperozturk <[email protected]>
2025-08-19 13:31:35 +02:00
Tobias Kaminsky 01bf6eb912 Merge pull request #15390 from nextcloud/fix/notification-upload-index
fix: notification upload index
2025-08-19 13:18:26 +02:00
alperozturk 68808cfd0c add: update comment
Signed-off-by: alperozturk <[email protected]>
2025-08-19 10:41:48 +02:00
alperozturk 17154f2819 fix: settings activity back button behaviour
Signed-off-by: alperozturk <[email protected]>
2025-08-19 10:41:48 +02:00
alperozturk eae5ec5706 fix: notification upload index
Signed-off-by: alperozturk <[email protected]>
2025-08-19 09:33:58 +02:00
Alper Öztürk e3d56940db Merge pull request #15184 from nextcloud/uploadManyManyItems
Fix: App is ANR when uploadig 5000 items
2025-08-19 09:20:45 +02:00
tobiasKaminsky 0c7d95d6d3 Merge remote-tracking branch 'origin/uploadManyManyItems' into uploadManyManyItems
# Conflicts:
#	app/src/main/java/com/nextcloud/client/jobs/upload/FileUploadWorker.kt

Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-19 07:43:45 +02:00
tobiasKaminsky 935a4b2ecb magic number
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-19 07:41:30 +02:00
Nextcloud bot 00dec45b55 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-19 02:56:06 +00:00
Andy Scherzinger bc164ee2ad Merge pull request #15287 from nextcloud/renovate/androidx.test-orchestrator-1.x
fix(deps): update dependency androidx.test:orchestrator to v1.6.1
2025-08-18 23:42:55 +02:00
renovate[bot] 8638e736da fix(deps): update dependency androidx.test:orchestrator to v1.6.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 21:29:29 +00:00
Andy Scherzinger 5cc39843fd Merge pull request #15389 from nextcloud/renovate/androidpluginversion
fix(deps): update dependency com.android.tools.build:gradle to v8.12.1
2025-08-18 23:03:43 +02:00
renovate[bot] 44e48ee939 fix(deps): update dependency com.android.tools.build:gradle to v8.12.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 17:47:45 +00:00
Andy Scherzinger 9021f3476e Merge pull request #15353 from nextcloud/renovate/androidx.fragment-fragment-ktx-1.x
fix(deps): update dependency androidx.fragment:fragment-ktx to v1.8.9
2025-08-18 19:35:30 +02:00
Andy Scherzinger 13213f8656 ci(chksm): Add meta data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-08-18 18:11:37 +02:00
tobiasKaminsky 54fbf38afa Update UI only every 100th upload
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-18 18:04:05 +02:00
renovate[bot] 522b554897 fix(deps): update dependency androidx.fragment:fragment-ktx to v1.8.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 18:04:04 +02:00
tobiasKaminsky 62f7cd833a Update UI only every 100th upload
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-18 17:25:10 +02:00
Tobias Kaminsky 862d5979e7 Merge pull request #15380 from nextcloud/convert/file-display-activity-to-kotlin
convert: file display activity to Kotlin 🎉
2025-08-18 17:22:03 +02:00
Tobias Kaminsky 8be6367956 Merge pull request #15371 from nextcloud/update-library-2025-08-17
Update library to 2025-08-17
2025-08-18 17:15:10 +02:00
Andy Scherzinger ad288c772f Merge pull request #15387 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.29.10
2025-08-18 15:14:30 +02:00
renovate[bot] 50c01bf69b chore(deps): update github/codeql-action action to v3.29.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 12:30:25 +00:00
Tobias Kaminsky a97ee4145e Update library to 2025-08-17
Signed-off-by: Tobias Kaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-18 13:44:50 +02:00
alperozturk aefea6bfc8 add: same file already exists notification only for normal uploads
Signed-off-by: alperozturk <[email protected]>
2025-08-18 10:52:18 +02:00
Nextcloud bot fce01302f5 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-18 02:53:49 +00:00
alperozturk 8fd60081eb fix: codacy static code analysis
Signed-off-by: alperozturk <[email protected]>
2025-08-17 15:14:24 +02:00
alperozturk ab1734835d refactor: file display activity
Signed-off-by: alperozturk <[email protected]>
2025-08-17 15:08:10 +02:00
alperozturk 4ccded750d Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-08-17 15:08:09 +02:00
Nextcloud bot 722ca7c27c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-17 02:53:34 +00:00
Andy Scherzinger 684a44068c Merge pull request #15369 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-16 08:58:29 +02:00
nextcloud-android-bot a266871335 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-16 02:40:43 +00:00
Andy Scherzinger c010a0b14a Merge pull request #15364 from nextcloud/renovate/actions-checkout-5.x
chore(deps): update actions/checkout action to v5
2025-08-15 10:38:15 +02:00
renovate[bot] 05f8f5552b chore(deps): update actions/checkout action to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 10:31:19 +02:00
Tobias Kaminsky 2e03b45de9 Merge pull request #15363 from nextcloud/renovate/composebom
fix(deps): update dependency androidx.compose:compose-bom to v2025.08.00
2025-08-15 09:18:29 +02:00
Tobias Kaminsky bf5a465b98 Merge pull request #15366 from nextcloud/photoview
switch to correct package name, since renovate complained
2025-08-15 09:12:38 +02:00
Tobias Kaminsky f75e8f187c Merge pull request #15240 from nextcloud/check-manage-all-files-permission
Check Storage Permission Before Upload
2025-08-15 08:55:01 +02:00
Tobias Kaminsky fdfaa45629 Merge pull request #15362 from nextcloud/renovate/actions-checkout-4.x
chore(deps): update actions/checkout action to v4.3.0
2025-08-15 08:53:41 +02:00
Alper Öztürk 45be6e8ee4 Merge pull request #15350 from nextcloud/fix/upload-progress-track
fix: upload progress
2025-08-15 08:52:29 +02:00
tobiasKaminsky 07478d898d switch to correct package name, since renovate complained
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-15 08:05:10 +02:00
renovate[bot] 0efe9ae6a4 fix(deps): update dependency androidx.compose:compose-bom to v2025.08.00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 04:35:54 +00:00
renovate[bot] 4aa0f4cc79 chore(deps): update actions/checkout action to v4.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 04:34:55 +00:00
Nextcloud bot cedc14f60f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-15 02:55:35 +00:00
Alper Öztürk 35e581613a Merge pull request #15355 from nextcloud/common-0.27.2
Bump to common 0.27.2
2025-08-14 15:34:27 +02:00
Tobias Kaminsky 2e2d7530db Merge pull request #14375 from nextcloud/renovate/org.mnode.ical4j-ical4j-3.x
fix(deps): update dependency org.mnode.ical4j:ical4j to v3.2.19
2025-08-14 14:43:38 +02:00
Tobias Kaminsky ff86174c92 Merge pull request #14769 from nextcloud/renovate/com.google.android.gms-play-services-base-18.x
fix(deps): update dependency com.google.android.gms:play-services-base to v18.7.2
2025-08-14 14:43:16 +02:00
renovate[bot] af7212f28e fix(deps): update dependency com.google.android.gms:play-services-base to v18.7.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 11:46:03 +00:00
tobiasKaminsky ffba359e78 Bump to common 0.27.2
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-14 13:10:58 +02:00
Tobias Kaminsky d8aeb35a82 Merge pull request #15309 from nextcloud/renovate/media3
fix(deps): update media3 to v1.8.0
2025-08-14 12:26:30 +02:00
tobiasKaminsky aa44132a56 verification
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-14 12:15:07 +02:00
tobiasKaminsky 6b950395bd fix due to api change
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-14 12:15:07 +02:00
renovate[bot] 9079813c8d fix(deps): update dependency org.mnode.ical4j:ical4j to v3.2.19
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 12:15:06 +02:00
Tobias Kaminsky bbaa241ec0 Merge pull request #15219 from nextcloud/renovate/com.google.firebase-firebase-messaging-25.x
fix(deps): update dependency com.google.firebase:firebase-messaging to v25
2025-08-14 12:03:24 +02:00
alperozturk 6fbaf2fb82 add: missing file notifications before posting a new notification
Signed-off-by: alperozturk <[email protected]>
2025-08-14 09:10:22 +02:00
alperozturk 95375f8de8 make missingPermissionThrown atomic to fix: Shared primitive variable "missingPermissionThrown" in one thread may not yield the value of the most recent write from another thread
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 1c775ce373 fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 6e4dbcf59b use explicit Intent
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 58c43024cd fix kt spotless UploadFileException.kt
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 988c8b580a add missing necessary checks
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 90ed06b783 do not show upload file not found notification error again
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 7a80c50ab3 fix logic
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk e15de852fa add UploadFileBroadcastReceiverActions
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk d620623abe check local file access in upload file operation
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 805eb6963f fix git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk f3a738b8da solve git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk d5656c255f add AutoUploadBroadcastReceiver to dismiss notification after press
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 9d0f7a491f fix
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
alperozturk 1ec49dd2da check storage permission
Signed-off-by: alperozturk <[email protected]>
2025-08-14 08:58:54 +02:00
Nextcloud bot 09950c6a67 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-14 03:00:33 +00:00
renovate[bot] 5457679954 fix(deps): update dependency com.google.firebase:firebase-messaging to v25
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 00:50:35 +00:00
renovate[bot] 58c762062a fix(deps): update media3 to v1.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 00:49:07 +00:00
Andy Scherzinger a754c0f934 Merge pull request #15352 from nextcloud/renovate/ubuntu-noble
chore(deps): update ubuntu:noble docker digest to 7c06e91
2025-08-13 18:38:26 +02:00
renovate[bot] e12bb3e533 chore(deps): update ubuntu:noble docker digest to 7c06e91
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-13 16:37:09 +00:00
Andy Scherzinger 2e078f85c6 Merge pull request #15054 from nextcloud/renovate/mockkversion
fix(deps): update mockkversion to v1.14.5
2025-08-13 18:36:25 +02:00
Andy Scherzinger b19258ab77 ci(chksm): Add meta-data
Signed-off-by: Andy Scherzinger <[email protected]>
2025-08-13 17:55:12 +02:00
renovate[bot] f1d005b241 fix(deps): update mockkversion to v1.14.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-13 16:17:45 +02:00
alperozturk a5db5d2557 add: transfer progress function links
Signed-off-by: alperozturk <[email protected]>
2025-08-13 15:15:00 +02:00
alperozturk 2044ceb8c0 fix: upload progress
Signed-off-by: alperozturk <[email protected]>
2025-08-13 14:14:56 +02:00
Alper Öztürk 3b9d06a6b3 Merge pull request #15273 from nextcloud/file-upload-worker-batch-support
File Upload Worker Batch Support
2025-08-13 12:34:37 +02:00
Alper Öztürk 0c63b65c1e Merge pull request #15344 from nextcloud/checkForExistingNameInTemplate
check if any file exists with that name in directory
2025-08-13 12:33:42 +02:00
tobiasKaminsky ef58c25d3f check if any file exists with that name in directory
Signed-off-by: tobiasKaminsky <[email protected]>
2025-08-13 11:41:13 +02:00
alperozturk a7f2fd22b6 fix: detekt
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:28:09 +02:00
alperozturk 86a057f17e run in default dispatcher
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:26:39 +02:00
alperozturk ecdcbdbfdf run in default dispatcher
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:26:39 +02:00
alperozturk a3aaea4c9c increase batch size and check chosenFilesCount to prevent crash
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:26:39 +02:00
alperozturk b4560afed5 kt spotless fix
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:26:39 +02:00
alperozturk cfb9e5e0c6 add batch support
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:26:39 +02:00
alperozturk 1da4a1acb8 add
Signed-off-by: alperozturk <[email protected]>
2025-08-13 11:26:39 +02:00
Alper Öztürk 81c1254c29 Merge pull request #15338 from nextcloud/bugfix/fix-folder-names-are-lowercased
BugFix - AutoRename Folder names are lowercased after creation
2025-08-13 11:26:10 +02:00
Alper Öztürk ab92098d09 Merge pull request #15342 from nextcloud/fix/on-header-clicked-empty-preview
fix: prevent opening empty text preview in onHeaderClicked
2025-08-13 10:58:24 +02:00
Andy Scherzinger 6f87fbc8c1 Merge pull request #15306 from nextcloud/renovate/androidx.test.ext-junit-1.x
fix(deps): update dependency androidx.test.ext:junit to v1.3.0
2025-08-13 09:50:25 +02:00
renovate[bot] 0b33e4fa25 fix(deps): update dependency androidx.test.ext:junit to v1.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-13 07:49:22 +02:00
Andy Scherzinger 3146122771 Merge pull request #15343 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-13 07:48:21 +02:00
Andy Scherzinger d513f1e7ab Merge pull request #15305 from nextcloud/renovate/androidx.test-runner-1.x
fix(deps): update dependency androidx.test:runner to v1.7.0
2025-08-13 07:45:52 +02:00
nextcloud-android-bot 2cf4942e54 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-13 03:17:50 +00:00
renovate[bot] 6e808eef58 fix(deps): update dependency androidx.test:runner to v1.7.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-12 15:19:31 +00:00
Alper Öztürk 13e19e7b85 Merge pull request #15319 from nextcloud/refactor/extendedlistfragment
Refactor ExtendedListFragment
2025-08-12 16:29:25 +02:00
alperozturk b21c5ecc11 fix: prevent opening empty text preview in onHeaderClicked
Signed-off-by: alperozturk <[email protected]>
2025-08-12 15:47:01 +02:00
ZetaTom b6e84319a4 Further refactor ExtendedListFragment.kt
- implement review feedback
- use non-nullable types
- improve nullability handling
- remove unnecessary casts
- simplify expressions
- use property access notation

Signed-off-by: ZetaTom <[email protected]>
2025-08-12 14:55:31 +02:00
ZetaTom 30ff136cac Refactor ExtendedListFragment
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 14:53:09 +02:00
Alper Öztürk b103dd4583 Merge pull request #15318 from nextcloud/fix/grid-view-spacing
Fix grid view spacing
2025-08-12 12:14:02 +02:00
ZetaTom 69c5beaa15 Remove preview_image_file_is_not_exist
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom 6a1fbf0637 Reduce visibility of LocalFileListGridItemViewHolder
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom e30feffa2b Move file features layout
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom de61b461ca Always show filename in grid view
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom b2bde1c080 Remove unused dimensions
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom 76a3781990 Add top margin to grid item thumbnail for multi selection
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom 456622067a Remove ViewType.java
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:18 +02:00
ZetaTom af30d7a749 Unify grid_image.xml with grid_item.xml
Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:17 +02:00
ZetaTom 828d0a30a1 Use dynamic layout in grid_item.xml
- scales properly on larger displays
- increases usability for 3 and 4 column mode
- prevent filename from overlapping with more icon

Signed-off-by: ZetaTom <[email protected]>
2025-08-12 11:12:17 +02:00
Andy Scherzinger a73b5578de Merge pull request #15341 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-12 08:49:31 +02:00
nextcloud-android-bot a95a5f7140 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-12 06:15:26 +00:00
Nextcloud bot 84e45db213 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-12 02:55:29 +00:00
Andy Scherzinger ad08fe6178 Merge pull request #15286 from nextcloud/renovate/androidxtestversion
fix(deps): update androidxtestversion to v1.7.0
2025-08-12 01:02:19 +02:00
renovate[bot] 9fa48229a5 fix(deps): update androidxtestversion to v1.7.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 22:34:11 +02:00
alperozturk 82241eb162 fix - Folder names are lowercased after creation, if it contains a period #15337
Signed-off-by: alperozturk <[email protected]>
2025-08-11 17:06:45 +02:00
Alper Öztürk 919ac0c1ea Merge pull request #15324 from nextcloud/remove-deprecated-ss-test-api-and-uncessary-sleeps
Remove IntentsTestRule and speed up CI
2025-08-11 08:49:23 +02:00
Tobias Kaminsky 4616ecd18f Merge pull request #14862 from nextcloud/fixEditImage
Pass correct file to edit image
2025-08-11 08:45:12 +02:00
renovate[bot] 500db0c5ff fix(deps): update espressoversion to v3.7.0 (#15308)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-10 22:51:01 +02:00
Andy Scherzinger fa53e32c9a Merge pull request #15331 from nextcloud/renovate/actions-cache-4.x
chore(deps): update actions/cache action to v4.2.4
2025-08-10 22:15:54 +02:00
renovate[bot] 47d889615e chore(deps): update actions/cache action to v4.2.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-10 20:13:11 +00:00
Andy Scherzinger c5b311ccb0 Merge pull request #15329 from nextcloud/update-library-2025-08-10
Update library to 2025-08-10
2025-08-10 19:08:06 +02:00
Nextcloud bot 294dea3e6a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-10 02:52:29 +00:00
Tobias Kaminsky 92f0c91d2d Update library to 2025-08-10
Signed-off-by: Tobias Kaminsky <[email protected]>
2025-08-10 00:00:49 +02:00
Nextcloud bot dcfbe8e752 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-09 02:57:22 +00:00
Andy Scherzinger 878d2be5bb Merge pull request #15328 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2025-08-08 22:03:32 +02:00
nextcloud-android-bot f04265ee6b 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-08 19:50:55 +00:00
alperozturk 3c307190a8 revert SSOActivityTests
Signed-off-by: alperozturk <[email protected]>
2025-08-08 11:14:26 +02:00
alperozturk 4c222760bc fix kt spotless fix
Signed-off-by: alperozturk <[email protected]>
2025-08-08 10:06:47 +02:00
alperozturk c2b83e39f3 remove sleep from FileDetailSharingFragmentIT.kt
Signed-off-by: alperozturk <[email protected]>
2025-08-08 10:06:47 +02:00
alperozturk b7a025ff15 get rid of IntentTestRule
Signed-off-by: alperozturk <[email protected]>
2025-08-08 10:06:47 +02:00
alperozturk f56cdc2cab Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-08-08 10:06:46 +02:00
Alper Öztürk 4e390e0432 Merge pull request #15321 from nextcloud/fix-broken-tests
Fix broken tests
2025-08-08 10:06:10 +02:00
Andy Scherzinger b25fff7dac Merge pull request #15323 from nextcloud/repo-sync/android-config/master,
🔄 synced file(s) with nextcloud/android-config
2025-08-08 07:07:01 +02:00
nextcloud-android-bot 8162084251 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <[email protected]>
2025-08-08 03:41:56 +00:00
alperozturk d3d94046e6 give all permission access to the root path
Signed-off-by: alperozturk <[email protected]>
2025-08-07 17:12:27 +02:00
alperozturk af044ceeff fix
Signed-off-by: alperozturk <[email protected]>
2025-08-07 16:11:21 +02:00
alperozturk 4b4da4cdab Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-08-07 16:11:21 +02:00
Nextcloud bot 689a5a65c8 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-07 02:53:24 +00:00
Alper Öztürk 6366a00e54 Merge pull request #15289 from nextcloud/use-sha256-algorithm
Add client side encryption to use sha256 hash algorithm
2025-08-06 13:25:26 +02:00
alperozturk 4b019c6ab1 SHA1_WITH_600000
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:12 +02:00
alperozturk 1a73aa6478 fix git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:10 +02:00
alperozturk 7c94affc93 fit kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:01 +02:00
alperozturk 4077517ac6 add CryptoError
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:01 +02:00
alperozturk a83959df53 fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:00 +02:00
alperozturk 4e449bf576 remove unused functions
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:00 +02:00
alperozturk 57746486d4 use lib
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:00 +02:00
alperozturk cd1adb7575 use crypto helper for encryption
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:00 +02:00
alperozturk aeb5a50a07 use crypto helper
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:56:00 +02:00
alperozturk 567e5fb3c0 dont remove keyChecksums
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:55:59 +02:00
alperozturk 29ddaa0120 remove begin and end
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:55:59 +02:00
alperozturk 9214fc4074 no need separate
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:55:59 +02:00
alperozturk 6399f836fd add CryptoHelper.kt
Signed-off-by: alperozturk <[email protected]>
2025-08-06 11:55:57 +02:00
Nextcloud bot a3ec7a7aef fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-06 02:53:27 +00:00
Andy Scherzinger 247a211559 Merge pull request #15316 from nextcloud/renovate/gradle-actions-4.x
chore(deps): update gradle/actions action to v4.4.2
2025-08-06 00:17:00 +02:00
renovate[bot] d54f418555 chore(deps): update gradle/actions action to v4.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 21:06:16 +00:00
Andy Scherzinger 21601766e6 Merge pull request #15312 from nextcloud/fix/dialog-ss-tests
Fix - Dialog Screenshot Tests
2025-08-05 22:33:49 +02:00
Andy Scherzinger 57c3ce69ec fix(ktlint): Formatting
Signed-off-by: Andy Scherzinger <[email protected]>
2025-08-05 19:53:41 +02:00
alperozturk f72bbcb999 fix code analysis and update android lib
Signed-off-by: alperozturk <[email protected]>
2025-08-05 16:57:57 +02:00
alperozturk 3a11bec690 fix
Signed-off-by: alperozturk <[email protected]>
2025-08-05 16:57:57 +02:00
alperozturk bf3e39bc7c Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-08-05 16:57:57 +02:00
Alper Öztürk 4e03b0c850 Merge pull request #15313 from nextcloud/code-cleanup
clean code
2025-08-05 16:44:30 +02:00
alperozturk d941cbb4da clean code
Signed-off-by: alperozturk <[email protected]>
2025-08-05 16:43:43 +02:00
Andy Scherzinger 78f1db717d Merge pull request #15304 from nextcloud/renovate/spotbugsgradleplugin
fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.3
2025-08-05 16:37:42 +02:00
renovate[bot] b0fc868d8e fix(deps): update dependency com.github.spotbugs.snom:spotbugs-gradle-plugin to v6.2.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 07:12:46 +00:00
Alper Öztürk 71807c341d Merge pull request #15302 from nextcloud/fix-ci-due-to-debug-login
Fix CI
2025-08-05 09:00:42 +02:00
alperozturk 10399fde84 fix ci
Signed-off-by: alperozturk <[email protected]>
2025-08-05 08:36:43 +02:00
alperozturk 9aaf5e4fa6 fix ci
Signed-off-by: alperozturk <[email protected]>
2025-08-05 08:36:43 +02:00
Nextcloud bot 8cd7d76481 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-05 02:57:15 +00:00
Andy Scherzinger 08baa1b591 Merge pull request #15285 from nextcloud/renovate/workruntime
fix(deps): update workruntime to v2.10.3
2025-08-04 23:39:54 +02:00
renovate[bot] 3537f85523 fix(deps): update workruntime to v2.10.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 23:17:13 +02:00
Andy Scherzinger e059718e01 Merge pull request #15303 from nextcloud/Gradle9
Update to Gradle 9.0
2025-08-04 23:09:43 +02:00
Andy Scherzinger 4e1ef316ba fix(lint): Remove unused resources
Signed-off-by: Andy Scherzinger <[email protected]>
2025-08-04 19:55:16 +02:00
Andy Scherzinger c3eb11bec8 build(gradle): Update to Gradle 9.0
Signed-off-by: Andy Scherzinger <[email protected]>
2025-08-04 18:07:47 +02:00
Alper Öztürk 1dfbc8d1bc Merge pull request #15045 from nextcloud/feature/handle-custom-permissions
Feature - Handle Custom Permissions
2025-08-04 17:23:28 +02:00
Andy Scherzinger f7edb577ad Merge pull request #15296 from nextcloud/agp812
chore(deps): Update AGP to 8.12.0
2025-08-04 17:16:54 +02:00
alperozturk 4b49654d53 fix build
Signed-off-by: alperozturk <[email protected]>
2025-08-04 16:47:01 +02:00
alperozturk 0afeaef3bd add comment
Signed-off-by: alperozturk <[email protected]>
2025-08-04 16:31:40 +02:00
alperozturk ad88c947e1 remove comment
Signed-off-by: alperozturk <[email protected]>
2025-08-04 16:30:39 +02:00
Alper ÖztürkandMilen Pivchev bfb2bf4c4a Update app/src/main/java/com/owncloud/android/datamodel/OCFile.java
Co-authored-by: Milen Pivchev <[email protected]>
Signed-off-by: Alper Öztürk <[email protected]>
2025-08-04 16:30:07 +02:00
Andy Scherzinger 344765aa4b chore(deps): Update AGP to 8.12.0
Signed-off-by: Andy Scherzinger <[email protected]>
2025-08-04 16:22:10 +02:00
alperozturk 341b69f310 update strings
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:35:26 +02:00
alperozturk 99fed9c309 solve git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk fd2720f0a8 kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk ff8588978d upload some content or sync with your device -> this should not appear if user doesnt have the create permission
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 7818bf654e fix git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 229914aba7 add leave share action text
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 7dae2b214b add toast messages
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk c2c0d87a89 add checks to the DocumentsStorageProvider
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk a3aa59d6c8 add missing permissions
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk a19609318e add documentation for "D"
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 4c07461f44 organize OCFile
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 1c0a3e24c3 fix deleteOrLeaveShareAction
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk f788112ddd add LEAVE_SHARE action
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk d83fbb8027 fix delete logic
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 73d3a38637 filter actions by permission
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk c1687e1f1c unify file actions
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 5fe4e6b7e8 unify file actions
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 49217069b2 add missing permissions
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
alperozturk 3206e470f0 set create floating action button visibility according to the file's permission
Signed-off-by: alperozturk <[email protected]>
2025-08-04 14:03:29 +02:00
Alper Öztürk 301c95c730 Merge pull request #15299 from tablebird/master
Optimize upload file data loading
2025-08-04 13:21:38 +02:00
tablebird 3ba9dce42a Adjust code format
Adjust code format
2025-08-04 17:36:47 +08:00
Alper Öztürk 13b284aca7 Merge pull request #15127 from nextcloud/change-back-button-behaviours-from-fragments
Redirect to All Files from FileDisplayActivity's Fragments
2025-08-04 11:36:01 +02:00
alperozturk 93dbadfd4d fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:54:26 +02:00
alperozturk d1a2860441 fix handleBackButtonEvent
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:53:15 +02:00
alperozturk b70981a73e only move task in root dir and all files
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
alperozturk a1f14417db movetaskback in fda
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
alperozturk e5cdc96fc1 kt fix
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
alperozturk 1627f7d453 use androidx imports
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
alperozturk 0961b76476 revert fda
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
alperozturk bd60742f28 use extended list fragment
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
alperozturk a0ce1ffc78 redirect to fda
Signed-off-by: alperozturk <[email protected]>
2025-08-04 10:24:22 +02:00
tablebird 6ccfb10e1a Optimize upload file data loading
1: UploadListActivity now loads data once instead of three times after launching
2: RecyclerView refresh animation is now associated with data
2025-08-04 16:22:47 +08:00
Alper Öztürk 3864da367b Merge pull request #14757 from nextcloud/bugfix/calendar-import-work
BugFix - CalendarImportWork
2025-08-04 09:10:46 +02:00
Nextcloud bot a02f6b0655 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-04 03:35:42 +00:00
Nextcloud bot 002b9384c9 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-03 02:54:44 +00:00
Nextcloud bot f8cdd88ffa fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-02 02:54:11 +00:00
Alper Öztürk f71d94b4da Merge pull request #15175 from nextcloud/replace-e2ee-async-tasks-with-coroutines
Replace E2EE Async Tasks with Coroutines
2025-08-01 17:01:30 +02:00
Alper Öztürk cdb2893cab Merge pull request #14989 from nextcloud/do-not-fetch-shares-during-folder-refresh
Do not fetch shares during folder refresh
2025-08-01 13:36:51 +02:00
alperozturk d09c82cdc5 revert
Signed-off-by: alperozturk <[email protected]>
2025-08-01 13:32:08 +02:00
alperozturk c7dded715f since startSyncFolderOperation called onResume and startSyncFolderOperation runs on main thread it must be run on background thread thus executor is used.
Signed-off-by: alperozturk <[email protected]>
2025-08-01 13:24:27 +02:00
alperozturk 30b45edbe4 fetch updated data
Signed-off-by: alperozturk <[email protected]>
2025-08-01 13:02:38 +02:00
alperozturk d153c0766d Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-08-01 13:02:38 +02:00
alperozturk a8f051adaa use correct android lib version
Signed-off-by: alperozturk <[email protected]>
2025-08-01 12:20:06 +02:00
alperozturk d99c1b77a1 fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk d68bb857d8 fix git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 16dc863f34 fix git conflict
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 511f9f0b17 extract layouts
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 2334dcb213 kt spotless fix
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 4ff2cbb9e4 add blink animation
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 03b38f3d8c add share_list_item_shimmer.xml
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk c1c17ab1d4 add shimmering
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk b7010ea35e listen completions of the remote operation
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk f485300e53 check token NPE
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 609b8f3df4 fix ss test, pass correct argument
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk bcce01d22f fix operation creation from remotefile object
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk edf5dcbc82 fix operation creation from remotefile object
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 0656dc7909 support avatar generation for external shares
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk a3116ede4a setDownloadLimitToContentValues
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 4a70e9ed80 fix FileDownloadLimit crash
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 8b96d24f49 indicate parameters
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 44b2714ba2 implement feedbacks
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 891b96afbf fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk a14466fdc1 remove unused func
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk ac0b16019e use lib
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 0b510c4c91 fix wrong usages
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 8964648510 fix wrong usages
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 8445793a76 refreshSharesForFolder in share details
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk 4bbf559cb1 add createContentValueForRemoteFile
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
alperozturk a8cdaa70cc add createContentValueForRemoteFile
Signed-off-by: alperozturk <[email protected]>
2025-08-01 11:51:06 +02:00
Nextcloud bot b305ebd129 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-01 06:36:28 +00:00
Nextcloud bot 00eb6a9593 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-08-01 02:54:34 +00:00
Alper Öztürk 50d8c9293e Merge pull request #15188 from nextcloud/add-debug-login
Add Debug Login
2025-07-31 11:39:17 +02:00
Alper Öztürk 6985ce00b9 Merge pull request #15282 from nextcloud/fix-screenshot-test-v3
Fix Screenshot Test
2025-07-31 11:21:06 +02:00
Nextcloud bot 9f859066c3 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-07-31 02:51:16 +00:00
alperozturk 50958d3604 fix
Signed-off-by: alperozturk <[email protected]>
2025-07-30 17:06:26 +02:00
alperozturk 715d03aa13 com.owncloud.android.ui.activity.NotificationsActivityIT > showNotifications[emulator-5554 - 8.1.0] FAILED
java.lang.NullPointerException: Parameter specified as non-null is null: method com.***.utils.GlideHelper.loadIntoImageView, parameter client
	at com.***.utils.GlideHelper.loadIntoImageView(Unknown Source:7)

Signed-off-by: alperozturk <[email protected]>
2025-07-30 16:39:07 +02:00
alperozturk 41d61d490e fixes
Signed-off-by: alperozturk <[email protected]>
2025-07-30 16:14:51 +02:00
alperozturk 065d99f6b3 fit kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:27:19 +02:00
alperozturk 016fc24c3a SharedListFragmentIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:26:49 +02:00
alperozturk 0a941cbf8e OCFileListFragmentStaticServerIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:24:42 +02:00
alperozturk 562189670f GroupfolderListFragmentIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:18:35 +02:00
alperozturk 3d18153c52 SetupEncryptionDialogFragmentIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:15:53 +02:00
alperozturk a73067ab00 SendFilesDialogTest
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:13:22 +02:00
alperozturk d23eaa78eb UserInfoActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:01:10 +02:00
alperozturk 68c824d86a Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-30 15:01:10 +02:00
alperozturk b64231db0d UploadFilesActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:58:46 +02:00
alperozturk 0bf38b901b ReceiveExternalFilesActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:55:08 +02:00
alperozturk af6de47af7 PassCodeActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:52:58 +02:00
alperozturk b78f5ac37b ManageAccountsActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:50:33 +02:00
alperozturk 93c7357313 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:50:33 +02:00
alperozturk cc4c7a837b FolderPickerActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:43:31 +02:00
alperozturk 225b2ec574 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:43:30 +02:00
alperozturk 5d8341b93f ContactsPreferenceActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 14:33:00 +02:00
alperozturk 8fd17f424e EtmActivityTest
Signed-off-by: alperozturk <[email protected]>
2025-07-30 13:26:57 +02:00
alperozturk 44bbff26d6 UploadListActivityActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 13:24:32 +02:00
alperozturk 7d8815ac6b Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-30 13:24:32 +02:00
alperozturk a729f8fcc8 SyncedFoldersActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 13:21:29 +02:00
alperozturk b60e3a4cd6 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-30 13:21:29 +02:00
alperozturk aec28d31b9 SettingsActivityIT
Signed-off-by: alperozturk <[email protected]>
2025-07-30 13:15:40 +02:00
alperozturk a2a68fa4a5 fix tests
Signed-off-by: alperozturk <[email protected]>
2025-07-30 12:40:36 +02:00
alperozturk 85b62f945c Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-30 12:40:36 +02:00
Alper Öztürk a6aa370f6f Merge pull request #15164 from nextcloud/fix-ConflictsResolveActivityIT
Fix ConflictsResolveActivityIT Tests
2025-07-30 11:50:27 +02:00
Alper Öztürk e9e79414f3 Merge pull request #15132 from nextcloud/add-logs-for-content-observer
Add Logs For ContentObserver
2025-07-30 11:24:01 +02:00
Alper Öztürk bd79687d8d Merge pull request #15264 from nextcloud/bugfix/allow-other-transport-types
BugFix - Add Other Transport Types
2025-07-30 11:00:55 +02:00
alperozturk f4ae5c5a05 remove satelite check
Signed-off-by: alperozturk <[email protected]>
2025-07-30 11:00:31 +02:00
alperozturk d83b4ae087 add other transport types
Signed-off-by: alperozturk <[email protected]>
2025-07-30 10:59:54 +02:00
Alper Öztürk 146e483815 Merge pull request #15275 from tablebird/master
Use child threads to load the uploaded file list
2025-07-30 09:16:18 +02:00
tablebird 0899d7a8cc fix NullPointerException
Multi-threaded work, the main thread will clear the upload list set by the child thread
2025-07-30 09:02:53 +02:00
tablebird ec479df423 Use child threads to load the uploaded file list
Disadvantages: There will be a delay in the display of uploaded lists
2025-07-30 09:02:53 +02:00
Alper Öztürk d8d2a68426 Merge pull request #15272 from nextcloud/bugfix/login-flow-v2-poll
BugFix - Login Flow v2
2025-07-30 09:00:23 +02:00
Andy Scherzinger eb2cf067d0 Merge pull request #15247 from nextcloud/bugfix/add-missing-share-actions
BugFix - Add Missing Share Action
2025-07-30 08:56:41 +02:00
alperozturk f58b700016 add missing actions
Signed-off-by: alperozturk <[email protected]>
2025-07-30 08:00:17 +02:00
Andy Scherzinger cdc3cd04b4 Merge pull request #15274 from nextcloud/renovate/github-codeql-action-3.x
chore(deps): update github/codeql-action action to v3.29.5
2025-07-30 07:58:15 +02:00
renovate[bot] 660df5aa08 chore(deps): update github/codeql-action action to v3.29.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 04:33:20 +00:00
Nextcloud bot 1f6c067320 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-07-30 02:53:20 +00:00
alperozturk 5396708078 fix file save
Signed-off-by: alperozturk <[email protected]>
2025-07-29 15:39:40 +02:00
alperozturk 7613ccf708 fix ss
Signed-off-by: alperozturk <[email protected]>
2025-07-29 14:50:48 +02:00
alperozturk f554f6e630 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-29 14:50:20 +02:00
Alper Öztürk f242b4cdb5 Merge pull request #15255 from nextcloud/add-remove-upload-action-to-conflict-resolve-activity
Add Remove Upload Action to Conflict Resolve Notification
2025-07-29 13:46:08 +02:00
alperozturk 12150df652 changes for the feedback
Signed-off-by: alperozturk <[email protected]>
2025-07-29 11:23:18 +02:00
Alper Öztürkandkramo 250256d45d Update app/src/main/res/values/strings.xml
Co-authored-by: kramo <[email protected]>
Signed-off-by: Alper Öztürk <[email protected]>
2025-07-29 11:21:14 +02:00
alperozturk 918526dd43 fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-07-29 11:21:14 +02:00
alperozturk 37cc894e8f add
Signed-off-by: alperozturk <[email protected]>
2025-07-29 11:21:14 +02:00
alperozturk 2a7cd21eed fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-07-29 11:09:26 +02:00
alperozturk 5415ff1a18 fix
Signed-off-by: alperozturk <[email protected]>
2025-07-29 11:07:47 +02:00
alperozturk cfa9579419 Rename .java to .kt
Signed-off-by: alperozturk <[email protected]>
2025-07-29 11:07:46 +02:00
alperozturk bb2dc3ade2 add pollUrl
Signed-off-by: alperozturk <[email protected]>
2025-07-29 10:37:13 +02:00
Nextcloud bot 5bf79e76e8 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-07-29 02:52:43 +00:00
Alper Öztürk 72ff05f585 Merge pull request #15153 from nextcloud/bugfix/external-share-icon-appreance-after-delete
BugFix - External Share Icon Appreance After Delete
2025-07-28 14:30:30 +02:00
alperozturk 912abbf475 fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:28:29 +02:00
alperozturk a53fc71a63 fix build
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:26:45 +02:00
alperozturk 3d3f37bf43 update file entity correctly
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:26:45 +02:00
alperozturk 63a1b1da83 update current dir when OCFileListFragment resumes -- needed for after returning back from the file details
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:26:45 +02:00
alperozturk 813322bd4f set shared with share to zero after unshare the share
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:26:45 +02:00
alperozturk 3c51a4f212 delete unnecessary logic
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk a60944b91d update ss
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk bd08c99e80 remove repeated codes and explain the difference
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk 0da986b46d fetch calendarBackupFolder and contactsBackupFolder -- together
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk faed7844f0 fix code analytics
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk 4925a971ff change backupNow button visibility thus UI not looks weird with only restore backup button. Because if backup exists restore backup button will be visible without backupNow button and UI going to look weird
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk d7d7ee425d add log for success
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk 3268609655 show restore backup button if calendar or contact backup folder exists
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk 1afb1267d1 do not fail entire import
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk 9ab5d4af56 fix CalendarImportWork
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk f1a8b97031 fix CalendarImportWork
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
alperozturk cb042f3bb5 fix CalendarImportWork
Signed-off-by: alperozturk <[email protected]>
2025-07-28 14:13:10 +02:00
Nextcloud bot d625349ccf fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-07-28 02:53:57 +00:00
Nextcloud bot f283fe7195 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-07-27 02:52:19 +00:00
Nextcloud bot 38fa7a3b5d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <[email protected]>
2025-07-25 02:52:23 +00:00
alperozturk 1093fd74cb NC_TEST_SERVER_DATA_STRING
Signed-off-by: alperozturk <[email protected]>
2025-07-17 15:45:52 +02:00
alperozturk 3e0d2517e4 NC_TEST_SERVER_DATA_STRING
Signed-off-by: alperozturk <[email protected]>
2025-07-17 15:33:45 +02:00
alperozturk fc512dcf1c long press
Signed-off-by: alperozturk <[email protected]>
2025-07-17 15:24:11 +02:00
alperozturk 247d08595d add debug info
Signed-off-by: alperozturk <[email protected]>
2025-07-17 15:24:11 +02:00
Alper Öztürk 01c1b86e0e Update app/src/main/java/com/nextcloud/client/jobs/ContentObserverWork.kt
Signed-off-by: Alper Öztürk <[email protected]>
2025-07-17 10:21:31 +02:00
alperozturk f6cbcb8c58 add logs
Signed-off-by: alperozturk <[email protected]>
2025-07-17 10:21:31 +02:00
alperozturk 34c7b09247 oldest to newest
Signed-off-by: alperozturk <[email protected]>
2025-07-17 10:21:31 +02:00
alperozturk e37974fdad use long
Signed-off-by: alperozturk <[email protected]>
2025-07-17 10:21:31 +02:00
alperozturk 9b10a1b9b6 add logs
Signed-off-by: alperozturk <[email protected]>
2025-07-17 10:21:31 +02:00
tobiasKaminsky fe40dac890 Pass correct file to edit image
Signed-off-by: tobiasKaminsky <[email protected]>
2025-07-17 09:11:06 +02:00
alperozturk 41053a5082 fix kt spotless
Signed-off-by: alperozturk <[email protected]>
2025-07-16 16:28:03 +02:00
alperozturk f4509113a1 generateNewKeys
Signed-off-by: alperozturk <[email protected]>
2025-07-16 16:20:41 +02:00
alperozturk b7e383d43f convert download keys async task to coroutine
Signed-off-by: alperozturk <[email protected]>
2025-07-16 15:50:59 +02:00
524 changed files with 33851 additions and 14196 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
FROM ubuntu:noble@sha256:a08e551cb33850e4740772b38217fc1796a66da2506d312abe51acda354ff061
FROM ubuntu:noble@sha256:66460d557b25769b102175144d538d88219c077c678a49af4afca6fbfc1b5252
ARG DEBIAN_FRONTEND=noninteractive
ENV ANDROID_HOME=/usr/lib/android-sdk
+1 -1
View File
@@ -148,7 +148,7 @@ steps:
commands:
- emulator -avd android -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 &
- sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g app/src/main/res/values/setup.xml
- sed -i s'#showOnlyFailingTestsInReports = ciBuild#showOnlyFailingTestsInReports = false#' build.gradle
- sed -i s'#showOnlyFailingTestsInReports = ciBuild#showOnlyFailingTestsInReports = false#' build.gradle.kts
- scripts/wait_for_emulator.sh
- scripts/runAllScreenshotCombinations noCI false
- scripts/screenshotSummary.sh
File renamed without changes.
File renamed without changes.
+5 -5
View File
@@ -27,6 +27,7 @@ concurrency:
jobs:
analysis:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Disabled on forks
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
@@ -51,13 +52,13 @@ jobs:
echo "repo=${{ github.event.pull_request.head.repo.full_name }}"
} >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: ${{ steps.get-vars.outputs.repo }}
ref: ${{ steps.get-vars.outputs.branch }}
- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
@@ -70,10 +71,9 @@ jobs:
run: |
mkdir -p "$HOME/.gradle"
{
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g"
echo "org.gradle.caching=true"
echo "org.gradle.parallel=true"
echo "org.gradle.jvmargs=-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g"
echo "org.gradle.configureondemand=true"
echo "org.gradle.configuration-cache=false"
echo "kapt.incremental.apt=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
@@ -22,13 +22,13 @@ jobs:
matrix:
flavor: [ Generic, Gplay, Huawei ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
- uses: gradle/actions/wrapper-validation@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Build ${{ matrix.flavor }}
run: |
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties
+2 -2
View File
@@ -22,9 +22,9 @@ jobs:
matrix:
task: [ detekt, spotlessKotlinCheck ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
+4 -4
View File
@@ -34,7 +34,7 @@ jobs:
language: [ 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Set Swap Space
@@ -43,11 +43,11 @@ jobs:
with:
swap-size-gb: 10
- name: Initialize CodeQL
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
with:
languages: ${{ matrix.language }}
- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
@@ -57,4 +57,4 @@ jobs:
echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
./gradlew assembleDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
+2 -2
View File
@@ -20,9 +20,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2022 Álvaro Brey <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
#
## This file is intended to be sourced by other scripts
function err() {
echo >&2 "$@"
}
function curl_gh() {
if [[ -n "$GITHUB_TOKEN" ]]
then
curl \
--silent \
--header "Authorization: token $GITHUB_TOKEN" \
"$@"
else
err "WARNING: No GITHUB_TOKEN found. Skipping API call"
fi
}
+2
View File
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2019-2025 Nextcloud GmbH and Nextcloud contributors
SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
+46 -44
View File
@@ -1,53 +1,55 @@
# SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]e>
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2023 Andy Scherzinger <[email protected]e>
# SPDX-License-Identifier: MIT
name: "QA"
on:
pull_request:
branches: [ master, stable-* ]
pull_request:
branches: [ main, master, stable-* ]
permissions:
pull-requests: write
contents: read
pull-requests: write
contents: read
concurrency:
group: qa-build-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
group: qa-build-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
qa:
runs-on: ubuntu-latest
steps:
- name: Check if secrets are available
run: echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT"
id: check-secrets
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
- name: set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
with:
distribution: "temurin"
java-version: 17
- name: Build QA
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
env:
KS_PASS: ${{ secrets.KS_PASS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
LOG_USERNAME: ${{ secrets.LOG_USERNAME }}
LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p $HOME/.gradle
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > $HOME/.gradle/gradle.properties
echo "org.gradle.caching=true" >> $HOME/.gradle/gradle.properties
echo "org.gradle.parallel=true" >> $HOME/.gradle/gradle.properties
echo "org.gradle.configureondemand=true" >> $HOME/.gradle/gradle.properties
echo "kapt.incremental.apt=true" >> $HOME/.gradle/gradle.properties
sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" app/build.gradle
sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" app/build.gradle
./gradlew assembleQaDebug
$(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias key0 --ks scripts/QA_keystore.jks app/build/outputs/apk/qa/debug/qa-debug-*.apk
scripts/uploadArtifact.sh $LOG_USERNAME $LOG_PASSWORD ${{github.event.number}} ${{github.event.number}} $GITHUB_TOKEN
qa:
runs-on: ubuntu-latest
steps:
- name: Check if secrets are available
run: echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT"
id: check-secrets
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
with:
persist-credentials: false
- name: set up JDK 17
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
with:
distribution: "temurin"
java-version: 17
- name: Build QA
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
env:
KS_PASS: ${{ secrets.KS_PASS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
LOG_USERNAME: ${{ secrets.LOG_USERNAME }}
LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p "$HOME/.gradle"
echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties"
echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true; kapt.incremental.apt=true" >> "$HOME/.gradle/gradle.properties"
sed -i "/qa/,/\}/ s/versionCode.*/versionCode = ${{ github.event.number }}/" app/build.gradle.kts
sed -i "/qa/,/\}/ s/versionName.*/versionName = \"${{ github.event.number }}\"/" app/build.gradle.kts
./gradlew assembleQaDebug
$(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:"$KS_PASS" --key-pass pass:"$KEY_PASS" --ks-key-alias key0 --ks ".github/workflows/QA_keystore.jks" app/build/outputs/apk/qa/debug/*qa-debug*.apk
.github/workflows/uploadArtifact.sh "$LOG_USERNAME" "$LOG_PASSWORD" "${{github.event.number}}" "${{github.event.number}}" "$GITHUB_TOKEN"
+1 -1
View File
@@ -48,7 +48,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ github.head_ref }}
+2 -2
View File
@@ -19,9 +19,9 @@ jobs:
runs-on: ubuntu-latest-low
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: REUSE Compliance Check
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0
+3 -3
View File
@@ -29,12 +29,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
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@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
with:
sarif_file: results.sarif
+5 -5
View File
@@ -25,17 +25,17 @@ jobs:
color: [ blue ]
api-level: [ 27 ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Gradle cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: AVD cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: avd-cache
with:
path: |
@@ -43,7 +43,7 @@ jobs:
~/.android/adb*
key: avd-${{ matrix.api-level }}
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
@@ -102,7 +102,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}}
- name: Archive Espresso results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: ${{ always() }}
with:
name: Report-${{ matrix.color }}-${{ matrix.scheme }}
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
days-before-stale: 28
days-before-close: 14
+5 -5
View File
@@ -21,9 +21,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 17
@@ -33,7 +33,7 @@ jobs:
if: ${{ always() }}
run: scripts/deleteOldComments.sh "test" "Unit" ${{github.event.number}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Run unit tests with coverage
run: ./gradlew jacocoTestGplayDebugUnitTest
- name: Upload failing results
@@ -42,14 +42,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "test" "Unit" ${{github.event.number}}
- name: Upload coverage to codecov
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
fail_ci_if_error: true
- name: Upload jacoco artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: test-results
path: app/build/reports/tests/testGplayDebugUnitTest/
@@ -20,24 +20,25 @@ PR=$4
GITHUB_TOKEN=$5
DAV_URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-artifacts/
source scripts/lib.sh
source .github/workflows/lib.sh
REPO=$(cat scripts/repo)
if ! test -e app/build/outputs/apk/qa/debug/qa-debug-*.apk ; then
if ! test -e app/build/outputs/apk/qa/debug/*qa-debug*.apk ; then
exit 1
fi
echo "Uploaded artifact to $DAV_URL/$BUILD.apk"
# delete all old comments, starting with "APK file:"
oldComments=$(curl_gh -X GET https://api.github.com/repos/nextcloud/android/issues/$PR/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("APK file:.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|")
oldComments=$(curl_gh -X GET https://api.github.com/repos/nextcloud/$REPO/issues/$PR/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("APK file:.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|")
echo $oldComments | while read comment ; do
curl_gh -X DELETE https://api.github.com/repos/nextcloud/android/issues/comments/$comment
curl_gh -X DELETE https://api.github.com/repos/nextcloud/$REPO/issues/comments/$comment
done
sudo apt-get -y install qrencode
qrencode -o $PR.png "$PUBLIC_URL/$BUILD.apk"
curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.apk --upload-file app/build/outputs/apk/qa/debug/qa-debug-*.apk
curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.apk --upload-file app/build/outputs/apk/qa/debug/*qa-debug*.apk
curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.png --upload-file $PR.png
curl_gh -X POST https://api.github.com/repos/nextcloud/android/issues/$PR/comments -d "{ \"body\" : \"APK file: $PUBLIC_URL/$BUILD.apk <br/><br/> ![qrcode]($PUBLIC_URL/$BUILD.png) <br/><br/>To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app. \" }"
curl_gh -X POST https://api.github.com/repos/nextcloud/$REPO/issues/$PR/comments -d "{ \"body\" : \"APK file: $PUBLIC_URL/$BUILD.apk <br/><br/> ![qrcode]($PUBLIC_URL/$BUILD.png) <br/><br/>To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app. \" }"
+92
View File
@@ -1,3 +1,95 @@
## 3.33.0 (September 10, 2025)
- Migrate to Glide 4
- Performance improvements
- Fix gallery image scaling
- Bugfixes
Minimum: NC 18 Server, Android 8.1 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/112
## 3.32.3 (August 21, 2025)
- Bugfixes
Minimum: NC 18 Server, Android 8.0 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/114
## 3.32.2 (July 18, 2025)
- Resolved image blurriness issue.
- Fixed crash occurring in the conflict resolution dialog.
- Addressed crash in the upload finish receiver event handler.
Minimum: NC 18 Server, Android 8.0 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/115
## 3.32.1 (July 14, 2025)
- Bug fixes.
Minimum: NC 18 Server, Android 8.0 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/113
## 3.32.0 (July 2, 2025)
- Minimum supported Android version is 8.0.
- Scrolling performance has been increased in the media tab.
- Multi-select feature added to the media tab.
- Custom share permissions have been added.
- Bug fixes.
Minimum: NC 18 Server, Android 8.0 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/107
## 3.31.4 (June 3, 2025)
- Add missing auto migration
Minimum: NC 18 Server, Android 7.1 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/110
## 3.31.3 (May 28, 2025)
- fix simple sign up
- bugfixes
- update translations
Minimum: NC 18 Server, Android 7.1 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/110
## 3.31.2 (May 20, 2025)
- bring back MANAGE_EXTERNAL_STORAGE permission
Minimum: NC 18 Server, Android 7.1 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/108
## 3.31.1 (April 3, 2025)
- Various bug fixes and performance enhancements
Minimum: NC 18 Server, Android 7.1 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/108
## 3.31.0 (February 25, 2025)
- New share layout
- Various bug fixes and performance enhancements
Minimum: NC 18 Server, Android 7.1 Nougat
For a full list, please see https://github.com/nextcloud/android/milestone/100
## 3.30.7 (January 6, 2025)
- Fix crash of auto upload settings
+3
View File
@@ -12,6 +12,9 @@ height="80">](https://play.google.com/store/apps/details?id=com.nextcloud.client
[<img src="https://f-droid.org/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/com.nextcloud.client/)
[<img src="https://github.com/user-attachments/assets/713d71c5-3dec-4ec4-a3f2-8d28d025a9c6"
alt="Get it with Obtainium"
height="80">](https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22com.nextcloud.client%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fnextcloud%2Fandroid%22%2C%22author%22%3A%22nextcloud%22%2C%22name%22%3A%22Nextcloud%22%2C%22preferredApkIndex%22%3A0%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Afalse%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22filterReleaseTitlesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22filterReleaseNotesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22verifyLatestTag%5C%22%3Afalse%2C%5C%22sortMethodChoice%5C%22%3A%5C%22date%5C%22%2C%5C%22useLatestAssetDateAsReleaseDate%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionExtractionRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22matchGroupToUse%5C%22%3A%5C%22%5C%22%2C%5C%22versionDetection%5C%22%3Atrue%2C%5C%22releaseDateAsVersion%5C%22%3Afalse%2C%5C%22useVersionCodeAsOSVersion%5C%22%3Afalse%2C%5C%22apkFilterRegEx%5C%22%3A%5C%22%5Enextcloud.*%5C%22%2C%5C%22invertAPKFilter%5C%22%3Afalse%2C%5C%22autoApkFilterByArch%5C%22%3Atrue%2C%5C%22appName%5C%22%3A%5C%22%5C%22%2C%5C%22appAuthor%5C%22%3A%5C%22%5C%22%2C%5C%22shizukuPretendToBeGooglePlay%5C%22%3Afalse%2C%5C%22allowInsecure%5C%22%3Afalse%2C%5C%22exemptFromBackgroundUpdates%5C%22%3Afalse%2C%5C%22skipUpdateNotifications%5C%22%3Afalse%2C%5C%22about%5C%22%3A%5C%22Nextcloud%20ist%20eine%20Cloudanwendung%2C%20die%20selbst%20gehostet%20werden%20kann.%5C%22%2C%5C%22refreshBeforeDownload%5C%22%3Atrue%7D%22%2C%22overrideSource%22%3Anull%7D)
Signing certificate fingerprint to [verify](https://developer.android.com/studio/command-line/apksigner#usage-verify) the APK:
- APK with "gplay" name, found [here](https://github.com/nextcloud/android/releases) or distributed via Google Play Store
+120
View File
@@ -0,0 +1,120 @@
<!--
~ SPDX-FileCopyrightText: 2025 Saeed <[email protected]>
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
# تطبيق [Nextcloud](https://nextcloud.com)لأجهزة أندرويد 📱
[![حالة 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)
[<img src="https://f-droid.org/badge/get-it-on.png" alt="احصل عليه من F-Droid" height="80">](https://f-droid.org/packages/com.nextcloud.client/)
## التحقق من توقيع التطبيق 🔐
للتأكد من صحة ملف APK:
- ملف APK باسم "gplay" متوفر [هنا](https://github.com/nextcloud/android/releases) أو عبر متجر Google Play
- ملف APK باسم "nextcloud" متوفر [هنا](https://github.com/nextcloud/android/releases)
- غير مناسب لتحميلات F-Droid، لأن F-Droid يقوم بتوقيعه بنفسه
```plaintext
SHA-256: fb009522f65e25802261b67b10a45fd70e610031976f40b28a649e152ded0373
SHA-1: 74aa1702e714941be481e1f7ce4a8f779c19dcea
```
**تطبيق Nextcloud لأندرويد يتيح لك إدارة بياناتك بسهولة على خادم Nextcloud الخاص بك.**
## الحصول على الدعم 🆘
إذا واجهت مشكلة أو لديك سؤال، يمكنك زيارة [منتدى الدعم](https://help.nextcloud.com/c/clients/android).
إذا اكتشفت خطأ أو لديك اقتراح لتحسين التطبيق، يمكنك [فتح قضية جديدة على GitHub](https://github.com/nextcloud/android/issues).
إذا لم تكن متأكدًا ما إذا كانت المشكلة ناتجة عن التطبيق أو الإعدادات أو الخادم، فابدأ بالسؤال في المنتدى، ثم عد إلى GitHub إذا لزم الأمر.
> ملاحظة: هذا المستودع خاص بتطبيق أندرويد فقط. إذا كانت المشكلة في الخادم، يرجى التواصل مع [فريق خادم Nextcloud](https://github.com/nextcloud/server).
## كيف تساهم في المشروع 🚀
هناك العديد من الطرق للمساهمة، سواء كنت مبرمجًا أو لا:
- مساعدة المستخدمين في المنتدى: https://help.nextcloud.com
- ترجمة التطبيق عبر [Transifex](https://app.transifex.com/nextcloud/nextcloud/android/)
- الإبلاغ عن المشاكل أو تقديم اقتراحات عبر [GitHub Issues](https://github.com/nextcloud/android/issues/new/choose)
- تنفيذ إصلاحات أو تحسينات عبر Pull Requests
- مراجعة [طلبات الدمج](https://github.com/nextcloud/android/pulls)
- اختبار النسخ التجريبية أو اليومية أو المرشحة للإصدار
- تحسين [التوثيق](https://github.com/nextcloud/documentation/)
- اختبار الميزات الأساسية في آخر إصدار مستقر
- تعلم كيفية جمع سجلات الأخطاء (logcat) لتقديم تقارير دقيقة
## إرشادات المساهمة والترخيص 📜
- الترخيص: [GPLv2](https://github.com/nextcloud/android/blob/master/LICENSE.txt)
- جميع المساهمات بعد 16 يونيو 2016 تعتبر مرخصة تحت AGPLv3 أو أي إصدار لاحق
- لا حاجة لتوقيع اتفاقية مساهم (CLA)
- يُفضل إضافة السطر التالي في رأس الملف عند إجراء تغييرات كبيرة:
```plaintext
SPDX-FileCopyrightText: <السنة> <اسمك> <بريدك الإلكتروني>
```
يرجى قراءة [مدونة السلوك](https://nextcloud.com/community/code-of-conduct/) لضمان بيئة تعاون إيجابية.
راجع أيضًا [إرشادات المساهمة](https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md).
## ابدأ بالمساهمة 🔧
- اقرأ [SETUP.md](https://github.com/nextcloud/android/blob/master/SETUP.md) و[CONTRIBUTING.md](https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md)
- قم بعمل fork للمستودع وابدأ بإرسال Pull Requests إلى فرع master
- يمكنك البدء بمراجعة [طلبات الدمج](https://github.com/nextcloud/android/pulls) أو العمل على [القضايا المبتدئة](https://github.com/nextcloud/android/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
## جمع سجلات الأخطاء (logcat) 🔍
### على لينكس:
- فعّل USB-Debugging على هاتفك
- افتح الطرفية وأدخل:
```bash
adb logcat --pid=$(adb shell pidof -s 'com.nextcloud.client') > logcatOutput.txt
```
> تأكد من تثبيت [adb](https://developer.android.com/studio/releases/platform-tools.html)
### على ويندوز:
- حمّل [Minimal ADB and Fastboot](https://forum.xda-developers.com/t/tool-minimal-adb-and-fastboot-2-9-18.2317790/#post-42407269)
- فعّل USB-Debugging
- افتح البرنامج وأدخل:
```bash
adb shell pidof -s 'com.nextcloud.client'
```
- استخدم الناتج كـ `<processID>` في الأمر التالي:
```bash
adb logcat --pid=<processID> > "%USERPROFILE%\Downloads\logcatOutput.txt"
```
### على الجهاز (مع صلاحيات root):
```bash
su
logcat -d --pid $(pidof -s com.nextcloud.client) -f /sdcard/logcatOutput.txt
```
أو استخدم تطبيقات مثل [CatLog](https://play.google.com/store/apps/details?id=com.nolanlawson.logcat) أو [aLogcat](https://play.google.com/store/apps/details?id=org.jtb.alogcat)
## النسخة التطويرية 🛠️
- [تحميل مباشر للـ APK](https://download.nextcloud.com/android/dev/latest.apk)
- [F-Droid النسخة التجريبية](https://f-droid.org/en/packages/com.nextcloud.android.beta/)
## المشاكل المعروفة والأسئلة الشائعة
### الإشعارات الفورية لا تعمل في نسخ F-Droid
بسبب اعتمادها على خدمات Google Play، لا تعمل الإشعارات الفورية في نسخ F-Droid حاليًا.
-518
View File
@@ -1,518 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2024 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2024 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2024 Andy Scherzinger <[email protected]>
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
import com.github.spotbugs.snom.SpotBugsTask
import org.gradle.internal.jvm.Jvm
buildscript {
dependencies {
classpath "com.android.tools.build:gradle:$androidPluginVersion"
classpath libs.spotbugs.gradle.plugin
classpath libs.kotlin.gradle.plugin
classpath libs.detekt.gradle.plugin
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
classpath "com.karumi:shot:6.1.0"
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
classpath "org.jacoco:org.jacoco.report:$jacoco_version"
classpath "org.jacoco:org.jacoco.agent:$jacoco_version"
}
}
plugins {
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.spotless)
alias(libs.plugins.kapt)
alias(libs.plugins.ksp) apply false
}
apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "kotlin-parcelize"
apply plugin: "checkstyle"
apply plugin: "pmd"
apply from: "$rootProject.projectDir/jacoco.gradle"
apply plugin: "com.github.spotbugs"
apply plugin: "io.gitlab.arturbosch.detekt"
// needed to make renovate run without shot, as shot requires Android SDK
// https://github.com/pedrovgs/Shot/issues/300
if (shotTest) {
apply plugin: "shot"
}
apply plugin: "com.google.devtools.ksp"
println "Gradle uses Java ${Jvm.current()}"
configurations {
configureEach {
exclude group: "org.jetbrains", module: "annotations-java5" // via prism4j, already using annotations explicitly
}
}
configurations.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "org.checkerframework" && requested.name != "checker-compat-qual") {
useVersion(checkerVersion)
because("https://github.com/google/ExoPlayer/issues/10007")
}
}
}
// semantic versioning for version code
def versionMajor = 3
def versionMinor = 33
def versionPatch = 0
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
def ndkEnv = new HashMap<String, String>()
file("$project.rootDir/ndk.env").readLines().each() {
def (key, value) = it.tokenize("=")
ndkEnv.put(key, value)
}
def perfAnalysis = project.hasProperty("perfAnalysis")
android {
// install this NDK version and Cmake to produce smaller APKs. Build will still work if not installed
ndkVersion = "${ndkEnv.get("NDK_VERSION")}"
namespace = "com.owncloud.android"
testNamespace = "${namespace}.test"
androidResources {
generateLocaleConfig = true
}
defaultConfig {
applicationId = "com.nextcloud.client"
minSdk = 26
targetSdk = 35
compileSdk = 35
buildConfigField "boolean", "CI", ciBuild.toString()
buildConfigField "boolean", "RUNTIME_PERF_ANALYSIS", perfAnalysis.toString()
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
// arguments to be passed to functional tests
if (shotTest) {
testInstrumentationRunner "com.karumi.shot.ShotTestRunner"
} else {
testInstrumentationRunner "com.nextcloud.client.TestRunner"
}
testInstrumentationRunnerArgument "TEST_SERVER_URL", "${NC_TEST_SERVER_BASEURL}"
testInstrumentationRunnerArgument "TEST_SERVER_USERNAME", "${NC_TEST_SERVER_USERNAME}"
testInstrumentationRunnerArgument "TEST_SERVER_PASSWORD", "${NC_TEST_SERVER_PASSWORD}"
testInstrumentationRunnerArguments disableAnalytics: "true"
versionCode versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
if (versionBuild > 89) {
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
} else if (versionBuild > 50) {
versionName "${versionMajor}.${versionMinor}.${versionPatch} RC" + (versionBuild - 50)
} else {
versionName "${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
flavorDimensions += "default"
buildTypes {
debug {
testCoverageEnabled = project.hasProperty("coverage")
resConfigs "xxxhdpi"
}
}
buildFeatures {
buildConfig = true
}
productFlavors {
// used for f-droid
generic {
applicationId "com.nextcloud.client"
dimension "default"
}
gplay {
applicationId "com.nextcloud.client"
dimension "default"
}
huawei {
applicationId "com.nextcloud.client"
dimension "default"
}
versionDev {
applicationId "com.nextcloud.android.beta"
dimension "default"
versionCode 20220322
versionName "20220322"
}
qa {
applicationId "com.nextcloud.android.qa"
dimension "default"
versionCode 1
versionName "1"
}
}
testOptions {
unitTests.returnDefaultValues = true
animationsDisabled = true
}
}
// 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
packagingOptions {
resources {
excludes += "META-INF/LICENSE*"
excludes += "META-INF/versions/9/OSGI-INF/MANIFEST*"
pickFirst "MANIFEST.MF" // workaround for duplicated manifest on some dependencies
}
}
tasks.register("checkstyle", Checkstyle) {
configFile = file("${rootProject.projectDir}/checkstyle.xml")
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
source "src"
include "**/*.java"
exclude "**/gen/**"
classpath = files()
}
tasks.register("pmd", Pmd) {
ruleSetFiles = files("${project.rootDir}/ruleset.xml")
ignoreFailures = true // should continue checking
ruleSets = []
source "src"
include "**/*.java"
exclude "**/gen/**"
reports {
xml {
destination = layout.buildDirectory.file("reports/pmd/pmd.xml").get().asFile
}
html {
destination = layout.buildDirectory.file("reports/pmd/pmd.html").get().asFile
}
}
}
check.dependsOn "checkstyle", "spotbugsGplayDebug", "pmd", "lint", "spotlessKotlinCheck", "detekt"
buildFeatures {
dataBinding = true
viewBinding = true
aidl = true
compose = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
lint {
abortOnError = false
checkGeneratedSources = true
disable "MissingTranslation", "GradleDependency", "VectorPath", "IconMissingDensityFolder", "IconDensities", "GoogleAppIndexingWarning", "MissingDefaultResource", "InvalidPeriodicWorkRequestInterval", "StringFormatInvalid", "MissingQuantity"
htmlOutput = layout.buildDirectory.file("reports/lint/lint.html").get().asFile
htmlReport = true
}
sourceSets {
// Adds exported schema location as test app assets.
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
kapt {
useBuildCache = true
}
}
dependencies {
implementation("com.github.nextcloud:android-library:$androidLibraryVersion") {
exclude group: "org.ogce", module: "xpp3" // unused in Android and brings wrong Junit version
}
// splash screen dependency ref: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
implementation libs.splashscreen
// Jetpack Compose
implementation(platform(libs.compose.bom))
implementation(libs.compose.ui)
implementation(libs.compose.ui.graphics)
implementation(libs.compose.material3)
debugImplementation(libs.compose.ui.tooling)
implementation(libs.compose.ui.tooling.preview)
// Media3
implementation libs.media3.ui
implementation libs.media3.session
implementation libs.media3.exoplayer
implementation libs.media3.datasource
// Room
implementation libs.room.runtime
ksp "androidx.room:room-compiler:$roomVersion"
androidTestImplementation libs.room.testing
// Espresso
androidTestImplementation libs.espresso.core
androidTestImplementation libs.espresso.contrib
androidTestImplementation libs.espresso.web
androidTestImplementation libs.espresso.accessibility
androidTestImplementation libs.espresso.intents
androidTestImplementation libs.espresso.idling.resource
// Glide
implementation libs.glide
ksp libs.ksp
compileOnly "org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2"
// remove after entire switch to lib v2
implementation "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
implementation "org.apache.jackrabbit:jackrabbit-webdav:2.13.5" // remove after entire switch to lib v2
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "com.google.android.material:material:1.12.0"
implementation "com.jakewharton:disklrucache:2.0.2"
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "androidx.webkit:webkit:1.14.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.exifinterface:exifinterface:1.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.2"
implementation "androidx.lifecycle:lifecycle-service:2.9.2"
implementation "androidx.work:work-runtime:$workRuntime"
implementation "androidx.work:work-runtime-ktx:$workRuntime"
implementation "androidx.fragment:fragment-ktx:1.8.8"
implementation "com.github.albfernandez:juniversalchardet:2.5.0" // need this version for Android <7
compileOnly "com.google.code.findbugs:annotations:3.0.1u2"
implementation "commons-io:commons-io:2.20.0"
implementation "org.greenrobot:eventbus:3.3.1"
implementation "com.googlecode.ez-vcard:ez-vcard:0.12.1"
implementation "org.lukhnos:nnio:0.3.1"
implementation "org.bouncycastle:bcpkix-jdk18on:1.81"
implementation "com.google.code.gson:gson:2.13.1"
implementation "com.github.nextcloud-deps:sectioned-recyclerview:0.6.1"
implementation "com.github.chrisbanes:PhotoView:2.3.0"
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.29"
implementation "com.github.nextcloud-deps:qrcodescanner:0.1.2.4" // "com.github.blikoon:QRCodeScanner:0.1.2"
implementation "com.google.android.flexbox:flexbox:3.0.0"
implementation "com.caverock:androidsvg:1.4"
implementation "androidx.annotation:annotation:1.9.1"
implementation "com.vanniktech:emoji-google:0.21.0"
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.2")
// document scanner not available on FDroid (generic) due to OpenCV binaries
gplayImplementation project(":appscan")
huaweiImplementation project(":appscan")
qaImplementation project(":appscan")
spotbugsPlugins "com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0"
spotbugsPlugins "com.mebigfatguy.fb-contrib:fb-contrib:7.6.12"
implementation "com.google.dagger:dagger:$daggerVersion"
implementation "com.google.dagger:dagger-android:$daggerVersion"
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
implementation "org.conscrypt:conscrypt-android:2.5.3"
implementation "me.zhanghai.android.fastscroll:library:1.3.0"
// Shimmer animation
implementation "io.github.elye:loaderviewlibrary:3.0.0"
// dependencies for markdown rendering
implementation "io.noties.markwon:core:$markwonVersion"
implementation "io.noties.markwon:ext-strikethrough:$markwonVersion"
implementation "io.noties.markwon:ext-tables:$markwonVersion"
implementation "io.noties.markwon:ext-tasklist:$markwonVersion"
implementation "io.noties.markwon:html:$markwonVersion"
implementation "io.noties.markwon:syntax-highlight:$markwonVersion"
implementation "io.noties:prism4j:$prismVersion"
kapt "io.noties:prism4j-bundler:$prismVersion"
// dependencies for image cropping and rotation
implementation "com.vanniktech:android-image-cropper:4.6.0"
implementation "org.osmdroid:osmdroid-android:6.1.20"
implementation("org.mnode.ical4j:ical4j:3.0.0") {
["org.apache.commons", "commons-logging"].each {
exclude group: "$it"
}
}
if (perfAnalysis) {
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.14"
}
// dependencies for local unit tests
testImplementation "junit:junit:4.13.2"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "androidx.test:core:$androidxTestVersion"
testImplementation "org.json:json:20250517"
testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
testImplementation "androidx.arch.core:core-testing:2.2.0"
testImplementation "io.mockk:mockk:$mockkVersion"
testImplementation "io.mockk:mockk-android:$mockkVersion"
// dependencies for instrumented tests
// JUnit4 Rules
androidTestImplementation "androidx.test.ext:junit:1.2.1"
androidTestImplementation "androidx.test:rules:$androidxTestVersion"
// Android JUnit Runner
androidTestImplementation "androidx.test:runner:1.6.2"
androidTestUtil "androidx.test:orchestrator:1.5.1"
androidTestImplementation "androidx.test:core-ktx:$androidxTestVersion"
// Mocking support
androidTestImplementation "com.github.tmurakami:dexopener:2.0.5" // required to allow mocking on API 27 and older
androidTestImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
androidTestImplementation "org.mockito:mockito-core:$mockitoVersion"
androidTestImplementation("org.mockito:mockito-android:$mockitoVersion")
androidTestImplementation "io.mockk:mockk-android:$mockkVersion"
androidTestImplementation "androidx.arch.core:core-testing:2.2.0"
androidTestImplementation "com.facebook.testing.screenshot:core:0.15.0"
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
// androidTestImplementation "androidx.test.uiautomator:uiautomator:2.2.0"
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
//androidTestImplementation "com.android.support:support-annotations:${supportLibraryVersion}"
androidTestImplementation "tools.fastlane:screengrab:2.1.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "com.github.stateless4j:stateless4j:2.6.0"
// upon each update first test: new registration, receive push
gplayImplementation "com.google.firebase:firebase-messaging:24.1.2"
gplayImplementation "com.google.android.gms:play-services-base:18.5.0"
gplayImplementation "com.google.android.play:review-ktx:2.0.2"
implementation "com.github.nextcloud.android-common:ui:$androidCommonLibraryVersion"
implementation "io.coil-kt:coil:2.7.0"
}
configurations.configureEach {
resolutionStrategy {
force "org.objenesis:objenesis:3.4"
eachDependency { details ->
if ("org.jacoco" == details.requested.group) {
details.useVersion "$jacoco_version"
}
}
}
}
// Run the compiler as a separate process
tasks.withType(JavaCompile).configureEach {
options.fork = true
// Enable Incremental Compilation
options.incremental = true
}
tasks.withType(Test).configureEach {
// Run tests in parallel
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
// increased logging for tests
testLogging {
events "passed", "skipped", "failed"
}
}
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output -> outputFileName = "${output.baseName}-${variant.versionCode}.apk"
}
}
spotless {
kotlin {
target "**/*.kt"
ktlint()
}
}
detekt {
config.setFrom("detekt.yml")
}
if (shotTest) {
shot {
showOnlyFailingTestsInReports = ciBuild
// CI environment renders some shadows slightly different from local VMs
// Add a 0.5% tolerance to account for that
tolerance = ciBuild ? 0.1 : 0
}
}
jacoco {
toolVersion = "$jacoco_version"
}
spotbugs {
ignoreFailures = true // should continue checking
effort = Effort.MAX
reportLevel = Confidence.valueOf("MEDIUM")
}
tasks.withType(SpotBugsTask){task ->
String variantNameCap = task.name.replace("spotbugs", "")
String variantName = variantNameCap.substring(0, 1).toLowerCase() + variantNameCap.substring(1)
dependsOn "compile${variantNameCap}Sources"
classes = fileTree(layout.buildDirectory.get().asFile.toString()+"/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/")
excludeFilter = file("${project.rootDir}/scripts/analysis/spotbugs-filter.xml")
reports {
xml {
required = true
}
html {
required = true
outputLocation = layout.buildDirectory.file("reports/spotbugs/spotbugs.html").get().asFile
stylesheet = "fancy.xsl"
}
}
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
+518
View File
@@ -0,0 +1,518 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Jimly Asshiddiqy <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
@file:Suppress("UnstableApiUsage", "DEPRECATION")
import com.android.build.gradle.internal.api.ApkVariantOutputImpl
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
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")
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.spotless)
alias(libs.plugins.kapt)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.spotbugs)
alias(libs.plugins.detekt)
// needed to make renovate run without shot, as shot requires Android SDK
// https://github.com/pedrovgs/Shot/issues/300
if (System.getenv("SHOT_TEST") == "true") alias(libs.plugins.shot)
id("checkstyle")
id("pmd")
}
apply(from = "${rootProject.projectDir}/jacoco.gradle.kts")
println("Gradle uses Java ${Jvm.current()}")
configurations.configureEach {
// via prism4j, already using annotations explicitly
exclude(group = "org.jetbrains", module = "annotations-java5")
resolutionStrategy {
force(libs.objenesis)
eachDependency {
if (requested.group == "org.checkerframework" && requested.name != "checker-compat-qual") {
useVersion(libs.versions.checker.get())
because("https://github.com/google/ExoPlayer/issues/10007")
} else if (requested.group == "org.jacoco") {
useVersion(libs.versions.jacoco.get())
} else if (requested.group == "commons-logging" && requested.name == "commons-logging") {
useTarget(libs.slfj)
}
}
}
}
// semantic versioning for version code
val versionMajor = 3
val versionMinor = 35
val versionPatch = 0
val versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
val ndkEnv = buildMap {
file("${project.rootDir}/ndk.env").readLines().forEach {
val (key, value) = it.split("=")
put(key, value)
}
}
val configProps = Properties().apply {
val file = rootProject.file(".gradle/config.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"]
android {
// install this NDK version and Cmake to produce smaller APKs. Build will still work if not installed
ndkVersion = "${ndkEnv["NDK_VERSION"]}"
namespace = "com.owncloud.android"
testNamespace = "${namespace}.test"
androidResources.generateLocaleConfig = true
defaultConfig {
applicationId = "com.nextcloud.client"
minSdk = 27
targetSdk = 36
compileSdk = 36
buildConfigField("boolean", "CI", ciBuild.toString())
buildConfigField("boolean", "RUNTIME_PERF_ANALYSIS", perfAnalysis.toString())
javaCompileOptions.annotationProcessorOptions {
arguments += mapOf("room.schemaLocation" to "$projectDir/schemas")
}
// arguments to be passed to functional tests
testInstrumentationRunner = if (shotTest) "com.karumi.shot.ShotTestRunner"
else "com.nextcloud.client.TestRunner"
testInstrumentationRunnerArguments += mapOf(
"TEST_SERVER_URL" to ncTestServerBaseUrl.toString(),
"TEST_SERVER_USERNAME" to ncTestServerUsername.toString(),
"TEST_SERVER_PASSWORD" to ncTestServerPassword.toString()
)
testInstrumentationRunnerArguments["disableAnalytics"] = "true"
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
flavorDimensions += "default"
buildTypes {
release {
buildConfigField("String", "NC_TEST_SERVER_DATA_STRING", "\"\"")
}
debug {
enableUnitTestCoverage = project.hasProperty("coverage")
resConfigs("xxxhdpi")
buildConfigField(
"String",
"NC_TEST_SERVER_DATA_STRING",
"\"nc://login/user:${ncTestServerUsername}&password:${ncTestServerPassword}&server:${ncTestServerBaseUrl}\""
)
}
}
productFlavors {
// used for f-droid
register("generic") {
applicationId = "com.nextcloud.client"
dimension = "default"
}
register("gplay") {
applicationId = "com.nextcloud.client"
dimension = "default"
}
register("huawei") {
applicationId = "com.nextcloud.client"
dimension = "default"
}
register("versionDev") {
applicationId = "com.nextcloud.android.beta"
dimension = "default"
versionCode = 20220322
versionName = "20220322"
}
register("qa") {
applicationId = "com.nextcloud.android.qa"
dimension = "default"
versionCode = 1
versionName = "1"
}
}
}
applicationVariants.configureEach {
outputs.configureEach {
if (this is ApkVariantOutputImpl) this.outputFileName = "${this.baseName}-${this.versionCode}.apk"
}
}
testOptions {
unitTests.isReturnDefaultValues = true
animationsDisabled = true
}
// 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
packaging.resources {
excludes.addAll(listOf("META-INF/LICENSE*", "META-INF/versions/9/OSGI-INF/MANIFEST*"))
pickFirsts.add("MANIFEST.MF") // workaround for duplicated manifest on some dependencies
}
buildFeatures {
buildConfig = true
dataBinding = true
viewBinding = true
aidl = true
compose = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
lint {
abortOnError = false
checkGeneratedSources = true
disable.addAll(
listOf(
"MissingTranslation",
"GradleDependency",
"VectorPath",
"IconMissingDensityFolder",
"IconDensities",
"GoogleAppIndexingWarning",
"MissingDefaultResource",
"InvalidPeriodicWorkRequestInterval",
"StringFormatInvalid",
"MissingQuantity"
)
)
htmlOutput = layout.buildDirectory.file("reports/lint/lint.html").get().asFile
htmlReport = true
}
sourceSets {
// Adds exported schema location as test app assets.
getByName("androidTest") {
assets.srcDirs(files("$projectDir/schemas"))
}
}
}
kapt.useBuildCache = true
ksp.arg("room.schemaLocation", "$projectDir/schemas")
kotlin.compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
spotless.kotlin {
target("**/*.kt")
ktlint()
}
detekt.config.setFrom("detekt.yml")
if (shotTest) configure<ShotExtension> {
showOnlyFailingTestsInReports = ciBuild
// CI environment renders some shadows slightly different from local VMs
// Add a 0.5% tolerance to account for that
tolerance = if (ciBuild) 0.1 else 0.0
}
spotbugs {
ignoreFailures = true // should continue checking
effort = Effort.MAX
reportLevel = Confidence.valueOf("MEDIUM")
}
tasks.register<Checkstyle>("checkstyle") {
configFile = file("${rootProject.projectDir}/checkstyle.xml")
setConfigProperties(
"checkstyleSuppressionsPath" to file("${rootProject.rootDir}/suppressions.xml").absolutePath
)
source("src")
include("**/*.java")
exclude("**/gen/**")
classpath = files()
}
tasks.register<Pmd>("pmd") {
ruleSetFiles = files("${rootProject.rootDir}/ruleset.xml")
ignoreFailures = true // should continue checking
ruleSets = emptyList()
source("src")
include("**/*.java")
exclude("**/gen/**")
reports {
xml.outputLocation.set(layout.buildDirectory.file("reports/pmd/pmd.xml").get().asFile)
html.outputLocation.set(layout.buildDirectory.file("reports/pmd/pmd.html").get().asFile)
}
}
tasks.withType<SpotBugsTask>().configureEach {
val variantNameCap = name.replace("spotbugs", "")
val variantName = variantNameCap.substring(0, 1).lowercase() + variantNameCap.substring(1)
dependsOn("compile${variantNameCap}Sources")
classes = fileTree(
layout.buildDirectory.get().asFile.toString() +
"/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/"
)
excludeFilter.set(file("${project.rootDir}/scripts/analysis/spotbugs-filter.xml"))
reports.create("xml") {
required.set(true)
}
reports.create("html") {
required.set(true)
outputLocation.set(layout.buildDirectory.file("reports/spotbugs/spotbugs.html"))
setStylesheet("fancy.xsl")
}
}
// Run the compiler as a separate process
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
// Enable Incremental Compilation
options.isIncremental = true
}
tasks.withType<Test>().configureEach {
// Run tests in parallel
maxParallelForks = Runtime.getRuntime().availableProcessors().div(2)
// increased logging for tests
testLogging.events("passed", "skipped", "failed")
}
tasks.named("check").configure {
dependsOn("checkstyle", "spotbugsGplayDebug", "pmd", "lint", "spotlessKotlinCheck", "detekt")
}
dependencies {
// region Nextcloud library
implementation(libs.android.library) {
exclude(group = "org.ogce", module = "xpp3") // unused in Android and brings wrong Junit version
}
// endregion
// region Splash Screen
implementation(libs.splashscreen)
// endregion
// region Jetpack Compose
implementation(platform(libs.compose.bom))
implementation(libs.material.icons.core)
implementation(libs.compose.ui)
implementation(libs.compose.ui.graphics)
implementation(libs.compose.material3)
implementation(libs.compose.ui.tooling.preview)
debugImplementation(libs.compose.ui.tooling)
// endregion
// region Media3
implementation(libs.bundles.media3)
// endregion
// region Room
implementation(libs.room.runtime)
ksp(libs.room.compiler)
androidTestImplementation(libs.room.testing)
// endregion
// region Espresso
androidTestImplementation(libs.bundles.espresso)
// endregion
// region Glide
implementation(libs.glide)
ksp(libs.ksp)
// endregion
// region UI
implementation(libs.bundles.ui)
// endregion
// region Worker
implementation(libs.work.runtime)
implementation(libs.work.runtime.ktx)
// endregion
// region Lifecycle
implementation(libs.lifecycle.viewmodel.ktx)
implementation(libs.lifecycle.service)
implementation(libs.lifecycle.runtime.ktx)
// endregion
// region JUnit
androidTestImplementation(libs.junit)
androidTestImplementation(libs.rules)
androidTestImplementation(libs.runner)
androidTestUtil(libs.orchestrator)
androidTestImplementation(libs.core.ktx)
androidTestImplementation(libs.core.testing)
// endregion
// 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)
implementation(libs.legacy.support.v4)
implementation(libs.material)
implementation(libs.disklrucache)
implementation(libs.juniversalchardet) // need this version for Android <7
compileOnly(libs.annotations)
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)
// endregion
// region AppScan, document scanner not available on FDroid (generic) due to OpenCV binaries
"gplayImplementation"(project(":appscan"))
"huaweiImplementation"(project(":appscan"))
"qaImplementation"(project(":appscan"))
// endregion
// region SpotBugs
spotbugsPlugins(libs.findsecbugs.plugin)
spotbugsPlugins(libs.fb.contrib)
// endregion
// region Dagger
implementation(libs.dagger)
implementation(libs.dagger.android)
implementation(libs.dagger.android.support)
ksp(libs.dagger.compiler)
ksp(libs.dagger.processor)
// endregion
// region Crypto
implementation(libs.conscrypt.android)
// endregion
// region Library
implementation(libs.library)
// endregion
// region Shimmer
implementation(libs.loaderviewlibrary)
// endregion
// region Markdown rendering
implementation(libs.bundles.markdown.rendering)
kapt(libs.prism4j.bundler)
// endregion
// region Image cropping / rotation
implementation(libs.android.image.cropper)
// endregion
// region Maps
implementation(libs.osmdroid.android)
// endregion
// region iCal4j
implementation(libs.ical4j) {
listOf("org.apache.commons", "commons-logging").forEach { groupName -> exclude(group = groupName) }
}
// endregion
// region LeakCanary
if (perfAnalysis) debugImplementation(libs.leakcanary)
// endregion
// region Local Unit Test
testImplementation(libs.bundles.unit.test)
// endregion
// region Mocking support
androidTestImplementation(libs.bundles.mocking)
// endregion
// region UIAutomator
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
// androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0"
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
// androidTestImplementation("com.android.support:support-annotations:${supportLibraryVersion}"
androidTestImplementation(libs.screengrab)
// endregion
// region Kotlin
implementation(libs.kotlin.stdlib)
// endregion
// region Stateless
implementation(libs.stateless4j)
// endregion
// region Google Play dependencies, upon each update first test: new registration, receive push
"gplayImplementation"(libs.bundles.gplay)
// endregion
// region UI
implementation(libs.ui)
// endregion
// region Image loading
implementation(libs.coil)
// endregion
// kotlinx.serialization
implementation(libs.kotlinx.serialization.json)
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

@@ -1,39 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client;
import android.app.Activity;
import com.nextcloud.test.GrantStoragePermissionRule;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.ui.activity.CommunityActivity;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestRule;
import androidx.test.espresso.intent.rule.IntentsTestRule;
public class CommunityActivityIT extends AbstractIT {
@Rule public IntentsTestRule<CommunityActivity> activityRule = new IntentsTestRule<>(CommunityActivity.class,
true,
false);
@Rule
public final TestRule permissionRule = GrantStoragePermissionRule.grant();
@Test
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
screenshot(sut);
}
}
@@ -0,0 +1,59 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.ui.activity.CommunityActivity
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
class CommunityActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.CommunityActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@get:Rule
var storagePermissionRule: TestRule = grant()
@Test
@UiThread
@ScreenshotTest
fun open() {
launchActivity<CommunityActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -5,24 +5,24 @@
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client
import android.app.Activity
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.closeSoftKeyboard
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.DrawerActions
import androidx.test.espresso.contrib.NavigationViewActions
import androidx.test.espresso.contrib.RecyclerViewActions
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.hasDescendant
import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.platform.app.InstrumentationRegistry
import com.nextcloud.test.RetryTestRule
import com.owncloud.android.AbstractOnServerIT
import com.owncloud.android.R
@@ -35,33 +35,39 @@ 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 org.junit.Assert
import com.owncloud.android.utils.EspressoIdlingResource
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
import org.junit.Test
class FileDisplayActivityIT : AbstractOnServerIT() {
@get:Rule
val activityRule = IntentsTestRule(
FileDisplayActivity::class.java,
true,
false
)
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@get:Rule
val retryRule = RetryTestRule() // showShares is flaky
// @ScreenshotTest // todo run without real server
@Suppress("DEPRECATION")
@Test
fun showShares() {
Assert.assertTrue(ExistenceCheckRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess)
Assert.assertTrue(CreateFolderRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess)
Assert.assertTrue(CreateFolderRemoteOperation("/shareToGroup/", true).execute(client).isSuccess)
Assert.assertTrue(CreateFolderRemoteOperation("/shareViaLink/", true).execute(client).isSuccess)
Assert.assertTrue(CreateFolderRemoteOperation("/noShare/", true).execute(client).isSuccess)
// assertTrue(new CreateFolderRemoteOperation("/shareToCircle/", true).execute(client).isSuccess());
assertTrue(ExistenceCheckRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess)
assertTrue(CreateFolderRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess)
assertTrue(CreateFolderRemoteOperation("/shareToGroup/", true).execute(client).isSuccess)
assertTrue(CreateFolderRemoteOperation("/shareViaLink/", true).execute(client).isSuccess)
assertTrue(CreateFolderRemoteOperation("/noShare/", true).execute(client).isSuccess)
// share folder to user "admin"
Assert.assertTrue(
assertTrue(
CreateShareRemoteOperation(
"/shareToAdmin/",
ShareType.USER,
@@ -73,7 +79,7 @@ class FileDisplayActivityIT : AbstractOnServerIT() {
)
// share folder via public link
Assert.assertTrue(
assertTrue(
CreateShareRemoteOperation(
"/shareViaLink/",
ShareType.PUBLIC_LINK,
@@ -85,7 +91,7 @@ class FileDisplayActivityIT : AbstractOnServerIT() {
)
// share folder to group
Assert.assertTrue(
assertTrue(
CreateShareRemoteOperation(
"/shareToGroup/",
ShareType.GROUP,
@@ -96,103 +102,55 @@ class FileDisplayActivityIT : AbstractOnServerIT() {
).execute(client).isSuccess
)
// share folder to circle
// get share
// RemoteOperationResult searchResult = new GetShareesRemoteOperation("publicCircle", 1, 50).execute(client);
// assertTrue(searchResult.getLogMessage(), searchResult.isSuccess());
//
// JSONObject resultJson = (JSONObject) searchResult.getData().get(0);
// String circleId = resultJson.getJSONObject("value").getString("shareWith");
//
// assertTrue(new CreateShareRemoteOperation("/shareToCircle/",
// ShareType.CIRCLE,
// circleId,
// false,
// "",
// OCShare.DEFAULT_PERMISSION)
// .execute(client).isSuccess());
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
// open drawer
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
val sut: Activity = activityRule.launchActivity(null)
InstrumentationRegistry.getInstrumentation().waitForIdleSync()
// open drawer
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
// click "shared"
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_shared))
shortSleep()
shortSleep()
// screenshot(sut) // todo run without real server
// click "shared"
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_shared))
}
}
}
}
@Suppress("DEPRECATION")
@Test
fun allFiles() {
val sut = activityRule.launchActivity(null)
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
// given test folder
assertTrue(
CreateFolderOperation("/test/", user, targetContext, storageManager)
.execute(client)
.isSuccess
)
// given test folder
Assert.assertTrue(
CreateFolderOperation("/test/", user, targetContext, storageManager)
.execute(client)
.isSuccess
)
// navigate into it
val test = storageManager.getFileByPath("/test/")
sut.file = test
sut.startSyncFolderOperation(test, false)
assertEquals(storageManager.getFileByPath("/test/"), sut.currentDir)
EspressoIdlingResource.decrement()
// navigate into it
val test = storageManager.getFileByPath("/test/")
sut.file = test
sut.startSyncFolderOperation(test, false)
Assert.assertEquals(storageManager.getFileByPath("/test/"), sut.currentDir)
// open drawer
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
// open drawer
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
// click "all files"
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_all_files))
// click "all files"
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_all_files))
// then should be in root again
shortSleep()
Assert.assertEquals(storageManager.getFileByPath("/"), sut.currentDir)
// then should be in root again
assertEquals(storageManager.getFileByPath("/"), sut.currentDir)
}
}
}
}
// @Test
// fun checkToolbarTitleOnNavigation() {
// // Create folder structure
// val topFolder = "folder1"
// val childFolder = "folder2"
//
// CreateFolderOperation("/$topFolder/", user, targetContext, storageManager)
// .execute(client)
//
// CreateFolderOperation("/$topFolder/$childFolder/", user, targetContext, storageManager)
// .execute(client)
//
// activityRule.launchActivity(null)
//
// shortSleep()
//
// // go into "foo"
// onView(withText(topFolder)).perform(click())
// shortSleep()
//
// // check title is right
// checkToolbarTitle(topFolder)
//
// // go into "bar"
// onView(withText(childFolder)).perform(click())
// shortSleep()
//
// // check title is right
// checkToolbarTitle(childFolder)
//
// // browse back up, we should be back in "foo"
// Espresso.pressBack()
// shortSleep()
//
// // check title is right
// checkToolbarTitle(topFolder)
// }
private fun checkToolbarTitle(childFolder: String) {
onView(withId(R.id.appbar)).check(
matches(
@@ -203,8 +161,10 @@ class FileDisplayActivityIT : AbstractOnServerIT() {
)
}
@Suppress("DEPRECATION")
@Test
fun browseFavoriteAndBack() {
EspressoIdlingResource.increment()
// Create folder structure
val topFolder = "folder1"
@@ -212,52 +172,68 @@ class FileDisplayActivityIT : AbstractOnServerIT() {
.execute(client)
ToggleFavoriteRemoteOperation(true, "/$topFolder/")
.execute(client)
EspressoIdlingResource.decrement()
val sut = activityRule.launchActivity(null)
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
// navigate to favorites
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_favorites))
// navigate to favorites
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
onView(withId(R.id.nav_view))
.perform(NavigationViewActions.navigateTo(R.id.nav_favorites))
shortSleep()
// check sort button is not shown, favorites are not sortable
onView(
withId(R.id.sort_button)
).check(matches(withEffectiveVisibility(ViewMatchers.Visibility.GONE)))
// check sort button is not shown, favorites are not sortable
onView(withId(R.id.sort_button)).check(matches(withEffectiveVisibility(ViewMatchers.Visibility.GONE)))
// browse into folder
onView(withId(R.id.list_root))
.perform(closeSoftKeyboard())
.perform(
RecyclerViewActions.actionOnItemAtPosition<OCFileListItemViewHolder>(
0,
click()
)
)
checkToolbarTitle(topFolder)
// sort button should now be visible
onView(withId(R.id.sort_button)).check(matches(ViewMatchers.isDisplayed()))
// browse into folder
onView(withId(R.id.list_root))
.perform(closeSoftKeyboard())
.perform(
RecyclerViewActions.actionOnItemAtPosition<OCFileListItemViewHolder>(
0,
click()
)
)
shortSleep()
checkToolbarTitle(topFolder)
// sort button should now be visible
onView(withId(R.id.sort_button)).check(matches(ViewMatchers.isDisplayed()))
// browse back, should be back to All Files
Espresso.pressBack()
checkToolbarTitle(sut.getString(R.string.app_name))
onView(withId(R.id.sort_button)).check(matches(ViewMatchers.isDisplayed()))
// browse back, should be back to All Files
Espresso.pressBack()
checkToolbarTitle(sut.getString(R.string.app_name))
onView(withId(R.id.sort_button)).check(matches(ViewMatchers.isDisplayed()))
}
}
}
}
@Suppress("DEPRECATION")
@Test
fun switchToGridView() {
activityRule.launchActivity(null)
Assert.assertTrue(
CreateFolderOperation("/test/", user, targetContext, storageManager)
.execute(client)
.isSuccess
)
onView(withId(R.id.switch_grid_view_button)).perform(click())
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
assertTrue(
CreateFolderOperation("/test/", user, targetContext, storageManager)
.execute(client)
.isSuccess
)
onView(withId(R.id.switch_grid_view_button)).perform(click())
}
}
}
}
@Test
fun openAccountSwitcher() {
activityRule.launchActivity(null)
onView(withId(R.id.switch_account_button)).perform(click())
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
onView(withId(R.id.switch_account_button)).perform(click())
}
}
}
}
}
@@ -24,6 +24,7 @@ import com.owncloud.android.AbstractIT
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.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
@@ -68,7 +69,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
listOfFilesFragment?.let {
it.setFabEnabled(false)
resetScrolling(true)
it.setEmptyListLoadingMessage()
it.setEmptyListMessage(EmptyListState.LOADING)
it.isLoading = false
}
}
@@ -98,7 +99,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
val fragment = sut.listOfFilesFragment
Assert.assertNotNull(fragment)
fragment!!.setFabEnabled(false)
fragment.setEmptyListLoadingMessage()
fragment.setEmptyListMessage(EmptyListState.LOADING)
fragment.isLoading = false
EspressoIdlingResource.decrement()
@@ -113,7 +114,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
EspressoIdlingResource.increment()
fragment.setFabEnabled(false)
fragment.setEmptyListLoadingMessage()
fragment.setEmptyListMessage(EmptyListState.LOADING)
fragment.isLoading = false
EspressoIdlingResource.decrement()
@@ -146,7 +147,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
listOfFilesFragment?.let {
it.setFabEnabled(false)
it.setEmptyListLoadingMessage()
it.setEmptyListMessage(EmptyListState.LOADING)
it.isLoading = false
}
}
@@ -1,34 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client;
import android.app.Activity;
import com.nextcloud.client.onboarding.FirstRunActivity;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import androidx.test.espresso.intent.rule.IntentsTestRule;
public class FirstRunActivityIT extends AbstractIT {
@Rule public IntentsTestRule<FirstRunActivity> activityRule = new IntentsTestRule<>(FirstRunActivity.class,
true,
false);
@Test
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
screenshot(sut);
}
}
@@ -0,0 +1,53 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.onboarding.FirstRunActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Test
class FirstRunActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.FirstRunActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun open() {
launchActivity<FirstRunActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -1,71 +1,109 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client
import android.app.Activity
import android.content.Intent
import android.os.Looper
import androidx.test.espresso.intent.rule.IntentsTestRule
import com.nextcloud.test.GrantStoragePermissionRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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
import com.owncloud.android.ui.activity.SettingsActivity
import com.owncloud.android.utils.EncryptionUtils
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Assert
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
@Suppress("FunctionNaming")
class SettingsActivityIT : AbstractIT() {
@get:Rule
val activityRule = IntentsTestRule(
SettingsActivity::class.java,
true,
false
)
private val testClassName = "com.nextcloud.client.SettingsActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@get:Rule
val permissionRule = GrantStoragePermissionRule.grant()
var storagePermissionRule: TestRule = grant()
@Test
@UiThread
@ScreenshotTest
fun open() {
val sut: Activity = activityRule.launchActivity(null)
screenshot(sut)
launchActivity<SettingsActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun showMnemonic_Error() {
val sut = activityRule.launchActivity(null)
sut.handleMnemonicRequest(null)
shortSleep()
waitForIdleSync()
screenshot(sut)
launchActivity<SettingsActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
sut.handleMnemonicRequest(null)
val screenShotName = createName(testClassName + "_" + "showMnemonic_Error", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Suppress("DEPRECATION")
@Test
@UiThread
fun showMnemonic() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val intent = Intent()
intent.putExtra(RequestCredentialsActivity.KEY_CHECK_RESULT, RequestCredentialsActivity.KEY_CHECK_RESULT_TRUE)
val arbitraryDataProvider = ArbitraryDataProviderImpl(targetContext)
arbitraryDataProvider.storeOrUpdateKeyValue(user.accountName, EncryptionUtils.MNEMONIC, "Secret mnemonic")
val sut = activityRule.launchActivity(null)
sut.runOnUiThread {
sut.handleMnemonicRequest(intent)
val intent = Intent().apply {
putExtra(RequestCredentialsActivity.KEY_CHECK_RESULT, RequestCredentialsActivity.KEY_CHECK_RESULT_TRUE)
}
Looper.myLooper()?.quitSafely()
Assert.assertTrue(true) // if we reach this, everything is ok
ArbitraryDataProviderImpl(targetContext).run {
storeOrUpdateKeyValue(user.accountName, EncryptionUtils.MNEMONIC, "Secret mnemonic")
}
launchActivity<SettingsActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
sut.handleMnemonicRequest(intent)
onView(isRoot()).check(matches(isDisplayed()))
Looper.myLooper()?.quitSafely()
Assert.assertTrue(true)
}
}
}
}
}
@@ -1,102 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client;
import android.content.Intent;
import android.os.Looper;
import com.nextcloud.client.preferences.SubFolderRule;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.databinding.SyncedFoldersLayoutBinding;
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;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import java.util.Objects;
import androidx.appcompat.app.AlertDialog;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
public class SyncedFoldersActivityIT extends AbstractIT {
@Rule public IntentsTestRule<SyncedFoldersActivity> activityRule = new IntentsTestRule<>(SyncedFoldersActivity.class,
true,
false);
@Test
@ScreenshotTest
public void open() {
SyncedFoldersActivity activity = activityRule.launchActivity(null);
activity.adapter.clear();
SyncedFoldersLayoutBinding sut = activity.binding;
shortSleep();
screenshot(sut.emptyList.emptyListView);
}
@Test
@ScreenshotTest
public void testSyncedFolderDialog() {
SyncedFolderDisplayItem item = new SyncedFolderDisplayItem(1,
"/sdcard/DCIM/",
"/InstantUpload/",
true,
false,
false,
true,
"test@https://nextcloud.localhost",
0,
0,
true,
1000,
"Name",
MediaFolderType.IMAGE,
false,
SubFolderRule.YEAR_MONTH,
false,
SyncedFolder.NOT_SCANNED_YET);
SyncedFolderPreferencesDialogFragment sut = SyncedFolderPreferencesDialogFragment.newInstance(item, 0);
Intent intent = new Intent(targetContext, SyncedFoldersActivity.class);
SyncedFoldersActivity activity = activityRule.launchActivity(intent);
sut.show(activity.getSupportFragmentManager(), "");
getInstrumentation().waitForIdleSync();
shortSleep();
screenshot(Objects.requireNonNull(sut.requireDialog().getWindow()).getDecorView());
}
@Test
@ScreenshotTest
public void showPowerCheckDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
Intent intent = new Intent(targetContext, SyncedFoldersActivity.class);
SyncedFoldersActivity activity = activityRule.launchActivity(intent);
AlertDialog sut = activity.buildPowerCheckDialog();
activity.runOnUiThread(sut::show);
getInstrumentation().waitForIdleSync();
shortSleep();
screenshot(Objects.requireNonNull(sut.getWindow()).getDecorView());
}
}
@@ -0,0 +1,133 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client
import android.content.Intent
import android.os.Looper
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.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.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Test
class SyncedFoldersActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.SyncedFoldersActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun open() {
launchActivity<SyncedFoldersActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.adapter.clear()
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.binding.emptyList.emptyListView, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testSyncedFolderDialog() {
val item = SyncedFolderDisplayItem(
1,
"/sdcard/DCIM/",
"/InstantUpload/",
true,
false,
false,
true,
"test@https://nextcloud.localhost",
0,
0,
true,
1000,
"Name",
MediaFolderType.IMAGE,
false,
SubFolderRule.YEAR_MONTH,
false,
SyncedFolder.NOT_SCANNED_YET
)
val fragment = newInstance(item, 0)
val intent = Intent(targetContext, SyncedFoldersActivity::class.java)
launchActivity<SyncedFoldersActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
fragment?.show(sut.supportFragmentManager, "")
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "testSyncedFolderDialog", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshot(fragment?.requireDialog()?.window?.decorView, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun showPowerCheckDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val intent = Intent(targetContext, SyncedFoldersActivity::class.java)
launchActivity<SyncedFoldersActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val dialog = sut.buildPowerCheckDialog()
sut.showPowerCheckDialog()
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showPowerCheckDialog", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshot(dialog.window?.decorView, screenShotName)
}
}
}
}
}
@@ -1,30 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.ui.activity.UploadListActivity;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import androidx.test.espresso.intent.rule.IntentsTestRule;
public class UploadListActivityActivityIT extends AbstractIT {
@Rule public IntentsTestRule<UploadListActivity> activityRule = new IntentsTestRule<>(UploadListActivity.class,
true,
false);
@Test
@ScreenshotTest
public void openDrawer() {
super.openDrawer(activityRule);
}
}
@@ -0,0 +1,58 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.DrawerActions
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
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.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Test
class UploadListActivityActivityIT : AbstractIT() {
private val testClassName = "com.nextcloud.client.UploadListActivityActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun openDrawer() {
launchActivity<UploadListActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
onView(isRoot()).check(matches(isDisplayed()))
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open())
val screenShotName = createName(testClassName + "_" + "openDrawer", "")
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -12,7 +12,7 @@ import android.net.Uri
import android.os.Parcel
import com.owncloud.android.lib.common.OwnCloudAccount
import com.owncloud.android.lib.common.OwnCloudBasicCredentials
import com.owncloud.android.lib.resources.status.OwnCloudVersion
import com.owncloud.android.lib.resources.status.NextcloudVersion
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotSame
@@ -31,7 +31,7 @@ class RegisteredUserTest {
val ownCloudAccount = OwnCloudAccount(uri, credentials)
val server = Server(
uri = URI(uri.toString()),
version = OwnCloudVersion.nextcloud_18
version = NextcloudVersion.nextcloud_31
)
return RegisteredUser(
account = account,
@@ -7,35 +7,64 @@
*/
package com.nextcloud.client.etm
import android.app.Activity
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class EtmActivityTest : AbstractIT() {
@get:Rule
var activityRule = IntentsTestRule(EtmActivity::class.java, true, false)
private val testClassName = "com.nextcloud.client.etm.EtmActivityTest"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun overview() {
val sut: Activity = activityRule.launchActivity(null)
waitForIdleSync()
screenshot(sut)
launchActivity<EtmActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "overview", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun accounts() {
val sut: EtmActivity = activityRule.launchActivity(null)
launchActivity<EtmActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.vm.onPageSelected(1)
EspressoIdlingResource.decrement()
UiThreadStatement.runOnUiThread { sut.vm.onPageSelected(1) }
screenshot(sut)
val screenShotName = createName(testClassName + "_" + "accounts", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -107,7 +107,7 @@ class DeepLinkHandlerTest {
fun createMockUser(serverBaseUrl: String): User {
val user = mock<User>()
val uri = URI.create(serverBaseUrl)
val server = Server(uri = uri, version = OwnCloudVersion.nextcloud_19)
val server = Server(uri = uri, version = OwnCloudVersion.nextcloud_20)
whenever(user.server).thenReturn(server)
return user
}
@@ -0,0 +1,90 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.extensions
import android.graphics.Bitmap
import android.graphics.Color
import androidx.exifinterface.media.ExifInterface
import com.nextcloud.utils.rotateBitmapViaExif
import junit.framework.TestCase.assertEquals
import org.junit.Test
class BitmapRotationTests {
private fun createTestBitmap(): Bitmap = Bitmap.createBitmap(2, 2, Bitmap.Config.ARGB_8888).apply {
setPixel(0, 0, Color.RED)
setPixel(1, 0, Color.GREEN)
setPixel(0, 1, Color.BLUE)
setPixel(1, 1, Color.YELLOW)
}
@Test
fun testRotateBitmapViaExifWhenGivenNullBitmapShouldReturnNull() {
val rotated = null.rotateBitmapViaExif(ExifInterface.ORIENTATION_ROTATE_90)
assertEquals(null, rotated)
}
@Test
fun testRotateBitmapViaExifWhenGivenNormalOrientationShouldReturnSameBitmap() {
val bmp = createTestBitmap()
val rotated = bmp.rotateBitmapViaExif(ExifInterface.ORIENTATION_NORMAL)
assertEquals(bmp, rotated)
}
@Test
fun testRotateBitmapViaExifWhenGivenRotate90ShouldReturnRotatedBitmap() {
val bmp = createTestBitmap()
val rotated = bmp.rotateBitmapViaExif(ExifInterface.ORIENTATION_ROTATE_90)!!
assertEquals(bmp.width, rotated.height)
assertEquals(bmp.height, rotated.width)
assertEquals(Color.BLUE, rotated.getPixel(0, 0))
assertEquals(Color.RED, rotated.getPixel(1, 0))
assertEquals(Color.YELLOW, rotated.getPixel(0, 1))
assertEquals(Color.GREEN, rotated.getPixel(1, 1))
}
@Test
fun testRotateBitmapViaExifWhenGivenRotate180ShouldReturnRotatedBitmap() {
val bmp = createTestBitmap()
val rotated = bmp.rotateBitmapViaExif(ExifInterface.ORIENTATION_ROTATE_180)!!
assertEquals(bmp.width, rotated.width)
assertEquals(bmp.height, rotated.height)
assertEquals(Color.YELLOW, rotated.getPixel(0, 0))
assertEquals(Color.BLUE, rotated.getPixel(1, 0))
assertEquals(Color.GREEN, rotated.getPixel(0, 1))
assertEquals(Color.RED, rotated.getPixel(1, 1))
}
@Test
fun testRotateBitmapViaExifWhenGivenFlipHorizontalShouldReturnFlippedBitmap() {
val bmp = createTestBitmap()
val rotated = bmp.rotateBitmapViaExif(ExifInterface.ORIENTATION_FLIP_HORIZONTAL)!!
assertEquals(bmp.width, rotated.width)
assertEquals(bmp.height, rotated.height)
assertEquals(Color.GREEN, rotated.getPixel(0, 0))
assertEquals(Color.RED, rotated.getPixel(1, 0))
assertEquals(Color.YELLOW, rotated.getPixel(0, 1))
assertEquals(Color.BLUE, rotated.getPixel(1, 1))
}
@Test
fun testRotateBitmapViaExifWhenGivenFlipVerticalShouldReturnFlippedBitmap() {
val bmp = createTestBitmap()
val rotated = bmp.rotateBitmapViaExif(ExifInterface.ORIENTATION_FLIP_VERTICAL)!!
assertEquals(bmp.width, rotated.width)
assertEquals(bmp.height, rotated.height)
assertEquals(Color.BLUE, rotated.getPixel(0, 0))
assertEquals(Color.YELLOW, rotated.getPixel(1, 0))
assertEquals(Color.RED, rotated.getPixel(0, 1))
assertEquals(Color.GREEN, rotated.getPixel(1, 1))
}
}
@@ -0,0 +1,78 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.extensions
import android.graphics.Bitmap
import android.graphics.Color
import androidx.exifinterface.media.ExifInterface
import com.nextcloud.utils.extensions.getExifOrientation
import junit.framework.TestCase.assertEquals
import org.junit.After
import org.junit.Test
import java.io.File
class GetExifOrientationTests {
private val tempFiles = mutableListOf<File>()
@Suppress("MagicNumber")
private fun createTempImageFile(): File {
val file = File.createTempFile("test_image", ".jpg")
tempFiles.add(file)
val bmp = Bitmap.createBitmap(2, 2, Bitmap.Config.ARGB_8888).apply {
setPixel(0, 0, Color.RED)
setPixel(1, 0, Color.GREEN)
setPixel(0, 1, Color.BLUE)
setPixel(1, 1, Color.YELLOW)
}
file.outputStream().use { out ->
bmp.compress(Bitmap.CompressFormat.JPEG, 100, out)
}
return file
}
@After
fun cleanup() {
tempFiles.forEach { it.delete() }
}
@Test
fun testGetExifOrientationWhenExifIsRotate90ShouldReturnRotate90() {
val file = createTempImageFile()
val exif = ExifInterface(file.absolutePath)
exif.setAttribute(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_ROTATE_90.toString())
exif.saveAttributes()
val orientation = getExifOrientation(file.absolutePath)
assertEquals(ExifInterface.ORIENTATION_ROTATE_90, orientation)
}
@Test
fun testGetExifOrientationWhenExifIsRotate180ShouldReturnRotate180() {
val file = createTempImageFile()
val exif = ExifInterface(file.absolutePath)
exif.setAttribute(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_ROTATE_180.toString())
exif.saveAttributes()
val orientation = getExifOrientation(file.absolutePath)
assertEquals(ExifInterface.ORIENTATION_ROTATE_180, orientation)
}
@Test
fun testGetExifOrientationWhenExifIsUndefinedShouldReturnUndefined() {
val file = createTempImageFile()
val orientation = getExifOrientation(file.absolutePath)
assertEquals(ExifInterface.ORIENTATION_UNDEFINED, orientation)
}
}
@@ -0,0 +1,176 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.extensions
import com.nextcloud.utils.extensions.isNotBlankAndEquals
import junit.framework.TestCase.assertFalse
import junit.framework.TestCase.assertTrue
import org.junit.Test
@Suppress("TooManyFunctions")
class StringExtensionTests {
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreNull() {
val str1: String? = null
val str2: String? = null
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenFirstStringIsNull() {
val str1: String? = null
val str2 = "hello"
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenSecondStringIsNull() {
val str1 = "hello"
val str2: String? = null
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreEmpty() {
val str1 = ""
val str2 = ""
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenFirstStringIsEmpty() {
val str1 = ""
val str2 = "hello"
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenSecondStringIsEmpty() {
val str1 = "hello"
val str2 = ""
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreWhitespaceOnly() {
val str1 = " "
val str2 = " \t "
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenFirstStringIsWhitespaceOnly() {
val str1 = " "
val str2 = "hello"
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenSecondStringIsWhitespaceOnly() {
val str1 = "hello"
val str2 = " "
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenStringsAreDifferentButBothValid() {
val str1 = "hello"
val str2 = "world"
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenStringsHaveDifferentCase() {
val str1 = "Hello"
val str2 = "hello"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenMixedCaseStrings() {
val str1 = "HeLLo WoRLd"
val str2 = "hello world"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenUppercaseStrings() {
val str1 = "HELLO"
val str2 = "hello"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreIdenticalAndValid() {
val str1 = "hello"
val str2 = "hello"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreIdenticalWithSpaces() {
val str1 = "hello world"
val str2 = "hello world"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreIdenticalSingleCharacter() {
val str1 = "a"
val str2 = "A"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreIdenticalWithSpecialCharacters() {
val str1 = "hello@world!123"
val str2 = "HELLO@WORLD!123"
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenOneHasLeadingWhitespaceAndOtherDoesNot() {
val str1 = " hello"
val str2 = "HELLO"
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenOneHasTrailingWhitespaceAndOtherDoesNot() {
val str1 = "hello"
val str2 = "HELLO "
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenBothHaveIdenticalWhitespacePaddingDifferentCase() {
val str1 = " hello "
val str2 = " HELLO "
assertTrue(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenMixedWhitespaceCharacters() {
val str1 = "\t"
val str2 = "\n"
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenOneIsNullAndOtherIsEmpty() {
val str1: String? = null
val str2 = ""
assertFalse(str1.isNotBlankAndEquals(str2))
}
@Test
fun testIsNotBlankAndEqualsWhenGivenOneIsNullAndOtherIsWhitespace() {
val str1: String? = null
val str2 = " "
assertFalse(str1.isNotBlankAndEquals(str2))
}
}
@@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2022 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
@@ -10,115 +11,70 @@ package com.nextcloud.ui
import android.graphics.BitmapFactory
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.utils.BitmapUtils
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class BitmapIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
private val testClassName = "com.nextcloud.ui.BitmapIT"
@Test
@ScreenshotTest
fun roundBitmap() {
val file = getFile("christine.jpg")
val bitmap = BitmapFactory.decodeFile(file.absolutePath)
val activity = testActivityRule.launchActivity(null)
val imageView = ImageView(activity).apply {
setImageBitmap(bitmap)
}
val bitmap2 = BitmapFactory.decodeFile(file.absolutePath)
val imageView2 = ImageView(activity).apply {
setImageBitmap(BitmapUtils.roundBitmap(bitmap2))
}
val linearLayout = LinearLayout(activity).apply {
orientation = LinearLayout.VERTICAL
setBackgroundColor(context.getColor(R.color.grey_200))
}
linearLayout.addView(imageView, 200, 200)
linearLayout.addView(imageView2, 200, 200)
activity.addView(linearLayout)
screenshot(activity)
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
// @Test
// @ScreenshotTest
// fun glideSVG() {
// val activity = testActivityRule.launchActivity(null)
// val accountProvider = UserAccountManagerImpl.fromContext(activity)
// val clientFactory = ClientFactoryImpl(activity)
//
// val linearLayout = LinearLayout(activity).apply {
// orientation = LinearLayout.VERTICAL
// setBackgroundColor(context.getColor(R.color.grey_200))
// }
//
// val file = getFile("christine.jpg")
// val bitmap = BitmapFactory.decodeFile(file.absolutePath)
//
// ImageView(activity).apply {
// setImageBitmap(bitmap)
// linearLayout.addView(this, 50, 50)
// }
//
// downloadIcon(
// client.baseUri.toString() + "/apps/files/img/app.svg",
// activity,
// linearLayout,
// accountProvider,
// clientFactory
// )
//
// downloadIcon(
// client.baseUri.toString() + "/core/img/actions/group.svg",
// activity,
// linearLayout,
// accountProvider,
// clientFactory
// )
//
// activity.addView(linearLayout)
//
// longSleep()
//
// screenshot(activity)
// }
//
// private fun downloadIcon(
// url: String,
// activity: TestActivity,
// linearLayout: LinearLayout,
// accountProvider: UserAccountManager,
// clientFactory: ClientFactory
// ) {
// val view = ImageView(activity).apply {
// linearLayout.addView(this, 50, 50)
// }
// val target = object : SimpleTarget<Drawable>() {
// override fun onResourceReady(resource: Drawable?, glideAnimation: GlideAnimation<in Drawable>?) {
// view.setColorFilter(targetContext.getColor(R.color.dark), PorterDuff.Mode.SRC_ATOP)
// view.setImageDrawable(resource)
// }
// }
//
// testActivityRule.runOnUiThread {
// DisplayUtils.downloadIcon(
// accountProvider,
// clientFactory,
// activity,
// url,
// target,
// R.drawable.ic_user
// )
// }
// }
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun roundBitmap() {
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val file = getFile("christine.jpg")
val bitmap = BitmapFactory.decodeFile(file.absolutePath)
val imageView = ImageView(activity).apply {
setImageBitmap(bitmap)
}
val bitmap2 = BitmapFactory.decodeFile(file.absolutePath)
val imageView2 = ImageView(activity).apply {
setImageBitmap(BitmapUtils.roundBitmap(bitmap2))
}
val linearLayout = LinearLayout(activity).apply {
orientation = LinearLayout.VERTICAL
setBackgroundColor(context.getColor(R.color.grey_200))
}
linearLayout.addView(imageView, 200, 200)
linearLayout.addView(imageView2, 200, 200)
activity.addView(linearLayout)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "roundBitmap", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(activity, screenShotName)
}
}
}
}
}
@@ -0,0 +1,56 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.ui
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.users.Status
import com.owncloud.android.lib.resources.users.StatusType
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.utils.EspressoIdlingResource
import org.junit.After
import org.junit.Before
import org.junit.Test
class SetOnlineStatusBottomSheetIT : AbstractIT() {
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
fun open() {
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = SetOnlineStatusBottomSheet(
Status(StatusType.DND, "Working hard…", "🤖", -1)
)
sut.show(activity.supportFragmentManager, "")
EspressoIdlingResource.decrement()
onView(isRoot()).check(matches(isDisplayed()))
}
}
}
}
}
@@ -1,45 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.ui
import androidx.test.espresso.intent.rule.IntentsTestRule
import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.users.ClearAt
import com.owncloud.android.lib.resources.users.PredefinedStatus
import com.owncloud.android.lib.resources.users.Status
import com.owncloud.android.lib.resources.users.StatusType
import com.owncloud.android.ui.activity.FileDisplayActivity
import org.junit.Rule
import org.junit.Test
class SetStatusDialogFragmentIT : AbstractIT() {
@get:Rule
var activityRule = IntentsTestRule(FileDisplayActivity::class.java, true, false)
@Test
fun open() {
val sut = SetStatusDialogFragment.newInstance(user, Status(StatusType.DND, "Working hard…", "🤖", -1))
val activity = activityRule.launchActivity(null)
sut.show(activity.supportFragmentManager, "")
val predefinedStatus: ArrayList<PredefinedStatus> = arrayListOf(
PredefinedStatus("meeting", "📅", "In a meeting", ClearAt("period", "3600")),
PredefinedStatus("commuting", "🚌", "Commuting", ClearAt("period", "1800")),
PredefinedStatus("remote-work", "🏡", "Working remotely", ClearAt("end-of", "day")),
PredefinedStatus("sick-leave", "🤒", "Out sick", ClearAt("end-of", "day")),
PredefinedStatus("vacationing", "🌴", "Vacationing", null)
)
shortSleep()
activity.runOnUiThread { sut.setPredefinedStatus(predefinedStatus) }
longSleep()
}
}
@@ -0,0 +1,68 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.ui
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.users.ClearAt
import com.owncloud.android.lib.resources.users.PredefinedStatus
import com.owncloud.android.lib.resources.users.Status
import com.owncloud.android.lib.resources.users.StatusType
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.utils.EspressoIdlingResource
import org.junit.After
import org.junit.Before
import org.junit.Test
class SetStatusMessageBottomSheetIT : AbstractIT() {
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
fun open() {
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = SetStatusMessageBottomSheet(
user,
Status(StatusType.DND, "Working hard…", "🤖", -1)
)
sut.show(activity.supportFragmentManager, "")
val predefinedStatus: ArrayList<PredefinedStatus> = arrayListOf(
PredefinedStatus("meeting", "📅", "In a meeting", ClearAt("period", "3600")),
PredefinedStatus("commuting", "🚌", "Commuting", ClearAt("period", "1800")),
PredefinedStatus("be-right-back", "⏳", "Be right back", ClearAt("period", "900")),
PredefinedStatus("remote-work", "🏡", "Working remotely", ClearAt("end-of", "day")),
PredefinedStatus("sick-leave", "🤒", "Out sick", ClearAt("end-of", "day")),
PredefinedStatus("vacationing", "🌴", "Vacationing", null)
)
sut.setPredefinedStatus(predefinedStatus)
EspressoIdlingResource.decrement()
onView(isRoot()).check(matches(isDisplayed()))
}
}
}
}
}
@@ -230,4 +230,12 @@ class AutoRenameTests : AbstractOnServerIT() {
val expectedFilename = "readme.txt"
assert(result == expectedFilename) { "Expected $expectedFilename but got $result" }
}
@Test
fun testFolderNameLowercase() {
val filename = "Foo.Bar.Baz"
val result = AutoRename.rename(filename, capability, isFolderPath = true)
val expectedFilename = "Foo.Bar.Baz"
assert(result == expectedFilename) { "Expected $expectedFilename but got $result" }
}
}
@@ -0,0 +1,204 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.utils
import junit.framework.TestCase.assertEquals
import junit.framework.TestCase.assertTrue
import org.junit.After
import org.junit.Before
import org.junit.Test
import java.io.File
import java.nio.file.Files
@Suppress("TooManyFunctions")
class FileHelperTest {
private lateinit var testDirectory: File
@Before
fun setup() {
testDirectory = Files.createTempDirectory("test").toFile()
}
@After
fun tearDown() {
testDirectory.deleteRecursively()
}
@Test
fun testListDirectoryEntriesWhenGivenNullDirectoryShouldReturnEmptyList() {
val result = FileHelper.listDirectoryEntries(null, 0, 10, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenGivenNonExistentDirectoryShouldReturnEmptyList() {
val nonExistent = File(testDirectory, "does_not_exist")
val result = FileHelper.listDirectoryEntries(nonExistent, 0, 10, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenGivenFileInsteadOfDirectoryShouldReturnEmptyList() {
val file = File(testDirectory, "test.txt")
file.createNewFile()
val result = FileHelper.listDirectoryEntries(file, 0, 10, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenGivenEmptyDirectoryShouldReturnEmptyList() {
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 10, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenFetchingFoldersShouldReturnOnlyFolders() {
File(testDirectory, "folder1").mkdir()
File(testDirectory, "folder2").mkdir()
File(testDirectory, "file1.txt").createNewFile()
File(testDirectory, "file2.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 10, true)
assertEquals(2, result.size)
assertTrue(result.all { it.isDirectory })
}
@Test
fun testListDirectoryEntriesWhenFetchingFilesShouldReturnOnlyFiles() {
File(testDirectory, "folder1").mkdir()
File(testDirectory, "folder2").mkdir()
File(testDirectory, "file1.txt").createNewFile()
File(testDirectory, "file2.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 10, false)
assertEquals(2, result.size)
assertTrue(result.all { it.isFile })
}
@Test
fun testListDirectoryEntriesWhenStartIndexProvidedShouldSkipCorrectNumberOfItems() {
for (i in 1..5) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 2, 10, false)
assertEquals(3, result.size)
}
@Test
fun testListDirectoryEntriesWhenMaxItemsProvidedShouldLimitResults() {
for (i in 1..10) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 5, false)
assertEquals(5, result.size)
}
@Test
fun testListDirectoryEntriesWhenGivenStartIndexAndMaxItemsShouldReturnCorrectSubset() {
for (i in 1..10) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 3, 4, false)
assertEquals(4, result.size)
}
@Test
fun testListDirectoryEntriesWhenStartIndexBeyondAvailableShouldReturnEmptyList() {
for (i in 1..3) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 10, 5, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenMaxItemsBeyondAvailableShouldReturnAllItems() {
for (i in 1..3) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 100, false)
assertEquals(3, result.size)
}
@Test
fun testListDirectoryEntriesWhenFetchingFoldersWithOffsetShouldSkipCorrectly() {
for (i in 1..5) File(testDirectory, "folder$i").mkdir()
for (i in 1..3) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 2, 10, true)
assertEquals(3, result.size)
assertTrue(result.all { it.isDirectory })
}
@Test
fun testListDirectoryEntriesWhenFetchingFilesWithOffsetShouldSkipCorrectly() {
for (i in 1..3) File(testDirectory, "folder$i").mkdir()
for (i in 1..5) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 2, 10, false)
assertEquals(3, result.size)
assertTrue(result.all { it.isFile })
}
@Test
fun testListDirectoryEntriesWhenGivenOnlyFoldersAndFetchingFilesShouldReturnEmptyList() {
for (i in 1..5) File(testDirectory, "folder$i").mkdir()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 10, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenGivenOnlyFilesAndFetchingFoldersShouldReturnEmptyList() {
for (i in 1..5) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 10, true)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenMaxItemsIsZeroShouldReturnEmptyList() {
for (i in 1..5) File(testDirectory, "file$i.txt").createNewFile()
val result = FileHelper.listDirectoryEntries(testDirectory, 0, 0, false)
assertTrue(result.isEmpty())
}
@Test
fun testListDirectoryEntriesWhenGivenMixedContentShouldFilterCorrectly() {
for (i in 1..3) File(testDirectory, "folder$i").mkdir()
for (i in 1..7) File(testDirectory, "file$i.txt").createNewFile()
val folders = FileHelper.listDirectoryEntries(testDirectory, 0, 10, true)
val files = FileHelper.listDirectoryEntries(testDirectory, 0, 10, false)
assertEquals(3, folders.size)
assertEquals(7, files.size)
assertTrue(folders.all { it.isDirectory })
assertTrue(files.all { it.isFile })
}
@Test
fun testListDirectoryEntriesWhenPaginatingFoldersShouldWorkCorrectly() {
for (i in 1..10) File(testDirectory, "folder$i").mkdir()
val page1 = FileHelper.listDirectoryEntries(testDirectory, 0, 3, true)
val page2 = FileHelper.listDirectoryEntries(testDirectory, 3, 3, true)
val page3 = FileHelper.listDirectoryEntries(testDirectory, 6, 3, true)
val page4 = FileHelper.listDirectoryEntries(testDirectory, 9, 3, true)
assertEquals(3, page1.size)
assertEquals(3, page2.size)
assertEquals(3, page3.size)
assertEquals(1, page4.size)
}
@Test
fun testListDirectoryEntriesWhenPaginatingFilesShouldWorkCorrectly() {
for (i in 1..10) File(testDirectory, "file$i.txt").createNewFile()
val page1 = FileHelper.listDirectoryEntries(testDirectory, 0, 4, false)
val page2 = FileHelper.listDirectoryEntries(testDirectory, 4, 4, false)
val page3 = FileHelper.listDirectoryEntries(testDirectory, 8, 4, false)
assertEquals(4, page1.size)
assertEquals(4, page2.size)
assertEquals(2, page3.size)
}
}
@@ -97,6 +97,12 @@ class FileNameValidatorTests : AbstractOnServerIT() {
assertEquals(targetContext.getString(R.string.filename_empty), result)
}
@Test
fun testBlankFileName() {
val result = FileNameValidator.checkFileName(" ", capability, targetContext)
assertEquals(targetContext.getString(R.string.filename_empty), result)
}
@Test
fun testFileAlreadyExists() {
val existingFiles = setOf("existingFile")
@@ -22,6 +22,8 @@ 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;
@@ -53,6 +55,7 @@ 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 com.owncloud.android.utils.theme.MaterialSchemesProvider;
import org.apache.commons.io.FileUtils;
import org.junit.After;
@@ -293,7 +296,7 @@ public abstract class AbstractIT {
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
}
protected void onIdleSync(Runnable recipient) {
public void onIdleSync(Runnable recipient) {
InstrumentationRegistry.getInstrumentation().waitForIdle(recipient);
}
@@ -397,11 +400,6 @@ public abstract class AbstractIT {
public boolean isPowerSavingEnabled() {
return false;
}
@Override
public boolean isPowerSavingExclusionAvailable() {
return false;
}
};
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
@@ -452,7 +450,7 @@ public abstract class AbstractIT {
screenshot(view, "");
}
protected void screenshotViaName(Activity activity, String name) {
public void screenshotViaName(Activity activity, String name) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
Screenshot.snapActivity(activity).setName(name).record();
}
@@ -542,4 +540,38 @@ public abstract class AbstractIT {
protected static boolean removeAccount(Account account) {
return AccountManager.get(targetContext).removeAccountExplicitly(account);
}
protected MaterialSchemesProvider getMaterialSchemesProvider() {
return new MaterialSchemesProvider() {
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForUser(@NonNull User user) {
return null;
}
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForCapability(@NonNull OCCapability capability) {
return null;
}
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForCurrentUser() {
return new MaterialSchemesImpl(R.color.primary, false);
}
@NonNull
@Override
public MaterialSchemes getDefaultMaterialSchemes() {
return null;
}
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForPrimaryBackground() {
return null;
}
};
}
}
@@ -173,9 +173,7 @@ public abstract class AbstractOnServerIT extends AbstractIT {
Assert.fail("Server not ready!");
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
@@ -218,11 +216,6 @@ public abstract class AbstractOnServerIT extends AbstractIT {
public boolean isPowerSavingEnabled() {
return false;
}
@Override
public boolean isPowerSavingExclusionAvailable() {
return false;
}
};
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
@@ -82,12 +82,6 @@ public class UploadIT extends AbstractOnServerIT {
public boolean isPowerSavingEnabled() {
return false;
}
@Override
public boolean isPowerSavingExclusionAvailable() {
return false;
}
@NonNull
@Override
public BatteryStatus getBattery() {
@@ -237,11 +231,6 @@ public class UploadIT extends AbstractOnServerIT {
return false;
}
@Override
public boolean isPowerSavingExclusionAvailable() {
return false;
}
@NonNull
@Override
public BatteryStatus getBattery() {
@@ -43,7 +43,6 @@ class ContentResolverHelperIT {
}
@Test
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
fun contentResolver_onAndroid26_usesNewAPI() {
ContentResolverHelper
.queryResolver(resolver, URI, PROJECTION, SELECTION, null, SORT_COLUMN, SORT_DIRECTION, LIMIT)
@@ -18,6 +18,7 @@ import com.nextcloud.client.account.CurrentAccountProvider;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.nextcloud.client.database.entity.UploadEntityKt;
import com.nextcloud.test.RandomStringGenerator;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.MainApp;
@@ -108,7 +109,7 @@ public class UploadStorageManagerTest extends AbstractIT {
OCUpload upload = createUpload(account);
uploads.add(upload);
uploadsStorageManager.storeUpload(upload);
uploadsStorageManager.uploadDao.insertOrReplace(UploadEntityKt.toUploadEntity(upload));
}
OCUpload[] storedUploads = uploadsStorageManager.getAllStoredUploads();
@@ -151,17 +152,14 @@ public class UploadStorageManagerTest extends AbstractIT {
account.name);
corruptUpload.setLocalPath(null);
uploadsStorageManager.storeUpload(corruptUpload);
uploadsStorageManager.uploadDao.insertOrReplace(UploadEntityKt.toUploadEntity(corruptUpload));
uploadsStorageManager.getAllStoredUploads();
}
@Test
public void getById() {
OCUpload upload = createUpload(account);
long id = uploadsStorageManager.storeUpload(upload);
long id = uploadsStorageManager.uploadDao.insertOrReplace(UploadEntityKt.toUploadEntity(upload));
OCUpload newUpload = uploadsStorageManager.getUploadById(id);
assertNotNull(newUpload);
@@ -178,7 +176,7 @@ public class UploadStorageManagerTest extends AbstractIT {
private void insertUploads(Account account, int rowsToInsert) {
for (int i = 0; i < rowsToInsert; i++) {
uploadsStorageManager.storeUpload(createUpload(account));
uploadsStorageManager.uploadDao.insertOrReplace(UploadEntityKt.toUploadEntity(createUpload(account)));
}
}
@@ -0,0 +1,39 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.extensions
import android.app.Activity
import android.content.Intent
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
inline fun <reified T : Activity> AbstractIT.launchAndCapture(
testClassName: String,
actionName: String,
intent: Intent? = null,
crossinline before: (T) -> Unit
) {
launchActivity<T>(intent).use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
before(activity)
EspressoIdlingResource.decrement()
val screenshotName = createName(testClassName + "_" + actionName, "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(activity, screenshotName)
}
}
}
}
@@ -46,9 +46,6 @@ abstract class FileUploaderIT : AbstractOnServerIT() {
override val isPowerSavingEnabled: Boolean
get() = false
override val isPowerSavingExclusionAvailable: Boolean
get() = false
override val battery: BatteryStatus
get() = BatteryStatus()
}
@@ -178,10 +178,10 @@ object DocumentsProviderUtils {
@Suppress("EXPERIMENTAL_API_USAGE")
@VisibleForTesting
internal suspend fun getLoadedCursor(timeout: Long = 15_000, query: () -> Cursor?) = withTimeout(timeout) {
suspendCancellableCoroutine<Cursor> { cont ->
suspendCancellableCoroutine { cont ->
val cursor = query() ?: throw IOException("Initial query returned no results")
cont.invokeOnCancellation { cursor.close() }
val loading = cursor.extras.getBoolean(EXTRA_LOADING, false)
val loading = cursor.extras?.getBoolean(EXTRA_LOADING, false) ?: false
if (loading) {
Log_OC.e("TEST", "Cursor was loading, wait for update...")
cursor.registerContentObserver(
@@ -53,6 +53,14 @@ class DocumentsStorageProviderIT : AbstractOnServerIT() {
// DocumentsProvider#onCreate() is called when the application is started
// which is *after* AbstractOnServerIT adds the accounts (when the app is freshly installed).
// So we need to query our roots here to ensure that the internal storage map is initialized.
storageManager.run {
val updatedRootPath = getFileByEncryptedRemotePath(ROOT_PATH).apply {
permissions = "RSMCKGWDNV"
}
saveFile(updatedRootPath)
}
contentResolver.query(DocumentsContract.buildRootsUri(authority), null, null, null)
assertTrue("Storage root does not exist", rootDir.exists())
assertTrue(rootDir.isDirectory)
@@ -1,32 +1,32 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.providers
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
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.TestActivity
import com.owncloud.android.AbstractOnServerIT
import org.junit.Rule
import org.junit.Test
class UsersAndGroupsSearchProviderIT : AbstractOnServerIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
@Test
@UiThread
fun searchUser() {
val activity = testActivityRule.launchActivity(null)
shortSleep()
activity.runOnUiThread {
// fragment.search("Admin")
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
onView(isRoot()).check(matches(isDisplayed()))
}
}
}
longSleep()
}
}
@@ -1,327 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity;
import android.content.Intent;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.nextcloud.utils.extensions.FileDataStorageManagerExtensionsKt;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.ui.dialog.ConflictsResolveDialog;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import java.util.Objects;
import androidx.fragment.app.DialogFragment;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
public class ConflictsResolveActivityIT extends AbstractIT {
@Rule public IntentsTestRule<ConflictsResolveActivity> activityRule =
new IntentsTestRule<>(ConflictsResolveActivity.class, true, false);
private boolean returnCode;
@Test
@ScreenshotTest
public void screenshotTextFiles() {
OCFile newFile = new OCFile("/newFile.txt");
newFile.setRemoteId("0001");
newFile.setFileLength(56000);
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
OCFile existingFile = new OCFile("/newFile.txt");
existingFile.setRemoteId("0002");
existingFile.setFileLength(1024000);
existingFile.setModificationTimestamp(1582019340);
FileDataStorageManager storageManager = new FileDataStorageManager(user, targetContext.getContentResolver());
storageManager.saveNewFile(existingFile);
Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
ConflictsResolveActivity sut = activityRule.launchActivity(intent);
ConflictsResolveDialog dialog = ConflictsResolveDialog.newInstance(
FileDataStorageManagerExtensionsKt.getDecryptedPath(storageManager, existingFile),
targetContext,
newFile,
existingFile,
UserAccountManagerImpl
.fromContext(targetContext)
.getUser());
dialog.showDialog(sut);
getInstrumentation().waitForIdleSync();
shortSleep();
shortSleep();
shortSleep();
shortSleep();
screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
}
// @Test
// @ScreenshotTest // todo run without real server
// public void screenshotImages() throws IOException {
// FileDataStorageManager storageManager = new FileDataStorageManager(user,
// targetContext.getContentResolver());
//
// OCFile newFile = new OCFile("/newFile.txt");
// newFile.setFileLength(56000);
// newFile.setModificationTimestamp(1522019340);
// newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
//
// File image = getFile("image.jpg");
//
// assertTrue(new UploadFileRemoteOperation(image.getAbsolutePath(),
// "/image.jpg",
// "image/jpg",
// "10000000").execute(client).isSuccess());
//
// assertTrue(new RefreshFolderOperation(storageManager.getFileByPath("/"),
// System.currentTimeMillis(),
// false,
// true,
// storageManager,
// user.toPlatformAccount(),
// targetContext
// ).execute(client).isSuccess());
//
// OCFile existingFile = storageManager.getFileByPath("/image.jpg");
//
// Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
// intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
// intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
//
// ConflictsResolveActivity sut = activityRule.launchActivity(intent);
//
// ConflictsResolveDialog.OnConflictDecisionMadeListener listener = decision -> {
//
// };
//
// ConflictsResolveDialog dialog = ConflictsResolveDialog.newInstance(existingFile,
// newFile,
// UserAccountManagerImpl
// .fromContext(targetContext)
// .getUser()
// );
// dialog.showDialog(sut);
// dialog.listener = listener;
//
// getInstrumentation().waitForIdleSync();
// shortSleep();
//
// screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
// }
@Test
public void cancel() {
returnCode = false;
OCUpload newUpload = new OCUpload(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt",
"/newFile.txt",
user.getAccountName());
OCFile existingFile = new OCFile("/newFile.txt");
existingFile.setFileLength(1024000);
existingFile.setModificationTimestamp(1582019340);
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
FileDataStorageManager storageManager = new FileDataStorageManager(user, targetContext.getContentResolver());
storageManager.saveNewFile(existingFile);
Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.getUploadId());
ConflictsResolveActivity sut = activityRule.launchActivity(intent);
sut.listener = decision -> {
assertEquals(ConflictsResolveDialog.Decision.CANCEL, decision);
returnCode = true;
};
getInstrumentation().waitForIdleSync();
shortSleep();
onView(withText("Cancel")).perform(click());
assertTrue(returnCode);
}
@Test
@ScreenshotTest
public void keepExisting() {
returnCode = false;
OCUpload newUpload = new OCUpload(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt",
"/newFile.txt",
user.getAccountName());
OCFile existingFile = new OCFile("/newFile.txt");
existingFile.setRemoteId("0001");
existingFile.setFileLength(1024000);
existingFile.setModificationTimestamp(1582019340);
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
newFile.setRemoteId("0002");
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
FileDataStorageManager storageManager = new FileDataStorageManager(user, targetContext.getContentResolver());
storageManager.saveNewFile(existingFile);
Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.getUploadId());
ConflictsResolveActivity sut = activityRule.launchActivity(intent);
sut.listener = decision -> {
assertEquals(ConflictsResolveDialog.Decision.KEEP_SERVER, decision);
returnCode = true;
};
getInstrumentation().waitForIdleSync();
onView(withId(R.id.right_checkbox)).perform(click());
DialogFragment dialog = (DialogFragment) sut.getSupportFragmentManager().findFragmentByTag("conflictDialog");
screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
onView(withText("OK")).perform(click());
assertTrue(returnCode);
}
@Test
@ScreenshotTest
public void keepNew() {
returnCode = false;
OCUpload newUpload = new OCUpload(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt",
"/newFile.txt",
user.getAccountName());
OCFile existingFile = new OCFile("/newFile.txt");
existingFile.setFileLength(1024000);
existingFile.setModificationTimestamp(1582019340);
existingFile.setRemoteId("00000123abc");
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
FileDataStorageManager storageManager = new FileDataStorageManager(user, targetContext.getContentResolver());
storageManager.saveNewFile(existingFile);
Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.getUploadId());
ConflictsResolveActivity sut = activityRule.launchActivity(intent);
sut.listener = decision -> {
assertEquals(ConflictsResolveDialog.Decision.KEEP_LOCAL, decision);
returnCode = true;
};
getInstrumentation().waitForIdleSync();
onView(withId(R.id.left_checkbox)).perform(click());
DialogFragment dialog = (DialogFragment) sut.getSupportFragmentManager().findFragmentByTag("conflictDialog");
screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
onView(withText("OK")).perform(click());
assertTrue(returnCode);
}
@Test
@ScreenshotTest
public void keepBoth() {
returnCode = false;
OCUpload newUpload = new OCUpload(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt",
"/newFile.txt",
user.getAccountName());
OCFile existingFile = new OCFile("/newFile.txt");
existingFile.setRemoteId("0001");
existingFile.setFileLength(1024000);
existingFile.setModificationTimestamp(1582019340);
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
newFile.setRemoteId("0002");
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
FileDataStorageManager storageManager = new FileDataStorageManager(user, targetContext.getContentResolver());
storageManager.saveNewFile(existingFile);
Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.getUploadId());
ConflictsResolveActivity sut = activityRule.launchActivity(intent);
sut.listener = decision -> {
assertEquals(ConflictsResolveDialog.Decision.KEEP_BOTH, decision);
returnCode = true;
};
getInstrumentation().waitForIdleSync();
onView(withId(R.id.right_checkbox)).perform(click());
onView(withId(R.id.left_checkbox)).perform(click());
DialogFragment dialog = (DialogFragment) sut.getSupportFragmentManager().findFragmentByTag("conflictDialog");
screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
onView(withText("OK")).perform(click());
assertTrue(returnCode);
}
@After
public void after() {
getStorageManager().deleteAllFiles();
}
}
@@ -0,0 +1,326 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity
import android.content.Intent
import androidx.annotation.UiThread
import androidx.fragment.app.DialogFragment
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.utils.extensions.getDecryptedPath
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.datamodel.FileDataStorageManager
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.db.OCUpload
import com.owncloud.android.ui.dialog.ConflictsResolveDialog.Companion.newInstance
import com.owncloud.android.ui.dialog.ConflictsResolveDialog.Decision
import com.owncloud.android.ui.dialog.ConflictsResolveDialog.OnConflictDecisionMadeListener
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.FileStorageUtils
import com.owncloud.android.utils.ScreenshotTest
import junit.framework.TestCase
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
class ConflictsResolveActivityIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.activity.ConflictsResolveActivityIT"
private var returnCode = false
@Test
@UiThread
@ScreenshotTest
fun screenshotTextFiles() {
val newFile = OCFile("/newFile.txt").apply {
remoteId = "0001"
fileLength = 56000
modificationTimestamp = 1522019340
setStoragePath(FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt")
}
val existingFile = OCFile("/newFile.txt").apply {
remoteId = "0002"
fileLength = 1024000
modificationTimestamp = 1582019340
}
val storageManager = FileDataStorageManager(user, targetContext.contentResolver)
storageManager.saveNewFile(existingFile)
val intent = Intent(targetContext, ConflictsResolveActivity::class.java).apply {
putExtra(FileActivity.EXTRA_FILE, newFile)
putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile)
}
launchActivity<ConflictsResolveActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val dialog = newInstance(
storageManager.getDecryptedPath(existingFile),
targetContext,
newFile,
existingFile,
UserAccountManagerImpl
.fromContext(targetContext)
.getUser()
)
dialog.showDialog(sut)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "screenshotTextFiles", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(dialog.requireDialog().window?.decorView, screenShotName)
}
}
}
}
@Test
@UiThread
fun cancel() {
val newUpload = OCUpload(
FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt",
"/newFile.txt",
user.accountName
)
val existingFile = OCFile("/newFile.txt").apply {
fileLength = 1024000
modificationTimestamp = 1582019340
}
val newFile = OCFile("/newFile.txt").apply {
fileLength = 56000
modificationTimestamp = 1522019340
setStoragePath(FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt")
}
EspressoIdlingResource.increment()
FileDataStorageManager(user, targetContext.contentResolver).run {
saveNewFile(existingFile)
}
EspressoIdlingResource.decrement()
val intent = Intent(targetContext, ConflictsResolveActivity::class.java).apply {
putExtra(FileActivity.EXTRA_FILE, newFile)
putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile)
putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.uploadId)
}
launchActivity<ConflictsResolveActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
returnCode = false
sut.listener = OnConflictDecisionMadeListener { decision: Decision? ->
assertEquals(decision, Decision.CANCEL)
returnCode = true
}
EspressoIdlingResource.decrement()
onView(ViewMatchers.withText("Cancel")).perform(ViewActions.click())
TestCase.assertTrue(returnCode)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun keepExisting() {
returnCode = false
val newUpload = OCUpload(
FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt",
"/newFile.txt",
user.accountName
)
val existingFile = OCFile("/newFile.txt").apply {
remoteId = "0001"
fileLength = 1024000
modificationTimestamp = 1582019340
}
val newFile = OCFile("/newFile.txt").apply {
fileLength = 56000
remoteId = "0002"
modificationTimestamp = 1522019340
setStoragePath(FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt")
}
EspressoIdlingResource.increment()
FileDataStorageManager(user, targetContext.contentResolver).run {
saveNewFile(existingFile)
}
EspressoIdlingResource.decrement()
val intent = Intent(targetContext, ConflictsResolveActivity::class.java).apply {
putExtra(FileActivity.EXTRA_FILE, newFile)
putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile)
putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.uploadId)
}
launchActivity<ConflictsResolveActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.listener = OnConflictDecisionMadeListener { decision: Decision? ->
assertEquals(decision, Decision.KEEP_SERVER)
returnCode = true
}
EspressoIdlingResource.decrement()
onView(ViewMatchers.withId(R.id.right_checkbox)).perform(ViewActions.click())
val dialog = sut.supportFragmentManager.findFragmentByTag("conflictDialog") as DialogFragment?
val screenShotName = createName(testClassName + "_" + "keepExisting", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(dialog?.requireDialog()?.window?.decorView, screenShotName)
onView(ViewMatchers.withText("OK")).perform(ViewActions.click())
assertTrue(returnCode)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun keepNew() {
returnCode = false
val newUpload = OCUpload(
FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt",
"/newFile.txt",
user.accountName
)
val existingFile = OCFile("/newFile.txt").apply {
fileLength = 1024000
modificationTimestamp = 1582019340
remoteId = "00000123abc"
}
val newFile = OCFile("/newFile.txt").apply {
fileLength = 56000
modificationTimestamp = 1522019340
setStoragePath(FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt")
}
val storageManager = FileDataStorageManager(user, targetContext.contentResolver)
storageManager.saveNewFile(existingFile)
val intent = Intent(targetContext, ConflictsResolveActivity::class.java)
intent.putExtra(FileActivity.EXTRA_FILE, newFile)
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile)
intent.putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.uploadId)
launchActivity<ConflictsResolveActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.listener = OnConflictDecisionMadeListener { decision: Decision? ->
assertEquals(decision, Decision.KEEP_LOCAL)
returnCode = true
}
EspressoIdlingResource.decrement()
onView(ViewMatchers.withId(R.id.left_checkbox)).perform(ViewActions.click())
val dialog = sut.supportFragmentManager.findFragmentByTag("conflictDialog") as DialogFragment?
val screenShotName = createName(testClassName + "_" + "keepNew", "")
screenshotViaName(dialog?.requireDialog()?.window?.decorView, screenShotName)
onView(ViewMatchers.withText("OK")).perform(ViewActions.click())
assertTrue(returnCode)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun keepBoth() {
returnCode = false
val newUpload = OCUpload(
FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt",
"/newFile.txt",
user.accountName
)
val existingFile = OCFile("/newFile.txt").apply {
remoteId = "0001"
fileLength = 1024000
modificationTimestamp = 1582019340
}
val newFile = OCFile("/newFile.txt").apply {
fileLength = 56000
remoteId = "0002"
modificationTimestamp = 1522019340
setStoragePath(FileStorageUtils.getSavePath(user.accountName) + "/nonEmpty.txt")
}
val storageManager = FileDataStorageManager(user, targetContext.contentResolver)
storageManager.saveNewFile(existingFile)
val intent = Intent(targetContext, ConflictsResolveActivity::class.java).apply {
putExtra(FileActivity.EXTRA_FILE, newFile)
putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile)
putExtra(ConflictsResolveActivity.EXTRA_CONFLICT_UPLOAD_ID, newUpload.uploadId)
}
launchActivity<ConflictsResolveActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.listener = OnConflictDecisionMadeListener { decision: Decision? ->
assertEquals(decision, Decision.KEEP_BOTH)
returnCode = true
}
EspressoIdlingResource.decrement()
onView(ViewMatchers.withId(R.id.right_checkbox)).perform(ViewActions.click())
onView(ViewMatchers.withId(R.id.left_checkbox)).perform(ViewActions.click())
onView(ViewMatchers.withId(R.id.left_checkbox)).perform(ViewActions.click())
val dialog = sut.supportFragmentManager.findFragmentByTag("conflictDialog") as DialogFragment?
val screenShotName = createName(testClassName + "_" + "keepBoth", "")
screenshotViaName(dialog?.requireDialog()?.window?.decorView, screenShotName)
onView(ViewMatchers.withText("OK")).perform(ViewActions.click())
assertTrue(returnCode)
}
}
}
}
@After
override fun after() {
storageManager.deleteAllFiles()
}
}
@@ -8,19 +8,37 @@
package com.owncloud.android.ui.activity
import android.content.Intent
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Before
import org.junit.Test
class ContactsPreferenceActivityIT : AbstractIT() {
@get:Rule
var activityRule = IntentsTestRule(ContactsPreferenceActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.activity.ContactsPreferenceActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun openVCF() {
val file = getFile("vcard.vcf")
@@ -29,23 +47,34 @@ class ContactsPreferenceActivityIT : AbstractIT() {
assertTrue(vcfFile.isDown)
val intent = Intent()
intent.putExtra(ContactsPreferenceActivity.EXTRA_FILE, vcfFile)
intent.putExtra(ContactsPreferenceActivity.EXTRA_USER, user)
val sut = activityRule.launchActivity(intent)
val intent = Intent(targetContext, ContactsPreferenceActivity::class.java).apply {
putExtra(ContactsPreferenceActivity.EXTRA_FILE, vcfFile)
putExtra(ContactsPreferenceActivity.EXTRA_USER, user)
}
shortSleep()
screenshot(sut)
launchActivity<ContactsPreferenceActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "openVCF", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun openContactsPreference() {
val sut = activityRule.launchActivity(null)
shortSleep()
screenshot(sut)
launchActivity<ContactsPreferenceActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "openContactsPreference", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -1,112 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity;
import android.accounts.Account;
import android.accounts.AccountManager;
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.test.RetryTestRule;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.anyOf;
import static org.junit.Assert.assertEquals;
public class DrawerActivityIT extends AbstractIT {
@Rule public IntentsTestRule<FileDisplayActivity> activityRule = new IntentsTestRule<>(FileDisplayActivity.class,
true,
false);
@Rule
public final RetryTestRule retryTestRule = new RetryTestRule();
private static Account account1;
private static User user1;
private static Account account2;
private static String account2Name;
private static String account2DisplayName;
@BeforeClass
public static void beforeClass() {
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
Uri baseUrl = Uri.parse(arguments.getString("TEST_SERVER_URL"));
AccountManager platformAccountManager = AccountManager.get(targetContext);
UserAccountManager userAccountManager = UserAccountManagerImpl.fromContext(targetContext);
for (Account account : platformAccountManager.getAccounts()) {
platformAccountManager.removeAccountExplicitly(account);
}
String loginName = "user1";
String password = "user1";
Account temp = new Account(loginName + "@" + baseUrl, MainApp.getAccountType(targetContext));
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
account1 = userAccountManager.getAccountByName(loginName + "@" + baseUrl);
user1 = userAccountManager.getUser(account1.name).orElseThrow(IllegalAccessError::new);
loginName = "user2";
password = "user2";
temp = new Account(loginName + "@" + baseUrl, MainApp.getAccountType(targetContext));
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
account2 = userAccountManager.getAccountByName(loginName + "@" + baseUrl);
account2Name = loginName + "@" + baseUrl;
account2DisplayName = "User Two@" + baseUrl;
}
@Test
public void switchAccountViaAccountList() {
FileDisplayActivity sut = activityRule.launchActivity(null);
sut.setUser(user1);
assertEquals(account1, sut.getUser().get().toPlatformAccount());
onView(withId(R.id.switch_account_button)).perform(click());
onView(anyOf(withText(account2Name), withText(account2DisplayName))).perform(click());
waitForIdleSync();
assertEquals(account2, sut.getUser().get().toPlatformAccount());
onView(withId(R.id.switch_account_button)).perform(click());
onView(withText(account1.name)).perform(click());
}
}
@@ -0,0 +1,128 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity
import android.accounts.Account
import android.accounts.AccountManager
import android.net.Uri
import android.view.View
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.platform.app.InstrumentationRegistry
import com.nextcloud.client.account.User
import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.account.UserAccountManagerImpl
import com.nextcloud.test.RetryTestRule
import com.owncloud.android.AbstractIT
import com.owncloud.android.MainApp
import com.owncloud.android.R
import com.owncloud.android.lib.common.accounts.AccountUtils
import com.owncloud.android.utils.EspressoIdlingResource
import org.hamcrest.Matchers
import org.junit.Assert
import org.junit.BeforeClass
import org.junit.Rule
import org.junit.Test
import java.util.function.Supplier
class DrawerActivityIT : AbstractIT() {
@Rule
@JvmField
val retryTestRule = RetryTestRule()
@Test
@UiThread
fun switchAccountViaAccountList() {
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.setUser(user1)
Assert.assertEquals(account1, sut.user.get().toPlatformAccount())
onView(ViewMatchers.withId(R.id.switch_account_button)).perform(ViewActions.click())
onView(
Matchers.anyOf<View?>(
ViewMatchers.withText(account2Name),
ViewMatchers.withText(
account2DisplayName
)
)
).perform(ViewActions.click())
Assert.assertEquals(account2, sut.user.get().toPlatformAccount())
EspressoIdlingResource.decrement()
onView(ViewMatchers.withId(R.id.switch_account_button)).perform(ViewActions.click())
onView(ViewMatchers.withText(account1?.name)).perform(ViewActions.click())
}
}
}
}
companion object {
private var account1: Account? = null
private var user1: User? = null
private var account2: Account? = null
private var account2Name: String? = null
private var account2DisplayName: String? = null
@JvmStatic
@BeforeClass
fun beforeClass() {
val arguments = InstrumentationRegistry.getArguments()
val baseUrl = Uri.parse(arguments.getString("TEST_SERVER_URL"))
val platformAccountManager = AccountManager.get(targetContext)
val userAccountManager: UserAccountManager = UserAccountManagerImpl.fromContext(targetContext)
for (account in platformAccountManager.accounts) {
platformAccountManager.removeAccountExplicitly(account)
}
var loginName = "user1"
var password = "user1"
var temp = Account("$loginName@$baseUrl", MainApp.getAccountType(targetContext))
platformAccountManager.addAccountExplicitly(temp, password, null)
platformAccountManager.setUserData(
temp,
AccountUtils.Constants.KEY_OC_ACCOUNT_VERSION,
UserAccountManager.ACCOUNT_VERSION.toString()
)
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
account1 = userAccountManager.getAccountByName("$loginName@$baseUrl")
user1 = userAccountManager.getUser(account1!!.name)
.orElseThrow<IllegalAccessError?>(Supplier { IllegalAccessError() })
loginName = "user2"
password = "user2"
temp = Account("$loginName@$baseUrl", MainApp.getAccountType(targetContext))
platformAccountManager.addAccountExplicitly(temp, password, null)
platformAccountManager.setUserData(
temp,
AccountUtils.Constants.KEY_OC_ACCOUNT_VERSION,
UserAccountManager.ACCOUNT_VERSION.toString()
)
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
account2 = userAccountManager.getAccountByName("$loginName@$baseUrl")
account2Name = "$loginName@$baseUrl"
account2DisplayName = "User Two@$baseUrl"
}
}
}
@@ -27,8 +27,8 @@ public class FileDisplayActivityTest extends AbstractIT {
InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
Activity activity =
ActivityLifecycleMonitorRegistry.getInstance().getActivitiesInStage(RESUMED).iterator().next();
if (activity instanceof WhatsNewActivity) {
activity.onBackPressed();
if (activity instanceof WhatsNewActivity whatsNewActivity) {
whatsNewActivity.getOnBackPressedDispatcher().onBackPressed();
}
});
scenario.recreate();
@@ -1,147 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Kilian Périsset <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity;
import android.content.Intent;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;
@RunWith(AndroidJUnit4.class)
//@LargeTest
public class FolderPickerActivityIT extends AbstractIT {
@Rule
public ActivityTestRule<FolderPickerActivity> activityRule =
new ActivityTestRule<>(FolderPickerActivity.class);
@Test
public void getActivityFile() {
// Arrange
FolderPickerActivity targetActivity = activityRule.getActivity();
OCFile origin = new OCFile("/test/file.test");
origin.setRemotePath("/remotePath/test");
// Act
targetActivity.setFile(origin);
OCFile target = targetActivity.getFile();
// Assert
Assert.assertEquals(origin, target);
}
@Test
public void getParentFolder_isNotRootFolder() {
// Arrange
FolderPickerActivity targetActivity = activityRule.getActivity();
OCFile origin = new OCFile("/test/");
origin.setFileId(1);
origin.setRemotePath("/test/");
origin.setStoragePath("/test/");
origin.setFolder();
// Act
targetActivity.setFile(origin);
OCFile target = targetActivity.getCurrentFolder();
// Assert
Assert.assertEquals(origin, target);
}
@Test
public void getParentFolder_isRootFolder() {
// Arrange
FolderPickerActivity targetActivity = activityRule.getActivity();
OCFile origin = new OCFile("/");
origin.setFileId(1);
origin.setRemotePath("/");
origin.setStoragePath("/");
origin.setFolder();
// Act
targetActivity.setFile(origin);
OCFile target = targetActivity.getCurrentFolder();
// Assert
Assert.assertEquals(origin, target);
}
@Test
public void nullFile() {
// Arrange
FolderPickerActivity targetActivity = activityRule.getActivity();
OCFile rootFolder = targetActivity.getStorageManager().getFileByPath(OCFile.ROOT_PATH);
// Act
targetActivity.setFile(null);
OCFile target = targetActivity.getCurrentFolder();
// Assert
Assert.assertEquals(rootFolder, target);
}
@Test
public void getParentFolder() {
// Arrange
FolderPickerActivity targetActivity = activityRule.getActivity();
OCFile origin = new OCFile("/test/file.test");
origin.setRemotePath("/test/file.test");
OCFile target = new OCFile("/test/");
// Act
targetActivity.setFile(origin);
// Assert
Assert.assertEquals(origin, target);
}
@Test
@ScreenshotTest
public void open() {
FolderPickerActivity sut = activityRule.getActivity();
OCFile origin = new OCFile("/test/file.txt");
sut.setFile(origin);
sut.runOnUiThread(() -> {
sut.findViewById(R.id.folder_picker_btn_copy).requestFocus();
});
waitForIdleSync();
screenshot(sut);
}
@Test
@ScreenshotTest
public void testMoveOrCopy() {
Intent intent = new Intent();
FolderPickerActivity targetActivity = activityRule.launchActivity(intent);
waitForIdleSync();
screenshot(targetActivity);
}
@Test
@ScreenshotTest
public void testChooseLocationAction() {
Intent intent = new Intent();
intent.putExtra(FolderPickerActivity.EXTRA_ACTION, FolderPickerActivity.CHOOSE_LOCATION);
FolderPickerActivity targetActivity = activityRule.launchActivity(intent);
waitForIdleSync();
screenshot(targetActivity);
}
}
@@ -0,0 +1,213 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2019 Kilian Périsset <[email protected]>
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity
import android.content.Intent
import android.view.View
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class FolderPickerActivityIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.activity.FolderPickerActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
fun getActivityFile() {
launchActivity<FolderPickerActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val origin = OCFile("/test/file.test").apply {
remotePath = "/remotePath/test"
}
// Act
sut.file = origin
val target = sut.file
// Assert
assertEquals(origin, target)
}
}
}
}
@Test
@UiThread
fun getParentFolder_isNotRootFolder() {
launchActivity<FolderPickerActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
// Arrange
val origin = OCFile("/test/").apply {
fileId = 1
remotePath = "/test/"
setStoragePath("/test/")
setFolder()
}
// Act
sut.file = origin
val target = sut.currentFolder
// Assert
assertEquals(origin, target)
}
}
}
}
@Test
@UiThread
fun getParentFolder_isRootFolder() {
launchActivity<FolderPickerActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
// Arrange
val origin = OCFile("/").apply {
fileId = 1
remotePath = "/"
setStoragePath("/")
setFolder()
}
// Act
sut.file = origin
val target = sut.currentFolder
// Assert
assertEquals(origin, target)
}
}
}
}
@Suppress("DEPRECATION")
@Test
@UiThread
fun nullFile() {
launchActivity<FolderPickerActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
// Arrange
val rootFolder = sut.storageManager.getFileByPath(OCFile.ROOT_PATH)
// Act
sut.file = null
val target = sut.currentFolder
// Assert
assertEquals(rootFolder, target)
}
}
}
}
@Test
@UiThread
fun getParentFolder() {
launchActivity<FolderPickerActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
// Arrange
val origin = OCFile("/test/file.test").apply {
remotePath = "/test/file.test"
}
val target = OCFile("/test/")
// Act
sut.file = origin
// Assert
assertEquals(origin, target)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun open() {
launchActivity<FolderPickerActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val origin = OCFile("/test/file.txt")
sut.file = origin
sut.findViewById<View>(R.id.folder_picker_btn_copy).requestFocus()
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testMoveOrCopy() {
val intent = Intent(targetContext, FolderPickerActivity::class.java)
launchActivity<FolderPickerActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "testMoveOrCopy", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testChooseLocationAction() {
val intent = Intent(targetContext, FolderPickerActivity::class.java).apply {
putExtra(FolderPickerActivity.EXTRA_ACTION, FolderPickerActivity.CHOOSE_LOCATION)
}
launchActivity<FolderPickerActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "testChooseLocationAction", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -1,66 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity;
import android.app.Activity;
import com.nextcloud.client.account.User;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.lib.common.Quota;
import com.owncloud.android.lib.common.UserInfo;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import java.util.ArrayList;
import androidx.test.espresso.intent.rule.IntentsTestRule;
public class ManageAccountsActivityIT extends AbstractIT {
@Rule
public IntentsTestRule<ManageAccountsActivity> activityRule = new IntentsTestRule<>(ManageAccountsActivity.class,
true,
false);
@Test
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
shortSleep();
screenshot(sut);
}
@Test
@ScreenshotTest
public void userInfoDetail() {
ManageAccountsActivity sut = activityRule.launchActivity(null);
User user = sut.accountManager.getUser();
UserInfo userInfo = new UserInfo("test",
true,
"Test User",
"[email protected]",
"+49 123 456",
"Address 123, Berlin",
"https://www.nextcloud.com",
"https://twitter.com/Nextclouders",
new Quota(),
new ArrayList<>());
sut.showUser(user, userInfo);
shortSleep();
shortSleep();
screenshot(getCurrentActivity());
}
}
@@ -0,0 +1,89 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.common.Quota
import com.owncloud.android.lib.common.UserInfo
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Test
class ManageAccountsActivityIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.activity.ManageAccountsActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun open() {
launchActivity<ManageAccountsActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun userInfoDetail() {
launchActivity<ManageAccountsActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val user = sut.accountManager.user
val userInfo = UserInfo(
"test",
true,
"Test User",
"[email protected]",
"+49 123 456",
"Address 123, Berlin",
"https://www.nextcloud.com",
"https://twitter.com/Nextclouders",
Quota(),
ArrayList()
)
EspressoIdlingResource.decrement()
sut.showUser(user, userInfo)
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(getCurrentActivity(), screenShotName)
}
}
}
}
}
@@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
@@ -8,59 +9,103 @@
package com.owncloud.android.ui.activity
import android.content.Intent
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class PassCodeActivityIT : AbstractIT() {
@get:Rule
var activityRule = IntentsTestRule(PassCodeActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.activity.PassCodeActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun check() {
val sut = activityRule.launchActivity(Intent(PassCodeActivity.ACTION_CHECK))
val intent = Intent(targetContext, PassCodeActivity::class.java).apply {
action = PassCodeActivity.ACTION_CHECK
}
waitForIdleSync()
launchActivity<PassCodeActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.binding.txt0.clearFocus()
Espresso.closeSoftKeyboard()
EspressoIdlingResource.decrement()
sut.runOnUiThread { sut.binding.txt0.clearFocus() }
Espresso.closeSoftKeyboard()
shortSleep()
waitForIdleSync()
screenshot(sut)
val screenShotName = createName(testClassName + "_" + "check", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun request() {
val sut = activityRule.launchActivity(Intent(PassCodeActivity.ACTION_REQUEST_WITH_RESULT))
val intent = Intent(targetContext, PassCodeActivity::class.java).apply {
action = PassCodeActivity.ACTION_REQUEST_WITH_RESULT
}
waitForIdleSync()
launchActivity<PassCodeActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.binding.txt0.clearFocus()
Espresso.closeSoftKeyboard()
EspressoIdlingResource.decrement()
sut.runOnUiThread { sut.binding.txt0.clearFocus() }
Espresso.closeSoftKeyboard()
shortSleep()
waitForIdleSync()
screenshot(sut)
val screenShotName = createName(testClassName + "_" + "request", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun delete() {
val sut = activityRule.launchActivity(Intent(PassCodeActivity.ACTION_CHECK_WITH_RESULT))
val intent = Intent(targetContext, PassCodeActivity::class.java).apply {
action = PassCodeActivity.ACTION_CHECK_WITH_RESULT
}
waitForIdleSync()
launchActivity<PassCodeActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.binding.txt0.clearFocus()
Espresso.closeSoftKeyboard()
EspressoIdlingResource.decrement()
sut.runOnUiThread { sut.binding.txt0.clearFocus() }
Espresso.closeSoftKeyboard()
shortSleep()
waitForIdleSync()
screenshot(sut)
val screenShotName = createName(testClassName + "_" + "delete", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -1,28 +1,53 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2022 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity
import android.app.Activity
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class ReceiveExternalFilesActivityIT : AbstractIT() {
@get:Rule
val activityRule = IntentsTestRule(ReceiveExternalFilesActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.activity.ReceiveExternalFilesActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun open() {
val sut: Activity = activityRule.launchActivity(null)
screenshot(sut)
launchActivity<ReceiveExternalFilesActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "open", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
@@ -9,13 +10,13 @@ package com.owncloud.android.ui.activity
import android.content.Intent
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.nextcloud.test.GrantStoragePermissionRule
import com.nextcloud.test.GrantStoragePermissionRule.Companion.grant
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.FileStorageUtils
@@ -24,16 +25,14 @@ import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
import java.io.File
class UploadFilesActivityIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.activity.UploadFilesActivityIT"
@get:Rule
var activityRule = IntentsTestRule(UploadFilesActivity::class.java, true, false)
@get:Rule
var permissionRule = GrantStoragePermissionRule.grant()
var storagePermissionRule: TestRule = grant()
private val directories = listOf("A", "B", "C", "D")
.map { File("${FileStorageUtils.getTemporalPath(account.name)}${File.separator}$it") }
@@ -59,101 +58,122 @@ class UploadFilesActivityIT : AbstractIT() {
}
@Test
@UiThread
@ScreenshotTest
fun noneSelected() {
val sut: UploadFilesActivity = activityRule.launchActivity(null)
launchActivity<UploadFilesActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.runOnUiThread {
sut.fileListFragment.setFiles(
directories +
listOf(
File("1.txt"),
File("2.pdf"),
File("3.mp3")
sut.fileListFragment.setFiles(
directories +
listOf(
File("1.txt"),
File("2.pdf"),
File("3.mp3")
)
)
)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "noneSelected", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.fileListFragment.binding?.listRoot, screenShotName)
}
}
}
waitForIdleSync()
longSleep()
screenshot(sut.fileListFragment.binding?.listRoot)
}
@Test
@UiThread
@ScreenshotTest
fun localFolderPickerMode() {
val sut: UploadFilesActivity = activityRule.launchActivity(
Intent().apply {
putExtra(
UploadFilesActivity.KEY_LOCAL_FOLDER_PICKER_MODE,
true
)
putExtra(
UploadFilesActivity.REQUEST_CODE_KEY,
FileDisplayActivity.REQUEST_CODE__SELECT_FILES_FROM_FILE_SYSTEM
)
}
)
sut.runOnUiThread {
sut.fileListFragment.setFiles(
directories
val intent = Intent(targetContext, UploadFilesActivity::class.java).apply {
putExtra(
UploadFilesActivity.KEY_LOCAL_FOLDER_PICKER_MODE,
true
)
putExtra(
UploadFilesActivity.REQUEST_CODE_KEY,
FileDisplayActivity.REQUEST_CODE__SELECT_FILES_FROM_FILE_SYSTEM
)
}
waitForIdleSync()
launchActivity<UploadFilesActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
screenshot(sut)
sut.fileListFragment.setFiles(
directories
)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "localFolderPickerMode", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun search() {
val sut: UploadFilesActivity = activityRule.launchActivity(null)
launchActivity<UploadFilesActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.runOnUiThread {
sut.fileListFragment.setFiles(
directories +
listOf(
File("1.txt"),
File("2.pdf"),
File("3.mp3")
sut.fileListFragment.performSearch("1.txt", arrayListOf(), false)
sut.fileListFragment.setFiles(
directories +
listOf(
File("1.txt"),
File("2.pdf"),
File("3.mp3")
)
)
)
onIdleSync {
EspressoIdlingResource.increment()
sut.fileListFragment.performSearch("1.txt", arrayListOf(), false)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "search", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "search", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun selectAll() {
val sut: UploadFilesActivity = activityRule.launchActivity(null)
launchActivity<UploadFilesActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.runOnUiThread {
sut.fileListFragment.setFiles(
listOf(
File("1.txt"),
File("2.pdf"),
File("3.mp3")
)
)
sut.fileListFragment.setFiles(
listOf(
File("1.txt"),
File("2.pdf"),
File("3.mp3")
)
)
sut.fileListFragment.selectAllFiles(true)
}
sut.fileListFragment.selectAllFiles(true)
onIdleSync {
val screenShotName = createName(testClassName + "_" + "selectAll", "")
screenshotViaName(sut.fileListFragment.binding?.listRoot, screenShotName)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "selectAll", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.fileListFragment.binding?.listRoot, screenShotName)
}
}
}
}
}
@@ -1,50 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Andy Scherzinger <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity;
import android.content.Intent;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.lib.common.UserInfo;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import androidx.test.espresso.intent.rule.IntentsTestRule;
public class UserInfoActivityIT extends AbstractIT {
@Rule
public IntentsTestRule<UserInfoActivity> activityRule = new IntentsTestRule<>(UserInfoActivity.class,
true,
false);
@Test
@ScreenshotTest
public void fullUserInfoDetail() {
final Intent intent = new Intent(targetContext, UserInfoActivity.class);
intent.putExtra(UserInfoActivity.KEY_ACCOUNT, user);
UserInfo userInfo = new UserInfo("test",
true,
"Firstname Familyname",
"[email protected]",
"+49 7613 672 255",
"Awesome Place Av.",
"https://www.nextcloud.com",
"nextclouders",
null,
null
);
intent.putExtra(UserInfoActivity.KEY_USER_DATA, userInfo);
UserInfoActivity sut = activityRule.launchActivity(intent);
shortSleep();
shortSleep();
screenshot(sut);
}
}
@@ -0,0 +1,71 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Andy Scherzinger <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.activity
import android.content.Intent
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.common.UserInfo
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Test
class UserInfoActivityIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.activity.UserInfoActivityIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun fullUserInfoDetail() {
val intent = Intent(targetContext, UserInfoActivity::class.java).apply {
putExtra(UserInfoActivity.KEY_ACCOUNT, user)
val userInfo = UserInfo(
"test",
true,
"Firstname Familyname",
"[email protected]",
"+49 7613 672 255",
"Awesome Place Av.",
"https://www.nextcloud.com",
"nextclouders",
null,
null
)
putExtra(UserInfoActivity.KEY_USER_DATA, userInfo)
}
launchActivity<UserInfoActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "fullUserInfoDetail", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -1,650 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.dialog;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Intent;
import android.net.http.SslCertificate;
import android.net.http.SslError;
import android.os.Looper;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.SslErrorHandler;
import android.widget.TextView;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.nextcloud.android.common.ui.color.ColorUtil;
import com.nextcloud.android.common.ui.theme.MaterialSchemes;
import com.nextcloud.android.common.ui.theme.MaterialSchemesImpl;
import com.nextcloud.android.lib.resources.profile.Action;
import com.nextcloud.android.lib.resources.profile.HoverCard;
import com.nextcloud.client.account.RegisteredUser;
import com.nextcloud.client.account.Server;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.device.DeviceInfo;
import com.nextcloud.client.documentscan.AppScanOptionalFeature;
import com.nextcloud.ui.ChooseAccountDialogFragment;
import com.nextcloud.ui.fileactions.FileActionsBottomSheet;
import com.nextcloud.utils.EditorUtils;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.EnforcedServer;
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.lib.common.Creator;
import com.owncloud.android.lib.common.DirectEditing;
import com.owncloud.android.lib.common.Editor;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.accounts.AccountTypeUtils;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
import com.owncloud.android.lib.resources.status.OCCapability;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.lib.resources.users.Status;
import com.owncloud.android.lib.resources.users.StatusType;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.fragment.OCFileListBottomSheetActions;
import com.owncloud.android.ui.fragment.OCFileListBottomSheetDialog;
import com.owncloud.android.ui.fragment.ProfileBottomSheetDialog;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.theme.CapabilityUtils;
import com.owncloud.android.utils.theme.MaterialSchemesProvider;
import com.owncloud.android.utils.theme.ViewThemeUtils;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mockito;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.annotation.NonNull;
import androidx.fragment.app.DialogFragment;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import kotlin.Unit;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
public class DialogFragmentIT extends AbstractIT {
private final String SERVER_URL = "https://nextcloud.localhost";
@Rule public IntentsTestRule<FileDisplayActivity> activityRule =
new IntentsTestRule<>(FileDisplayActivity.class, true, false);
private FileDisplayActivity getFileDisplayActivity() {
Intent intent = new Intent(targetContext, FileDisplayActivity.class);
return activityRule.launchActivity(intent);
}
@After
public void quitLooperIfNeeded() {
if (Looper.myLooper() != null) {
Looper.myLooper().quitSafely();
}
}
@Test
@ScreenshotTest
public void testRenameFileDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
RenameFileDialogFragment dialog = RenameFileDialogFragment.newInstance(new OCFile("/Test/"),
new OCFile("/"));
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testLoadingDialog() {
LoadingDialog dialog = LoadingDialog.newInstance("Wait…");
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testConfirmationDialogWithOneAction() {
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[]{}, R.string.filedetails_sync_file, R.string.common_ok, -1, -1);
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testConfirmationDialogWithTwoAction() {
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[]{}, R.string.filedetails_sync_file, R.string.common_ok, R.string.common_cancel, -1);
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testConfirmationDialogWithThreeAction() {
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[]{}, R.string.filedetails_sync_file, R.string.common_ok, R.string.common_cancel, R.string.common_confirm);
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testConfirmationDialogWithThreeActionRTL() {
enableRTL();
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[] { }, -1, R.string.common_ok, R.string.common_cancel, R.string.common_confirm);
showDialog(dialog);
resetLocale();
}
@Test
@ScreenshotTest
public void testRemoveFileDialog() {
RemoveFilesDialogFragment dialog = RemoveFilesDialogFragment.newInstance(new OCFile("/Test.md"));
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testRemoveFilesDialog() {
ArrayList<OCFile> toDelete = new ArrayList<>();
toDelete.add(new OCFile("/Test.md"));
toDelete.add(new OCFile("/Document.odt"));
RemoveFilesDialogFragment dialog = RemoveFilesDialogFragment.newInstance(toDelete);
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testRemoveFolderDialog() {
RemoveFilesDialogFragment dialog = RemoveFilesDialogFragment.newInstance(new OCFile("/Folder/"));
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testRemoveFoldersDialog() {
ArrayList<OCFile> toDelete = new ArrayList<>();
toDelete.add(new OCFile("/Folder/"));
toDelete.add(new OCFile("/Documents/"));
RemoveFilesDialogFragment dialog = RemoveFilesDialogFragment.newInstance(toDelete);
showDialog(dialog);
}
@Test
@ScreenshotTest
public void testNewFolderDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
CreateFolderDialogFragment sut = CreateFolderDialogFragment.newInstance(new OCFile("/"));
showDialog(sut);
}
@Test
@ScreenshotTest
public void testEnforcedPasswordDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
SharePasswordDialogFragment sut = SharePasswordDialogFragment.newInstance(new OCFile("/"), true, false);
showDialog(sut);
}
@Test
@ScreenshotTest
public void testOptionalPasswordDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
SharePasswordDialogFragment sut = SharePasswordDialogFragment.newInstance(new OCFile("/"), true, true);
showDialog(sut);
}
@Test
@ScreenshotTest
public void testAccountChooserDialog() throws AccountUtils.AccountNotFoundException {
FileDisplayActivity activity = getFileDisplayActivity();
UserAccountManager userAccountManager = activity.getUserAccountManager();
AccountManager accountManager = AccountManager.get(targetContext);
for (Account account : accountManager.getAccountsByType(MainApp.getAccountType(targetContext))) {
accountManager.removeAccountExplicitly(account);
}
Account newAccount = new Account("test@https://nextcloud.localhost", MainApp.getAccountType(targetContext));
accountManager.addAccountExplicitly(newAccount, "password", null);
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_OC_BASE_URL, SERVER_URL);
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_USER_ID, "test");
accountManager.setAuthToken(newAccount, AccountTypeUtils.getAuthTokenTypePass(newAccount.type), "password");
User newUser = userAccountManager.getUser(newAccount.name).orElseThrow(RuntimeException::new);
userAccountManager.setCurrentOwnCloudAccount(newAccount.name);
Account newAccount2 = new Account("[email protected]", MainApp.getAccountType(targetContext));
accountManager.addAccountExplicitly(newAccount2, "password", null);
accountManager.setUserData(newAccount2, AccountUtils.Constants.KEY_OC_BASE_URL, SERVER_URL);
accountManager.setUserData(newAccount2, AccountUtils.Constants.KEY_USER_ID, "user1");
accountManager.setUserData(newAccount2, AccountUtils.Constants.KEY_OC_VERSION, "20.0.0");
accountManager.setAuthToken(newAccount2, AccountTypeUtils.getAuthTokenTypePass(newAccount.type), "password");
FileDataStorageManager fileDataStorageManager = new FileDataStorageManager(newUser,
targetContext.getContentResolver());
OCCapability capability = new OCCapability();
capability.setUserStatus(CapabilityBooleanType.TRUE);
capability.setUserStatusSupportsEmoji(CapabilityBooleanType.TRUE);
fileDataStorageManager.saveCapabilities(capability);
ChooseAccountDialogFragment sut =
ChooseAccountDialogFragment.newInstance(new RegisteredUser(newAccount,
new OwnCloudAccount(newAccount, targetContext),
new Server(URI.create(SERVER_URL),
OwnCloudVersion.nextcloud_20)));
showDialog(activity, sut);
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.DND,
"Busy fixing 🐛…",
"",
-1),
targetContext));
waitForIdleSync();
shortSleep();
screenshot(sut, "dnd");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.ONLINE,
"",
"",
-1),
targetContext));
waitForIdleSync();
shortSleep();
screenshot(sut, "online");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.ONLINE,
"Let's have some fun",
"🎉",
-1),
targetContext));
waitForIdleSync();
shortSleep();
screenshot(sut, "fun");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.OFFLINE, "", "", -1), targetContext));
waitForIdleSync();
shortSleep();
screenshot(sut, "offline");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.AWAY, "Vacation", "🌴", -1), targetContext));
waitForIdleSync();
shortSleep();
screenshot(sut, "away");
}
@Test
@ScreenshotTest
public void testAccountChooserDialogWithStatusDisabled() throws AccountUtils.AccountNotFoundException {
AccountManager accountManager = AccountManager.get(targetContext);
for (Account account : accountManager.getAccounts()) {
accountManager.removeAccountExplicitly(account);
}
Account newAccount = new Account("test@https://nextcloud.localhost", MainApp.getAccountType(targetContext));
accountManager.addAccountExplicitly(newAccount, "password", null);
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_OC_BASE_URL, SERVER_URL);
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_USER_ID, "test");
accountManager.setAuthToken(newAccount, AccountTypeUtils.getAuthTokenTypePass(newAccount.type), "password");
FileDisplayActivity fda = getFileDisplayActivity();
UserAccountManager userAccountManager = fda.getUserAccountManager();
User newUser = userAccountManager.getUser(newAccount.name).get();
FileDataStorageManager fileDataStorageManager = new FileDataStorageManager(newUser,
targetContext.getContentResolver());
OCCapability capability = new OCCapability();
capability.setUserStatus(CapabilityBooleanType.FALSE);
fileDataStorageManager.saveCapabilities(capability);
ChooseAccountDialogFragment sut =
ChooseAccountDialogFragment.newInstance(new RegisteredUser(newAccount,
new OwnCloudAccount(newAccount, targetContext),
new Server(URI.create(SERVER_URL),
OwnCloudVersion.nextcloud_20)));
showDialog(fda, sut);
}
@Test
@ScreenshotTest
public void testBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
OCFileListBottomSheetActions action = new OCFileListBottomSheetActions() {
@Override
public void createFolder() {
}
@Override
public void uploadFromApp() {
}
@Override
public void uploadFiles() {
}
@Override
public void newDocument() {
}
@Override
public void newSpreadsheet() {
}
@Override
public void newPresentation() {
}
@Override
public void directCameraUpload() {
}
@Override
public void scanDocUpload() {
}
@Override
public void showTemplate(Creator creator, String headline) {
}
@Override
public void createRichWorkspace() {
}
};
DeviceInfo info = new DeviceInfo();
OCFile ocFile = new OCFile("/test.md");
ocFile.setRemoteId("00000001");
Intent intent = new Intent(targetContext, FileDisplayActivity.class);
FileDisplayActivity fda = activityRule.launchActivity(intent);
// add direct editing info
DirectEditing directEditing = new DirectEditing();
directEditing.getCreators().put("1", new Creator("1",
"text",
"text file",
".md",
"application/octet-stream",
false));
directEditing.getCreators().put("2", new Creator("2",
"md",
"markdown file",
".md",
"application/octet-stream",
false));
directEditing.getEditors().put("text",
new Editor("1",
"Text",
new ArrayList<>(Collections.singletonList(MimeTypeUtil.MIMETYPE_TEXT_MARKDOWN)),
new ArrayList<>(),
false));
String json = new Gson().toJson(directEditing);
new ArbitraryDataProviderImpl(targetContext).storeOrUpdateKeyValue(user.getAccountName(),
ArbitraryDataProvider.DIRECT_EDITING,
json);
// activate templates
OCCapability capability = fda.getCapabilities();
capability.setRichDocuments(CapabilityBooleanType.TRUE);
capability.setRichDocumentsDirectEditing(CapabilityBooleanType.TRUE);
capability.setRichDocumentsTemplatesAvailable(CapabilityBooleanType.TRUE);
capability.setAccountName(user.getAccountName());
CapabilityUtils.updateCapability(capability);
AppScanOptionalFeature appScanOptionalFeature = new AppScanOptionalFeature() {
@NonNull
@Override
public ActivityResultContract<Unit, String> getScanContract() {
throw new UnsupportedOperationException("Document scan is not available");
}
};
MaterialSchemesProvider materialSchemesProvider = new MaterialSchemesProvider() {
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForUser(@NonNull User user) {
return null;
}
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForCapability(@NonNull OCCapability capability) {
return null;
}
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForCurrentUser() {
return new MaterialSchemesImpl(R.color.primary, false);
}
@NonNull
@Override
public MaterialSchemes getDefaultMaterialSchemes() {
return null;
}
@NonNull
@Override
public MaterialSchemes getMaterialSchemesForPrimaryBackground() {
return null;
}
};
ViewThemeUtils viewThemeUtils = new ViewThemeUtils(materialSchemesProvider.getMaterialSchemesForCurrentUser(),
new ColorUtil(targetContext));
EditorUtils editorUtils = new EditorUtils(new ArbitraryDataProviderImpl(targetContext));
OCFileListBottomSheetDialog sut = new OCFileListBottomSheetDialog(fda,
action,
info,
user,
ocFile,
fda.themeUtils,
viewThemeUtils,
editorUtils,
appScanOptionalFeature);
fda.runOnUiThread(sut::show);
getInstrumentation().waitForIdleSync();
shortSleep();
sut.getBehavior().setState(BottomSheetBehavior.STATE_EXPANDED);
getInstrumentation().waitForIdleSync();
shortSleep();
ViewGroup viewGroup = sut.getWindow().findViewById(android.R.id.content);
hideCursors(viewGroup);
screenshot(Objects.requireNonNull(sut.getWindow()).getDecorView());
}
@Test
@ScreenshotTest
public void testProfileBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
// Fixed values for HoverCard
List<Action> actions = new ArrayList<>();
actions.add(new Action("profile",
"View profile",
"https://dev.nextcloud.com/core/img/actions/profile.svg",
"https://dev.nextcloud.com/index.php/u/christine"));
actions.add(new Action("core",
"[email protected]",
"https://dev.nextcloud.com/core/img/actions/mail.svg",
"mailto:[email protected]"));
actions.add(new Action("spreed",
"Talk to Christine",
"https://dev.nextcloud.com/apps/spreed/img/app-dark.svg",
"https://dev.nextcloud.com/apps/spreed/?callUser=christine"
));
HoverCard hoverCard = new HoverCard("christine", "Christine Scott", actions);
// show dialog
Intent intent = new Intent(targetContext, FileDisplayActivity.class);
FileDisplayActivity fda = activityRule.launchActivity(intent);
ProfileBottomSheetDialog sut = new ProfileBottomSheetDialog(fda,
user,
hoverCard,
fda.viewThemeUtils);
fda.runOnUiThread(sut::show);
waitForIdleSync();
screenshot(sut.getWindow().getDecorView());
}
@Test
@ScreenshotTest
public void testSslUntrustedCertDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
final SslCertificate certificate = new SslCertificate("foo", "bar", "2022/01/10", "2022/01/30");
final SslError sslError = new SslError(SslError.SSL_UNTRUSTED, certificate);
final SslErrorHandler handler = Mockito.mock(SslErrorHandler.class);
SslUntrustedCertDialog sut = SslUntrustedCertDialog.newInstanceForEmptySslError(sslError, handler);
showDialog(sut);
}
@Test
@ScreenshotTest
public void testStoragePermissionDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
StoragePermissionDialogFragment sut = StoragePermissionDialogFragment.Companion.newInstance(false);
showDialog(sut);
}
@Test
@ScreenshotTest
public void testFileActionsBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
OCFile ocFile = new OCFile("/test.md");
ocFile.setRemoteId("0001");
final FileActionsBottomSheet sut = FileActionsBottomSheet.newInstance(ocFile, false);
showDialog(sut);
}
private void showDialog(DialogFragment dialog) {
Intent intent = new Intent(targetContext, FileDisplayActivity.class);
FileDisplayActivity sut = activityRule.getActivity();
if (sut == null) {
sut = activityRule.launchActivity(intent);
}
showDialog(sut, dialog);
}
private void showDialog(FileDisplayActivity sut, DialogFragment dialog) {
dialog.show(sut.getSupportFragmentManager(), "");
getInstrumentation().waitForIdleSync();
shortSleep();
ViewGroup viewGroup = dialog.requireDialog().getWindow().findViewById(android.R.id.content);
hideCursors(viewGroup);
screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
}
private void hideCursors(ViewGroup viewGroup) {
for (int i = 0; i < viewGroup.getChildCount(); i++) {
View child = viewGroup.getChildAt(i);
if (child instanceof ViewGroup) {
hideCursors((ViewGroup) child);
}
if (child instanceof TextView) {
((TextView) child).setCursorVisible(false);
}
}
}
@Test
public void testGson() {
ArrayList<EnforcedServer> t = new ArrayList<>();
t.add(new EnforcedServer("name", "url"));
t.add(new EnforcedServer("name2", "url1"));
String s = new Gson().toJson(t);
ArrayList<EnforcedServer> t2 = new Gson().fromJson(s, new TypeToken<ArrayList<EnforcedServer>>() {
}.getType());
ArrayList<String> temp = new ArrayList<>();
for (EnforcedServer p : t2) {
temp.add(p.getName());
}
}
}
@@ -0,0 +1,777 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.dialog
import android.accounts.Account
import android.accounts.AccountManager
import android.app.Dialog
import android.content.Intent
import android.net.http.SslCertificate
import android.net.http.SslError
import android.os.Looper
import android.view.ViewGroup
import android.webkit.SslErrorHandler
import android.widget.TextView
import androidx.activity.result.contract.ActivityResultContract
import androidx.annotation.UiThread
import androidx.fragment.app.DialogFragment
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.nextcloud.android.common.ui.color.ColorUtil
import com.nextcloud.android.lib.resources.profile.Action
import com.nextcloud.android.lib.resources.profile.HoverCard
import com.nextcloud.client.account.RegisteredUser
import com.nextcloud.client.account.Server
import com.nextcloud.client.device.DeviceInfo
import com.nextcloud.client.documentscan.AppScanOptionalFeature
import com.nextcloud.ui.ChooseAccountDialogFragment.Companion.newInstance
import com.nextcloud.ui.SetOnlineStatusBottomSheet
import com.nextcloud.ui.fileactions.FileActionsBottomSheet.Companion.newInstance
import com.nextcloud.utils.EditorUtils
import com.owncloud.android.AbstractIT
import com.owncloud.android.MainApp
import com.owncloud.android.R
import com.owncloud.android.authentication.EnforcedServer
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.lib.common.Creator
import com.owncloud.android.lib.common.DirectEditing
import com.owncloud.android.lib.common.Editor
import com.owncloud.android.lib.common.OwnCloudAccount
import com.owncloud.android.lib.common.accounts.AccountTypeUtils
import com.owncloud.android.lib.common.accounts.AccountUtils
import com.owncloud.android.lib.resources.status.CapabilityBooleanType
import com.owncloud.android.lib.resources.status.OCCapability
import com.owncloud.android.lib.resources.status.OwnCloudVersion
import com.owncloud.android.lib.resources.users.Status
import com.owncloud.android.lib.resources.users.StatusType
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.ui.dialog.LoadingDialog.Companion.newInstance
import com.owncloud.android.ui.dialog.RenameFileDialogFragment.Companion.newInstance
import com.owncloud.android.ui.dialog.SharePasswordDialogFragment.Companion.newInstance
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.Companion.newInstanceForEmptySslError
import com.owncloud.android.ui.dialog.StoragePermissionDialogFragment.Companion.newInstance
import com.owncloud.android.ui.fragment.OCFileListBottomSheetActions
import com.owncloud.android.ui.fragment.OCFileListBottomSheetDialog
import com.owncloud.android.ui.fragment.ProfileBottomSheetDialog
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.MimeTypeUtil
import com.owncloud.android.utils.ScreenshotTest
import com.owncloud.android.utils.theme.CapabilityUtils
import com.owncloud.android.utils.theme.ViewThemeUtils
import io.mockk.mockk
import org.junit.After
import org.junit.Before
import org.junit.Test
import java.net.URI
import java.util.function.Supplier
@Suppress("TooManyFunctions")
class DialogFragmentIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.dialog.DialogFragmentIT"
private val serverUrl = "https://nextcloud.localhost"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@After
fun quitLooperIfNeeded() {
Looper.myLooper()?.quitSafely()
}
@Test
@UiThread
@ScreenshotTest
fun testRenameFileDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
newInstance(
OCFile("/Test/"),
OCFile("/")
).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testLoadingDialog() {
newInstance("Wait…").run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testConfirmationDialogWithOneAction() {
ConfirmationDialogFragment.newInstance(
R.string.upload_list_empty_text_auto_upload,
arrayOf(),
R.string.filedetails_sync_file,
R.string.common_ok,
-1,
-1,
-1
).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testConfirmationDialogWithTwoAction() {
ConfirmationDialogFragment.newInstance(
R.string.upload_list_empty_text_auto_upload,
arrayOf(),
R.string.filedetails_sync_file,
R.string.common_ok,
R.string.common_cancel,
-1,
-1
).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testConfirmationDialogWithThreeAction() {
ConfirmationDialogFragment.newInstance(
R.string.upload_list_empty_text_auto_upload,
arrayOf(),
R.string.filedetails_sync_file,
R.string.common_ok,
R.string.common_cancel,
R.string.common_confirm,
-1
).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testConfirmationDialogWithThreeActionRTL() {
enableRTL()
ConfirmationDialogFragment.newInstance(
R.string.upload_list_empty_text_auto_upload,
arrayOf(),
-1,
R.string.common_ok,
R.string.common_cancel,
R.string.common_confirm,
-1
).run {
showDialog(this)
resetLocale()
}
}
@Test
@UiThread
@ScreenshotTest
fun testRemoveFileDialog() {
RemoveFilesDialogFragment.newInstance(OCFile("/Test.md")).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testRemoveFilesDialog() {
val toDelete = ArrayList<OCFile>().apply {
add(OCFile("/Test.md"))
add(OCFile("/Document.odt"))
}
val dialog: RemoveFilesDialogFragment = RemoveFilesDialogFragment.newInstance(toDelete)
showDialog(dialog)
}
@Test
@UiThread
@ScreenshotTest
fun testRemoveFolderDialog() {
val dialog = RemoveFilesDialogFragment.newInstance(OCFile("/Folder/"))
showDialog(dialog)
}
@Test
@UiThread
@ScreenshotTest
fun testRemoveFoldersDialog() {
val toDelete = ArrayList<OCFile>()
toDelete.add(OCFile("/Folder/"))
toDelete.add(OCFile("/Documents/"))
val dialog: RemoveFilesDialogFragment = RemoveFilesDialogFragment.newInstance(toDelete)
showDialog(dialog)
}
@Test
@UiThread
@ScreenshotTest
fun testNewFolderDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val sut = CreateFolderDialogFragment.newInstance(OCFile("/"))
showDialog(sut)
}
@Test
@UiThread
@ScreenshotTest
fun testEnforcedPasswordDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val sut = newInstance(OCFile("/"), true, false)
showDialog(sut)
}
@Test
@UiThread
@ScreenshotTest
fun testOptionalPasswordDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val sut = newInstance(OCFile("/"), true, true)
showDialog(sut)
}
@Test
@UiThread
@ScreenshotTest
fun testAccountChooserDialog() {
val intent = Intent(targetContext, FileDisplayActivity::class.java)
ActivityScenario.launch<FileDisplayActivity>(intent).use { scenario ->
scenario.onActivity { activity: FileDisplayActivity ->
EspressoIdlingResource.increment()
val userAccountManager = activity.userAccountManager
val accountManager = AccountManager.get(targetContext)
for (account in accountManager.getAccountsByType(MainApp.getAccountType(targetContext))) {
accountManager.removeAccountExplicitly(account)
}
val newAccount = Account("test@https://nextcloud.localhost", MainApp.getAccountType(targetContext))
accountManager.addAccountExplicitly(newAccount, "password", null)
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_OC_BASE_URL, serverUrl)
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_USER_ID, "test")
accountManager.setAuthToken(
newAccount,
AccountTypeUtils.getAuthTokenTypePass(newAccount.type),
"password"
)
val newUser = userAccountManager.getUser(newAccount.name)
.orElseThrow(Supplier { RuntimeException() })
userAccountManager.setCurrentOwnCloudAccount(newAccount.name)
val newAccount2 = Account("[email protected]", MainApp.getAccountType(targetContext))
accountManager.addAccountExplicitly(newAccount2, "password", null)
accountManager.setUserData(newAccount2, AccountUtils.Constants.KEY_OC_BASE_URL, serverUrl)
accountManager.setUserData(newAccount2, AccountUtils.Constants.KEY_USER_ID, "user1")
accountManager.setUserData(newAccount2, AccountUtils.Constants.KEY_OC_VERSION, "20.0.0")
accountManager.setAuthToken(
newAccount2,
AccountTypeUtils.getAuthTokenTypePass(newAccount.type),
"password"
)
val fileDataStorageManager = FileDataStorageManager(
newUser,
targetContext.contentResolver
)
val capability = OCCapability().apply {
userStatus = CapabilityBooleanType.TRUE
userStatusSupportsEmoji = CapabilityBooleanType.TRUE
}
fileDataStorageManager.saveCapabilities(capability)
EspressoIdlingResource.decrement()
try {
onIdleSync {
val sut = newInstance(
RegisteredUser(
newAccount,
OwnCloudAccount(newAccount, targetContext),
Server(URI.create(serverUrl), OwnCloudVersion.nextcloud_20)
)
)
showDialog(activity, sut)
sut.setStatus(
Status(
StatusType.DND,
"Busy fixing 🐛…",
"",
-1
),
targetContext
)
screenshot(sut, "dnd")
sut.setStatus(
Status(
StatusType.ONLINE,
"",
"",
-1
),
targetContext
)
screenshot(sut, "online")
sut.setStatus(
Status(
StatusType.ONLINE,
"Let's have some fun",
"🎉",
-1
),
targetContext
)
screenshot(sut, "fun")
sut.setStatus(
Status(StatusType.OFFLINE, "", "", -1),
targetContext
)
screenshot(sut, "offline")
sut.setStatus(
Status(StatusType.AWAY, "Vacation", "🌴", -1),
targetContext
)
screenshot(sut, "away")
}
} catch (e: AccountUtils.AccountNotFoundException) {
throw java.lang.RuntimeException(e)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
@Throws(AccountUtils.AccountNotFoundException::class)
fun testAccountChooserDialogWithStatusDisabled() {
val accountManager = AccountManager.get(targetContext)
for (account in accountManager.accounts) {
accountManager.removeAccountExplicitly(account)
}
val newAccount = Account("test@https://nextcloud.localhost", MainApp.getAccountType(targetContext))
accountManager.addAccountExplicitly(newAccount, "password", null)
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_OC_BASE_URL, serverUrl)
accountManager.setUserData(newAccount, AccountUtils.Constants.KEY_USER_ID, "test")
accountManager.setAuthToken(newAccount, AccountTypeUtils.getAuthTokenTypePass(newAccount.type), "password")
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { fda ->
onIdleSync {
EspressoIdlingResource.increment()
val userAccountManager = fda.userAccountManager
val newUser = userAccountManager.getUser(newAccount.name).get()
val fileDataStorageManager = FileDataStorageManager(
newUser,
targetContext.contentResolver
)
val capability = OCCapability().apply {
userStatus = CapabilityBooleanType.FALSE
}
fileDataStorageManager.saveCapabilities(capability)
EspressoIdlingResource.decrement()
val sut =
newInstance(
RegisteredUser(
newAccount,
OwnCloudAccount(newAccount, targetContext),
Server(
URI.create(serverUrl),
OwnCloudVersion.nextcloud_20
)
)
)
onView(isRoot()).check(matches(isDisplayed()))
showDialog(fda, sut)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val action: OCFileListBottomSheetActions = object : OCFileListBottomSheetActions {
override fun createFolder() = Unit
override fun uploadFromApp() = Unit
override fun uploadFiles() = Unit
override fun newDocument() = Unit
override fun newSpreadsheet() = Unit
override fun newPresentation() = Unit
override fun directCameraUpload() = Unit
override fun scanDocUpload() = Unit
override fun showTemplate(creator: Creator?, headline: String?) = Unit
override fun createRichWorkspace() = Unit
}
val info = DeviceInfo()
val ocFile = OCFile("/test.md").apply {
remoteId = "00000001"
}
val intent = Intent(targetContext, FileDisplayActivity::class.java)
launchActivity<FileDisplayActivity>(intent).use { scenario ->
scenario.onActivity { fda ->
onIdleSync {
EspressoIdlingResource.increment()
// add direct editing info
var directEditing = DirectEditing()
val creators = directEditing.creators.toMutableMap()
val editors = directEditing.editors.toMutableMap()
creators.put(
"1",
Creator(
"1",
"text",
"text file",
".md",
"application/octet-stream",
false
)
)
creators.put(
"2",
Creator(
"2",
"md",
"markdown file",
".md",
"application/octet-stream",
false
)
)
editors.put(
"text",
Editor(
"1",
"Text",
ArrayList(mutableListOf(MimeTypeUtil.MIMETYPE_TEXT_MARKDOWN)),
ArrayList(),
false
)
)
directEditing = DirectEditing(editors, creators)
val json = Gson().toJson(directEditing)
ArbitraryDataProviderImpl(targetContext).storeOrUpdateKeyValue(
user.accountName,
ArbitraryDataProvider.DIRECT_EDITING,
json
)
// activate templates
val capability = fda.capabilities.apply {
richDocuments = CapabilityBooleanType.TRUE
richDocumentsDirectEditing = CapabilityBooleanType.TRUE
richDocumentsTemplatesAvailable = CapabilityBooleanType.TRUE
accountName = user.accountName
}
CapabilityUtils.updateCapability(capability)
val appScanOptionalFeature: AppScanOptionalFeature = object : AppScanOptionalFeature() {
override fun getScanContract(): ActivityResultContract<Unit, String?> =
throw UnsupportedOperationException("Document scan is not available")
}
val materialSchemesProvider = getMaterialSchemesProvider()
val viewThemeUtils = ViewThemeUtils(
materialSchemesProvider.getMaterialSchemesForCurrentUser(),
ColorUtil(targetContext)
)
val editorUtils = EditorUtils(ArbitraryDataProviderImpl(targetContext))
val sut = OCFileListBottomSheetDialog(
fda,
action,
info,
user,
ocFile,
fda.themeUtils,
viewThemeUtils,
editorUtils,
appScanOptionalFeature
)
EspressoIdlingResource.decrement()
sut.show()
sut.behavior.setState(BottomSheetBehavior.STATE_EXPANDED)
val viewGroup = sut.window?.findViewById<ViewGroup>(android.R.id.content) ?: return@onIdleSync
hideCursors(viewGroup)
val screenShotName = createName(testClassName + "_" + "testBottomSheet", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.window?.decorView, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testOnlineStatusBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
// show dialog
val intent = Intent(targetContext, FileDisplayActivity::class.java)
launchActivity<FileDisplayActivity>(intent).use { scenario ->
scenario.onActivity { fda ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = SetOnlineStatusBottomSheet(
Status(StatusType.DND, "Focus time", "\uD83E\uDD13", -1)
)
EspressoIdlingResource.decrement()
sut.show(fda.supportFragmentManager, "set_online_status")
val screenShotName = createName(testClassName + "_" + "testOnlineStatusBottomSheet", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.view, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testProfileBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
// Fixed values for HoverCard
val actions: MutableList<Action> = ArrayList()
actions.add(
Action(
"profile",
"View profile",
"https://dev.nextcloud.com/core/img/actions/profile.svg",
"https://dev.nextcloud.com/index.php/u/christine"
)
)
actions.add(
Action(
"core",
"[email protected]",
"https://dev.nextcloud.com/core/img/actions/mail.svg",
"mailto:[email protected]"
)
)
actions.add(
Action(
"spreed",
"Talk to Christine",
"https://dev.nextcloud.com/apps/spreed/img/app-dark.svg",
"https://dev.nextcloud.com/apps/spreed/?callUser=christine"
)
)
val hoverCard = HoverCard("christine", "Christine Scott", actions)
// show dialog
val intent = Intent(targetContext, FileDisplayActivity::class.java)
launchActivity<FileDisplayActivity>(intent).use { scenario ->
scenario.onActivity { fda ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = ProfileBottomSheetDialog(
fda,
user,
hoverCard,
fda.viewThemeUtils
)
EspressoIdlingResource.decrement()
sut.show()
val screenShotName = createName(testClassName + "_" + "testProfileBottomSheet", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.window?.decorView, screenShotName)
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun testSslUntrustedCertDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val certificate = SslCertificate("foo", "bar", "2022/01/10", "2022/01/30")
val sslError = SslError(SslError.SSL_UNTRUSTED, certificate)
val handler = mockk<SslErrorHandler>(relaxed = true)
newInstanceForEmptySslError(sslError, handler).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testStoragePermissionDialog() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
newInstance(false).run {
showDialog(this)
}
}
@Test
@UiThread
@ScreenshotTest
fun testFileActionsBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare()
}
val ocFile = OCFile("/test.md").apply {
remoteId = "0001"
}
newInstance(ocFile, false).run {
showDialog(this)
}
}
private fun showDialog(dialog: DialogFragment) {
launchActivity<FileDisplayActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
onView(isRoot()).check(matches(isDisplayed()))
showDialog(sut, dialog)
}
}
}
}
private fun showDialog(sut: FileDisplayActivity, dialog: DialogFragment) {
dialog.show(sut.supportFragmentManager, null)
onIdleSync {
val dialogInstance = waitForDialog(dialog)
?: throw IllegalStateException("Dialog was not created")
val viewGroup = dialogInstance.window?.findViewById<ViewGroup>(android.R.id.content) ?: return@onIdleSync
hideCursors(viewGroup)
onView(isRoot()).check(matches(isDisplayed()))
screenshot(dialogInstance.window?.decorView)
}
}
private fun waitForDialog(dialogFragment: DialogFragment, timeoutMs: Long = 5000): Dialog? {
val start = System.currentTimeMillis()
while (System.currentTimeMillis() - start < timeoutMs) {
val dialog = dialogFragment.dialog
if (dialog != null) return dialog
Thread.sleep(100)
}
return null
}
private fun hideCursors(viewGroup: ViewGroup) {
for (i in 0..<viewGroup.childCount) {
val child = viewGroup.getChildAt(i)
if (child is ViewGroup) {
hideCursors(child)
}
if (child is TextView) {
child.isCursorVisible = false
}
}
}
@Test
fun testGson() {
val t = ArrayList<EnforcedServer?>().apply {
add(EnforcedServer("name", "url"))
add(EnforcedServer("name2", "url1"))
}
val s = Gson().toJson(t)
val t2 = Gson().fromJson<ArrayList<EnforcedServer>>(
s,
object : TypeToken<ArrayList<EnforcedServer?>?>() {
}.type
)
val temp = ArrayList<String?>()
for (p in t2) {
temp.add(p.name)
}
}
}
@@ -1,26 +1,36 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.dialog
import androidx.annotation.UiThread
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.RecyclerView
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Assert
import org.junit.Rule
import org.junit.Before
import org.junit.Test
class SendFilesDialogTest : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.dialog.SendFilesDialogTest"
companion object {
private val FILES_SAME_TYPE = setOf(
OCFile("/1.jpg").apply {
@@ -43,52 +53,77 @@ class SendFilesDialogTest : AbstractIT() {
)
}
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
private fun showDialog(files: Set<OCFile>): SendFilesDialog {
val activity = testActivityRule.launchActivity(null)
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
val fm: FragmentManager = activity.supportFragmentManager
val ft = fm.beginTransaction()
ft.addToBackStack(null)
private fun showDialog(files: Set<OCFile>, onComplete: (SendFilesDialog) -> Unit) {
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = SendFilesDialog.newInstance(files)
sut.show(ft, "TAG_SEND_SHARE_DIALOG")
val fm: FragmentManager = sut.supportFragmentManager
val ft = fm.beginTransaction()
ft.addToBackStack(null)
InstrumentationRegistry.getInstrumentation().waitForIdleSync()
shortSleep()
val dialog = SendFilesDialog.newInstance(files)
dialog.show(ft, "TAG_SEND_SHARE_DIALOG")
onComplete(dialog)
return sut
EspressoIdlingResource.decrement()
}
}
}
}
@Test
@UiThread
@ScreenshotTest
fun showDialog() {
val sut = showDialog(FILES_SAME_TYPE)
val recyclerview: RecyclerView = sut.requireDialog().findViewById(R.id.send_button_recycler_view)
Assert.assertNotNull("Adapter is null", recyclerview.adapter)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter!!.itemCount)
showDialog(FILES_SAME_TYPE) { sut ->
val recyclerview: RecyclerView = sut.requireDialog().findViewById(R.id.send_button_recycler_view)
Assert.assertNotNull("Adapter is null", recyclerview.adapter)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter!!.itemCount)
}
}
@Test
@UiThread
@ScreenshotTest
fun showDialog_Screenshot() {
val sut = showDialog(FILES_SAME_TYPE)
sut.requireDialog().window?.decorView.let { screenshot(it) }
showDialog(FILES_SAME_TYPE) { sut ->
val screenShotName = createName(testClassName + "_" + "showDialog_Screenshot", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.requireDialog().window?.decorView, screenShotName)
}
}
@Test
@UiThread
@ScreenshotTest
fun showDialogDifferentTypes() {
val sut = showDialog(FILES_MIXED_TYPE)
val recyclerview: RecyclerView = sut.requireDialog().findViewById(R.id.send_button_recycler_view)
Assert.assertNotNull("Adapter is null", recyclerview.adapter)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter!!.itemCount)
showDialog(FILES_MIXED_TYPE) { sut ->
val recyclerview: RecyclerView = sut.requireDialog().findViewById(R.id.send_button_recycler_view)
Assert.assertNotNull("Adapter is null", recyclerview.adapter)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter!!.itemCount)
}
}
@Test
@UiThread
@ScreenshotTest
fun showDialogDifferentTypes_Screenshot() {
val sut = showDialog(FILES_MIXED_TYPE)
sut.requireDialog().window?.decorView.let { screenshot(it) }
showDialog(FILES_MIXED_TYPE) { sut ->
val screenShotName = createName(testClassName + "_" + "showDialogDifferentTypes_Screenshot", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.requireDialog().window?.decorView, screenShotName)
}
}
}
@@ -1,46 +1,55 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.dialog
import androidx.annotation.UiThread
import androidx.fragment.app.FragmentManager
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.core.app.launchActivity
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.resources.status.OCCapability
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.Test
class SendShareDialogTest : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.dialog.SendShareDialogTest"
@Test
@UiThread
@ScreenshotTest
fun showDialog() {
val activity = testActivityRule.launchActivity(null)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val fm: FragmentManager = activity.supportFragmentManager
val ft = fm.beginTransaction()
ft.addToBackStack(null)
val fm: FragmentManager = activity.supportFragmentManager
val ft = fm.beginTransaction()
ft.addToBackStack(null)
val file = OCFile("/1.jpg").apply {
mimeType = "image/jpg"
}
EspressoIdlingResource.decrement()
val file = OCFile("/1.jpg").apply {
mimeType = "image/jpg"
val sut = SendShareDialog.newInstance(file, false, OCCapability())
sut.show(ft, "TAG_SEND_SHARE_DIALOG")
val screenShotName = createName(testClassName + "_" + "showDialog", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.requireDialog().window?.decorView, screenShotName)
}
}
}
val sut = SendShareDialog.newInstance(file, false, OCCapability())
sut.show(ft, "TAG_SEND_SHARE_DIALOG")
InstrumentationRegistry.getInstrumentation().waitForIdleSync()
shortSleep()
shortSleep()
sut.requireDialog().window?.decorView.let { screenshot(it) }
}
}
@@ -1,80 +1,101 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.dialog
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.internal.runner.junit4.statement.UiThreadStatement.runOnUiThread
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.ui.dialog.setupEncryption.SetupEncryptionDialogFragment
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class SetupEncryptionDialogFragmentIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.dialog.SetupEncryptionDialogFragmentIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun showMnemonic() {
val activity = testActivityRule.launchActivity(null)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = SetupEncryptionDialogFragment.newInstance(user, 0)
val sut = SetupEncryptionDialogFragment.newInstance(user, 0)
sut.show(activity.supportFragmentManager, "1")
sut.show(activity.supportFragmentManager, "1")
val keyWords = arrayListOf(
"ability",
"able",
"about",
"above",
"absent",
"absorb",
"abstract",
"absurd",
"abuse",
"access",
"accident",
"account",
"accuse"
)
sut.setMnemonic(keyWords)
sut.showMnemonicInfo()
EspressoIdlingResource.decrement()
val keyWords = arrayListOf(
"ability",
"able",
"about",
"above",
"absent",
"absorb",
"abstract",
"absurd",
"abuse",
"access",
"accident",
"account",
"accuse"
)
shortSleep()
runOnUiThread {
sut.setMnemonic(keyWords)
sut.showMnemonicInfo()
val screenShotName = createName(testClassName + "_" + "showMnemonic", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.requireDialog().window?.decorView, screenShotName)
}
}
}
waitForIdleSync()
screenshot(sut.requireDialog().window!!.decorView)
}
@Test
@UiThread
@ScreenshotTest
fun error() {
val activity = testActivityRule.launchActivity(null)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = SetupEncryptionDialogFragment.newInstance(user, 0)
val sut = SetupEncryptionDialogFragment.newInstance(user, 0)
sut.show(activity.supportFragmentManager, "1")
sut.errorSavingKeys()
sut.show(activity.supportFragmentManager, "1")
EspressoIdlingResource.decrement()
shortSleep()
runOnUiThread {
sut.errorSavingKeys()
val screenShotName = createName(testClassName + "_" + "error", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut.requireDialog().window?.decorView, screenShotName)
}
}
}
shortSleep()
waitForIdleSync()
screenshot(sut.requireDialog().window!!.decorView)
}
}
@@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
@@ -8,8 +9,13 @@
package com.owncloud.android.ui.fragment
import android.graphics.BitmapFactory
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.internal.runner.junit4.statement.UiThreadStatement.runOnUiThread
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.R
@@ -17,155 +23,171 @@ import com.owncloud.android.lib.resources.users.StatusType
import com.owncloud.android.ui.TextDrawable
import com.owncloud.android.utils.BitmapUtils
import com.owncloud.android.utils.DisplayUtils
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class AvatarIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.fragment.AvatarIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun showAvatars() {
val avatarRadius = targetContext.resources.getDimension(R.dimen.list_item_avatar_icon_radius)
val width = DisplayUtils.convertDpToPixel(2 * avatarRadius, targetContext)
val sut = testActivityRule.launchActivity(null)
val fragment = AvatarTestFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
sut.addFragment(fragment)
val avatarRadius = targetContext.resources.getDimension(R.dimen.list_item_avatar_icon_radius)
val width = DisplayUtils.convertDpToPixel(2 * avatarRadius, targetContext)
val fragment = AvatarTestFragment()
runOnUiThread {
fragment.addAvatar("Admin", avatarRadius, width, targetContext)
fragment.addAvatar("Test Server Admin", avatarRadius, width, targetContext)
fragment.addAvatar("Cormier Paulette", avatarRadius, width, targetContext)
fragment.addAvatar("winston brent", avatarRadius, width, targetContext)
fragment.addAvatar("Baker James Lorena", avatarRadius, width, targetContext)
fragment.addAvatar("Baker James Lorena", avatarRadius, width, targetContext)
fragment.addAvatar("[email protected]", avatarRadius, width, targetContext)
sut.addFragment(fragment)
fragment.run {
addAvatar("Admin", avatarRadius, width, targetContext)
addAvatar("Test Server Admin", avatarRadius, width, targetContext)
addAvatar("Cormier Paulette", avatarRadius, width, targetContext)
addAvatar("winston brent", avatarRadius, width, targetContext)
addAvatar("Baker James Lorena", avatarRadius, width, targetContext)
addAvatar("Baker James Lorena", avatarRadius, width, targetContext)
addAvatar("[email protected]", avatarRadius, width, targetContext)
}
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showAvatars", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
shortSleep()
waitForIdleSync()
screenshot(sut)
}
@Test
@UiThread
@ScreenshotTest
fun showAvatarsWithStatus() {
val avatarRadius = targetContext.resources.getDimension(R.dimen.list_item_avatar_icon_radius)
val width = DisplayUtils.convertDpToPixel(2 * avatarRadius, targetContext)
val sut = testActivityRule.launchActivity(null)
val fragment = AvatarTestFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val paulette = BitmapFactory.decodeFile(getFile("paulette.jpg").absolutePath)
val christine = BitmapFactory.decodeFile(getFile("christine.jpg").absolutePath)
val textBitmap = BitmapUtils.drawableToBitmap(TextDrawable.createNamedAvatar("Admin", avatarRadius))
val avatarRadius = targetContext.resources.getDimension(R.dimen.list_item_avatar_icon_radius)
val width = DisplayUtils.convertDpToPixel(2 * avatarRadius, targetContext)
val fragment = AvatarTestFragment()
sut.addFragment(fragment)
val paulette = BitmapFactory.decodeFile(getFile("paulette.jpg").absolutePath)
val christine = BitmapFactory.decodeFile(getFile("christine.jpg").absolutePath)
val textBitmap = BitmapUtils.drawableToBitmap(TextDrawable.createNamedAvatar("Admin", avatarRadius))
runOnUiThread {
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.ONLINE, "😘", targetContext),
width * 2,
1,
targetContext
)
sut.addFragment(fragment)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "☁️", targetContext),
width * 2,
1,
targetContext
)
fragment.run {
addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.ONLINE, "😘", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "☁️", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "🌴️", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.DND, "", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.AWAY, "", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.OFFLINE, "", targetContext),
width * 2,
1,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "😘", targetContext),
width,
2,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "☁️", targetContext),
width,
2,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "🌴️", targetContext),
width,
2,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "", targetContext),
width,
2,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.DND, "", targetContext),
width,
2,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.AWAY, "", targetContext),
width,
2,
targetContext
)
addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.OFFLINE, "", targetContext),
width,
2,
targetContext
)
}
EspressoIdlingResource.decrement()
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "🌴️", targetContext),
width * 2,
1,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "", targetContext),
width * 2,
1,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.DND, "", targetContext),
width * 2,
1,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.AWAY, "", targetContext),
width * 2,
1,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.OFFLINE, "", targetContext),
width * 2,
1,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "😘", targetContext),
width,
2,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "☁️", targetContext),
width,
2,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "🌴️", targetContext),
width,
2,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "", targetContext),
width,
2,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.DND, "", targetContext),
width,
2,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.AWAY, "", targetContext),
width,
2,
targetContext
)
fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.OFFLINE, "", targetContext),
width,
2,
targetContext
)
val screenShotName = createName(testClassName + "_" + "showAvatarsWithStatus", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
shortSleep()
waitForIdleSync()
screenshot(sut)
}
}
@@ -471,7 +471,6 @@ class FileDetailSharingFragmentIT : AbstractIT() {
permissions = 17
}
activity.handler.post { sut.showSharingMenuActionSheet(publicShare) }
waitForIdleSync()
// check if items are visible
onView(ViewMatchers.withId(R.id.menu_share_advanced_permissions)).check(matches(isDisplayed()))
@@ -611,8 +610,6 @@ class FileDetailSharingFragmentIT : AbstractIT() {
// click event
onView(ViewMatchers.withId(R.id.menu_share_advanced_permissions)).perform(ViewActions.click())
shortSleep()
waitForIdleSync()
// validate view shown on screen
onView(ViewMatchers.withId(R.id.view_only_radio_button)).check(matches(isDisplayed()))
@@ -825,7 +822,7 @@ class FileDetailSharingFragmentIT : AbstractIT() {
val processFragment =
activity.supportFragmentManager.findFragmentByTag(FileDetailsSharingProcessFragment.TAG) as
FileDetailsSharingProcessFragment
processFragment.onBackPressed()
processFragment.activity?.onBackPressedDispatcher?.onBackPressed()
}
}
}
@@ -1,74 +1,98 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2023 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.fragment
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.nextcloud.android.lib.resources.groupfolders.Groupfolder
import com.nextcloud.test.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
class GroupfolderListFragmentIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
lateinit var activity: TestActivity
private val testClassName = "com.owncloud.android.ui.fragment.GroupfolderListFragmentIT"
@Before
fun before() {
activity = testActivityRule.launchActivity(null)
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun showGroupfolder() {
val sut = GroupfolderListFragment()
activity.addFragment(sut)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
shortSleep() // to let async task finish
val sut = GroupfolderListFragment()
activity.addFragment(sut)
activity.runOnUiThread {
sut.setAdapter(null)
sut.setData(
mapOf(
Pair("2", Groupfolder(2, "/subfolder/group"))
)
)
sut.setAdapter(null)
sut.setData(
mapOf(
Pair("2", Groupfolder(2, "/subfolder/group"))
)
)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showGroupfolder", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(activity, screenShotName)
}
}
}
waitForIdleSync()
shortSleep()
screenshot(activity)
}
@Test
@UiThread
@ScreenshotTest
fun showGroupfolders() {
val sut = GroupfolderListFragment()
activity.addFragment(sut)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
shortSleep() // to let async task finish
val sut = GroupfolderListFragment()
activity.addFragment(sut)
activity.runOnUiThread {
sut.setAdapter(null)
sut.setData(
mapOf(
Pair("1", Groupfolder(1, "/test/")),
Pair("2", Groupfolder(2, "/subfolder/group"))
)
)
sut.setAdapter(null)
sut.setData(
mapOf(
Pair("1", Groupfolder(1, "/test/")),
Pair("2", Groupfolder(2, "/subfolder/group"))
)
)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showGroupfolders", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(activity, screenShotName)
}
}
}
waitForIdleSync()
shortSleep()
screenshot(activity)
}
}
@@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
@@ -8,392 +9,429 @@
*/
package com.owncloud.android.ui.fragment
import androidx.test.espresso.intent.rule.IntentsTestRule
import com.nextcloud.test.GrantStoragePermissionRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.nextcloud.test.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.resources.shares.ShareType
import com.owncloud.android.lib.resources.shares.ShareeUser
import com.owncloud.android.lib.resources.tags.Tag
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.MimeType
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Assert
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
class OCFileListFragmentStaticServerIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
private val testClassName = "com.owncloud.android.ui.fragment.OCFileListFragmentStaticServerIT"
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@get:Rule
val permissionRule = GrantStoragePermissionRule.grant()
var storagePermissionRule: TestRule = grant()
@Test
@UiThread
@ScreenshotTest
@Suppress("MagicNumber")
fun showFiles() {
val sut = testActivityRule.launchActivity(null)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
OCFile("/1.png").apply {
remoteId = "00000001"
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
OCFile("/1.png").apply {
remoteId = "00000001"
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/image.png").apply {
remoteId = "00000002"
mimeType = "image/png"
isPreviewAvailable = false
fileLength = 3072000
modificationTimestamp = 746443755000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
tags = listOf(Tag("", "Top secret", null))
sut.storageManager.saveFile(this)
}
OCFile("/live photo.png").apply {
remoteId = "00000003"
mimeType = "image/png"
isPreviewAvailable = false
fileLength = 3072000
modificationTimestamp = 746443755000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
setLivePhoto("/video.mov")
sut.storageManager.saveFile(this)
}
OCFile("/video.mp4").apply {
remoteId = "00000004"
mimeType = "video/mp4"
isPreviewAvailable = false
fileLength = 12092000
modificationTimestamp = 746143952000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
tags = listOf(Tag("", "Confidential", null), Tag("", "+5", null))
sut.storageManager.saveFile(this)
}
sut.addFragment(OCFileListFragment())
val fragment = (sut.fragment as OCFileListFragment)
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
fragment.listDirectory(root, false, false)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showFiles", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
OCFile("/image.png").apply {
remoteId = "00000002"
mimeType = "image/png"
isPreviewAvailable = false
fileLength = 3072000
modificationTimestamp = 746443755000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
tags = listOf(Tag("", "Top secret", null))
sut.storageManager.saveFile(this)
}
OCFile("/live photo.png").apply {
remoteId = "00000003"
mimeType = "image/png"
isPreviewAvailable = false
fileLength = 3072000
modificationTimestamp = 746443755000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
setLivePhoto("/video.mov")
sut.storageManager.saveFile(this)
}
OCFile("/video.mp4").apply {
remoteId = "00000004"
mimeType = "video/mp4"
isPreviewAvailable = false
fileLength = 12092000
modificationTimestamp = 746143952000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
tags = listOf(Tag("", "Confidential", null), Tag("", "+5", null))
sut.storageManager.saveFile(this)
}
sut.addFragment(OCFileListFragment())
val fragment = (sut.fragment as OCFileListFragment)
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
shortSleep()
sut.runOnUiThread { fragment.listDirectory(root, false, false) }
waitForIdleSync()
screenshot(sut)
}
/**
* Use same values as {@link FileDetailSharingFragmentIT listSharesFileAllShareTypes }
*/
@Test
@UiThread
@ScreenshotTest
fun showSharedFiles() {
val sut = testActivityRule.launchActivity(null)
val fragment = OCFileListFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
OCFile("/sharedToUser.jpg").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("Admin", "Server Admin", ShareType.USER))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
val fragment = OCFileListFragment()
OCFile("/sharedToUser.jpg").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("Admin", "Server Admin", ShareType.USER))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToGroup.jpg").apply {
remoteId = "00000002"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("group", "Group", ShareType.GROUP))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToEmail.jpg").apply {
remoteId = "00000003"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees =
listOf(
ShareeUser("[email protected]", "[email protected]", ShareType.EMAIL)
)
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/publicLink.jpg").apply {
remoteId = "00000004"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedViaLink = true
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToFederatedUser.jpg").apply {
remoteId = "00000005"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(
ShareeUser(
"[email protected]",
"[email protected] (remote)",
ShareType.FEDERATED
)
)
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToPersonalCircle.jpg").apply {
remoteId = "00000006"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("circle", "Circle (Personal circle)", ShareType.CIRCLE))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToUserRoom.jpg").apply {
remoteId = "00000007"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("Conversation", "Admin", ShareType.ROOM))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToGroupRoom.jpg").apply {
remoteId = "00000008"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("Conversation", "Meeting", ShareType.ROOM))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToUsers.jpg").apply {
remoteId = "00000009"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(
ShareeUser("Admin", "Server Admin", ShareType.USER),
ShareeUser("User", "User", ShareType.USER),
ShareeUser("Christine", "Christine Scott", ShareType.USER)
)
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/notShared.jpg").apply {
remoteId = "000000010"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/Foo%e2%80%aedm.exe").apply {
remoteId = "000000011"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
sut.addFragment(fragment)
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
fragment.listDirectory(root, false, false)
fragment.adapter.setShowShareAvatar(true)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showSharedFiles", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
OCFile("/sharedToGroup.jpg").apply {
remoteId = "00000002"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("group", "Group", ShareType.GROUP))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToEmail.jpg").apply {
remoteId = "00000003"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("[email protected]", "[email protected]", ShareType.EMAIL))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/publicLink.jpg").apply {
remoteId = "00000004"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedViaLink = true
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToFederatedUser.jpg").apply {
remoteId = "00000005"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(
ShareeUser("[email protected]", "[email protected] (remote)", ShareType.FEDERATED)
)
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToPersonalCircle.jpg").apply {
remoteId = "00000006"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("circle", "Circle (Personal circle)", ShareType.CIRCLE))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
// as we cannot distinguish circle types, we do not need them right now
// OCFile("/sharedToPublicCircle.jpg").apply {
// parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
// isSharedWithSharee = true
// sharees = listOf(ShareeUser("circle", "Circle (Public circle)", ShareType.CIRCLE))
// modificationTimestamp = 1000
// sut.storageManager.saveFile(this)
// }
//
// OCFile("/sharedToClosedCircle.jpg").apply {
// parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
// isSharedWithSharee = true
// sharees = listOf(ShareeUser("circle", "Circle (Closed circle)", ShareType.CIRCLE))
// modificationTimestamp = 1000
// sut.storageManager.saveFile(this)
// }
//
// OCFile("/sharedToSecretCircle.jpg").apply {
// parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
// isSharedWithSharee = true
// sharees = listOf(ShareeUser("circle", "Circle (Secret circle)", ShareType.CIRCLE))
// modificationTimestamp = 1000
// sut.storageManager.saveFile(this)
// }
OCFile("/sharedToUserRoom.jpg").apply {
remoteId = "00000007"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("Conversation", "Admin", ShareType.ROOM))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToGroupRoom.jpg").apply {
remoteId = "00000008"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(ShareeUser("Conversation", "Meeting", ShareType.ROOM))
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/sharedToUsers.jpg").apply {
remoteId = "00000009"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
isSharedWithSharee = true
sharees = listOf(
ShareeUser("Admin", "Server Admin", ShareType.USER),
ShareeUser("User", "User", ShareType.USER),
ShareeUser("Christine", "Christine Scott", ShareType.USER)
)
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
OCFile("/notShared.jpg").apply {
remoteId = "000000010"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
modificationTimestamp = 1000
sut.storageManager.saveFile(this)
}
sut.addFragment(fragment)
shortSleep()
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
sut.runOnUiThread {
fragment.listDirectory(root, false, false)
fragment.adapter.setShowShareAvatar(true)
}
waitForIdleSync()
shortSleep()
shortSleep()
shortSleep()
screenshot(sut)
}
/**
* Use same values as {@link FileDetailSharingFragmentIT listSharesFileAllShareTypes }
*/
@Test
@UiThread
@ScreenshotTest
fun showFolderTypes() {
val sut = testActivityRule.launchActivity(null)
val fragment = OCFileListFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
OCFile("/normal/").apply {
remoteId = "00000001"
mimeType = MimeType.DIRECTORY
modificationTimestamp = 1624003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
val fragment = OCFileListFragment()
OCFile("/normal/").apply {
remoteId = "00000001"
mimeType = MimeType.DIRECTORY
modificationTimestamp = 1624003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/sharedViaLink/").apply {
remoteId = "00000002"
mimeType = MimeType.DIRECTORY
isSharedViaLink = true
modificationTimestamp = 1619003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/share/").apply {
remoteId = "00000003"
mimeType = MimeType.DIRECTORY
isSharedWithSharee = true
modificationTimestamp = 1619303571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/groupFolder/").apply {
remoteId = "00000004"
mimeType = MimeType.DIRECTORY
modificationTimestamp = 1615003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
permissions += "M"
sut.storageManager.saveFile(this)
}
OCFile("/encrypted/").apply {
remoteId = "00000005"
mimeType = MimeType.DIRECTORY
isEncrypted = true
decryptedRemotePath = "/encrypted/"
modificationTimestamp = 1614003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/locked/").apply {
remoteId = "00000006"
mimeType = MimeType.DIRECTORY
isLocked = true
decryptedRemotePath = "/locked/"
modificationTimestamp = 1613003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/offlineOperation/").apply {
mimeType = MimeType.DIRECTORY
decryptedRemotePath = "/offlineOperation/"
modificationTimestamp = System.currentTimeMillis()
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
sut.addFragment(fragment)
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
fragment.listDirectory(root, false, false)
fragment.adapter.setShowShareAvatar(true)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showFolderTypes", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
OCFile("/sharedViaLink/").apply {
remoteId = "00000002"
mimeType = MimeType.DIRECTORY
isSharedViaLink = true
modificationTimestamp = 1619003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/share/").apply {
remoteId = "00000003"
mimeType = MimeType.DIRECTORY
isSharedWithSharee = true
modificationTimestamp = 1619303571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/groupFolder/").apply {
remoteId = "00000004"
mimeType = MimeType.DIRECTORY
modificationTimestamp = 1615003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
permissions += "M"
sut.storageManager.saveFile(this)
}
OCFile("/encrypted/").apply {
remoteId = "00000005"
mimeType = MimeType.DIRECTORY
isEncrypted = true
decryptedRemotePath = "/encrypted/"
modificationTimestamp = 1614003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/locked/").apply {
remoteId = "00000006"
mimeType = MimeType.DIRECTORY
isLocked = true
decryptedRemotePath = "/locked/"
modificationTimestamp = 1613003571000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
OCFile("/offlineOperation/").apply {
mimeType = MimeType.DIRECTORY
decryptedRemotePath = "/offlineOperation/"
modificationTimestamp = System.currentTimeMillis()
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
sut.storageManager.saveFile(this)
}
sut.addFragment(fragment)
shortSleep()
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
sut.runOnUiThread {
fragment.listDirectory(root, false, false)
fragment.adapter.setShowShareAvatar(true)
}
waitForIdleSync()
shortSleep()
shortSleep()
shortSleep()
screenshot(sut)
}
@Test
@UiThread
@ScreenshotTest
@Suppress("MagicNumber")
fun showRichWorkspace() {
val sut = testActivityRule.launchActivity(null)
val fragment = OCFileListFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val folder = OCFile("/test/")
folder.setFolder()
sut.storageManager.saveFile(folder)
val fragment = OCFileListFragment()
val imageFile = OCFile("/test/image.png").apply {
remoteId = "00000001"
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/test/").fileId
storagePath = getFile("java.md").absolutePath
val folder = OCFile("/test/")
folder.setFolder()
sut.storageManager.saveFile(folder)
val imageFile = OCFile("/test/image.png").apply {
remoteId = "00000001"
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955000
parentId = sut.storageManager.getFileByEncryptedRemotePath("/test/").fileId
storagePath = getFile("java.md").absolutePath
}
sut.storageManager.saveFile(imageFile)
sut.addFragment(fragment)
val testFolder: OCFile = sut.storageManager.getFileByEncryptedRemotePath("/test/")
testFolder.richWorkspace = getFile("java.md").readText()
fragment.listDirectory(testFolder, false, false)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showRichWorkspace", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
sut.storageManager.saveFile(imageFile)
sut.addFragment(fragment)
val testFolder: OCFile = sut.storageManager.getFileByEncryptedRemotePath("/test/")
testFolder.richWorkspace = getFile("java.md").readText()
sut.runOnUiThread { fragment.listDirectory(testFolder, false, false) }
shortSleep()
screenshot(sut)
}
@Test
@UiThread
fun shouldShowHeader() {
val activity = testActivityRule.launchActivity(null)
val sut = OCFileListFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = OCFileListFragment()
val folder = OCFile("/test/").apply {
remoteId = "000001"
setFolder()
}
activity.storageManager.saveFile(folder)
activity.addFragment(sut)
val testFolder: OCFile = activity.storageManager.getFileByEncryptedRemotePath("/test/")
EspressoIdlingResource.decrement()
val folder = OCFile("/test/").apply {
remoteId = "000001"
setFolder()
}
// richWorkspace is not set
Assert.assertFalse(sut.adapter.shouldShowHeader())
activity.storageManager.saveFile(folder)
EspressoIdlingResource.increment()
testFolder.richWorkspace = " "
activity.storageManager.saveFile(testFolder)
sut.adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
EspressoIdlingResource.decrement()
activity.addFragment(sut)
val testFolder: OCFile = activity.storageManager.getFileByEncryptedRemotePath("/test/")
Assert.assertFalse(sut.adapter.shouldShowHeader())
activity.runOnUiThread {
// richWorkspace is not set
Assert.assertFalse(sut.adapter.shouldShowHeader())
EspressoIdlingResource.increment()
testFolder.richWorkspace = null
activity.storageManager.saveFile(testFolder)
sut.adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
EspressoIdlingResource.decrement()
Assert.assertFalse(sut.adapter.shouldShowHeader())
testFolder.richWorkspace = " "
activity.storageManager.saveFile(testFolder)
sut.adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
Assert.assertFalse(sut.adapter.shouldShowHeader())
EspressoIdlingResource.increment()
testFolder.richWorkspace = "1"
activity.storageManager.saveFile(testFolder)
sut.adapter.setCurrentDirectory(testFolder)
EspressoIdlingResource.decrement()
testFolder.richWorkspace = null
activity.storageManager.saveFile(testFolder)
sut.adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
Assert.assertFalse(sut.adapter.shouldShowHeader())
testFolder.richWorkspace = "1"
activity.storageManager.saveFile(testFolder)
sut.adapter.setCurrentDirectory(testFolder)
Assert.assertTrue(sut.adapter.shouldShowHeader())
Assert.assertTrue(sut.adapter.shouldShowHeader())
}
}
}
}
}
@@ -8,163 +8,178 @@
package com.owncloud.android.ui.fragment
import android.view.View
import androidx.test.espresso.intent.rule.IntentsTestRule
import com.nextcloud.test.GrantStoragePermissionRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.nextcloud.test.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.resources.shares.OCShare
import com.owncloud.android.lib.resources.shares.ShareType
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
internal class SharedListFragmentIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
@get:Rule
val permissionRule = GrantStoragePermissionRule.grant()
lateinit var sut: TestActivity
private val testClassName = "com.owncloud.android.ui.fragment.SharedListFragmentIT"
@Before
fun before() {
sut = testActivityRule.launchActivity(null)
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@get:Rule
var storagePermissionRule: TestRule = grant()
@Test
@UiThread
@ScreenshotTest
fun showSharedFiles() {
val fragment = SharedListFragment()
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
EspressoIdlingResource.increment()
val file = OCFile("/shared to admin.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val fragment = SharedListFragment()
val file1 = OCFile("/shared to group.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file = OCFile("/shared to admin.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file2 = OCFile("/shared via public link.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file1 = OCFile("/shared to group.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file3 = OCFile("/shared to personal circle.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file2 = OCFile("/shared via public link.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file4 = OCFile("/shared to talk.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val file3 = OCFile("/shared to personal circle.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
val shares = listOf(
OCShare(file.decryptedRemotePath).apply {
remoteId = 1
shareType = ShareType.USER
sharedWithDisplayName = "Admin"
permissions = OCShare.MAXIMUM_PERMISSIONS_FOR_FILE
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
val file4 = OCFile("/shared to talk.png").apply {
remoteId = "00000001"
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
mimeType = "image/png"
fileLength = 1024000
modificationTimestamp = 1188206955
permissions = OCFile.PERMISSION_CAN_RESHARE
sut.storageManager.saveFile(this)
}
OCShare(file1.decryptedRemotePath).apply {
remoteId = 2
shareType = ShareType.GROUP
sharedWithDisplayName = "Group"
permissions = OCShare.MAXIMUM_PERMISSIONS_FOR_FILE
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
val shares = listOf(
OCShare(file.decryptedRemotePath).apply {
remoteId = 1
shareType = ShareType.USER
sharedWithDisplayName = "Admin"
permissions = OCShare.MAXIMUM_PERMISSIONS_FOR_FILE
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
OCShare(file2.decryptedRemotePath).apply {
remoteId = 3
shareType = ShareType.PUBLIC_LINK
label = "Customer"
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
OCShare(file1.decryptedRemotePath).apply {
remoteId = 2
shareType = ShareType.GROUP
sharedWithDisplayName = "Group"
permissions = OCShare.MAXIMUM_PERMISSIONS_FOR_FILE
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
OCShare(file3.decryptedRemotePath).apply {
remoteId = 4
shareType = ShareType.CIRCLE
sharedWithDisplayName = "Personal circle"
permissions = OCShare.SHARE_PERMISSION_FLAG
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
OCShare(file2.decryptedRemotePath).apply {
remoteId = 3
shareType = ShareType.PUBLIC_LINK
label = "Customer"
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
OCShare(file4.decryptedRemotePath).apply {
remoteId = 11
shareType = ShareType.ROOM
sharedWithDisplayName = "Admin"
permissions = OCShare.SHARE_PERMISSION_FLAG
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
OCShare(file3.decryptedRemotePath).apply {
remoteId = 4
shareType = ShareType.CIRCLE
sharedWithDisplayName = "Personal circle"
permissions = OCShare.SHARE_PERMISSION_FLAG
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
},
OCShare(file4.decryptedRemotePath).apply {
remoteId = 11
shareType = ShareType.ROOM
sharedWithDisplayName = "Admin"
permissions = OCShare.SHARE_PERMISSION_FLAG
userId = getUserId(user)
sharedDate = 1188206955
mimetype = "image/png"
sut.storageManager.saveShare(this)
}
)
sut.addFragment(fragment)
fragment.isLoading = false
fragment.mEmptyListContainer?.visibility = View.GONE
fragment.adapter.setData(
shares,
SearchType.SHARED_FILTER,
storageManager,
null,
true
)
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showSharedFiles", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
)
sut.addFragment(fragment)
shortSleep()
sut.runOnUiThread {
fragment.isLoading = false
fragment.mEmptyListContainer?.visibility = View.GONE
fragment.adapter.setData(
shares,
SearchType.SHARED_FILTER,
storageManager,
null,
true
)
}
waitForIdleSync()
shortSleep()
shortSleep()
shortSleep()
screenshot(sut)
}
}
@@ -1,86 +1,109 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.fragment
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.common.SearchResultEntry
import com.owncloud.android.ui.unifiedsearch.UnifiedSearchSection
import com.owncloud.android.ui.unifiedsearch.UnifiedSearchViewModel
import org.junit.Rule
import com.owncloud.android.utils.EspressoIdlingResource
import org.junit.After
import org.junit.Before
import org.junit.Test
import java.io.File
class UnifiedSearchFragmentIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
@Test
fun showSearchResult() {
val activity = testActivityRule.launchActivity(null)
val sut = UnifiedSearchFragment.newInstance(null, null)
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
activity.addFragment(sut)
shortSleep()
UiThreadStatement.runOnUiThread {
sut.onSearchResultChanged(
listOf(
UnifiedSearchSection(
providerID = "files",
name = "Files",
entries = listOf(
SearchResultEntry(
"thumbnailUrl",
"Test",
"in Files",
"http://localhost/nc/index.php/apps/files/?dir=/Files&scrollto=Test",
"icon",
false
)
),
hasMoreResults = false
)
)
)
}
shortSleep()
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
fun showSearchResult() {
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val sut = UnifiedSearchFragment.newInstance(null, null, "/")
activity.addFragment(sut)
sut.onSearchResultChanged(
listOf(
UnifiedSearchSection(
providerID = "files",
name = "Files",
entries = listOf(
SearchResultEntry(
"thumbnailUrl",
"Test",
"in Files",
"http://localhost/nc/index.php/apps/files/?dir=/Files&scrollto=Test",
"icon",
false
)
),
hasMoreResults = false
)
)
)
EspressoIdlingResource.decrement()
onView(isRoot()).check(matches(isDisplayed()))
}
}
}
}
@Test
@UiThread
fun search() {
val activity = testActivityRule.launchActivity(null) as TestActivity
val sut = UnifiedSearchFragment.newInstance(null, null)
val testViewModel = UnifiedSearchViewModel(activity.application)
testViewModel.setConnectivityService(activity.connectivityServiceMock)
val localRepository = UnifiedSearchFakeRepository()
testViewModel.setRepository(localRepository)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val ocFile = OCFile("/folder/test1.txt").apply {
storagePath = "/sdcard/1.txt"
storageManager.saveFile(this)
val sut = UnifiedSearchFragment.newInstance(null, null, "/")
val testViewModel = UnifiedSearchViewModel(activity.application)
testViewModel.setConnectivityService(activity.connectivityServiceMock)
val localRepository = UnifiedSearchFakeRepository()
testViewModel.setRepository(localRepository)
val ocFile = OCFile("/folder/test1.txt").apply {
storagePath = "/sdcard/1.txt"
storageManager.saveFile(this)
}
File(ocFile.storagePath).createNewFile()
activity.addFragment(sut)
sut.setViewModel(testViewModel)
sut.vm.setQuery("test")
sut.vm.initialQuery()
EspressoIdlingResource.decrement()
onView(isRoot()).check(matches(isDisplayed()))
}
}
}
File(ocFile.storagePath).createNewFile()
activity.addFragment(sut)
shortSleep()
UiThreadStatement.runOnUiThread {
sut.setViewModel(testViewModel)
sut.vm.setQuery("test")
sut.vm.initialQuery()
}
shortSleep()
}
}
@@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <[email protected]>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
@@ -8,36 +9,55 @@
package com.owncloud.android.ui.preview
import android.content.Intent
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.AbstractIT
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class PreviewBitmapScreenshotIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.preview.PreviewBitmapScreenshotIT"
companion object {
private const val PNG_FILE_ASSET = "imageFile.png"
}
@get:Rule
val testActivityRule = IntentsTestRule(PreviewBitmapActivity::class.java, true, false)
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun showBitmap() {
val pngFile = getFile(PNG_FILE_ASSET)
val activity = testActivityRule.launchActivity(
Intent().putExtra(
PreviewBitmapActivity.EXTRA_BITMAP_PATH,
pngFile.absolutePath
)
val intent = Intent(targetContext, PreviewBitmapActivity::class.java).putExtra(
PreviewBitmapActivity.EXTRA_BITMAP_PATH,
pngFile.absolutePath
)
shortSleep()
waitForIdleSync()
screenshot(activity)
launchActivity<PreviewBitmapActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
onIdleSync {
val screenShotName = createName(testClassName + "_" + "showBitmap", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
}
}
@@ -1,60 +0,0 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Tobias Kaminsky <[email protected]>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.preview
import androidx.test.espresso.intent.rule.IntentsTestRule
import com.nextcloud.test.TestActivity
import com.owncloud.android.AbstractIT
import org.junit.Rule
class PreviewImageFragmentIT : AbstractIT() {
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
// Disabled for now due to strange failing when using entire test suite
// Findings so far:
// PreviewImageFragmentIT runs fine when only running this
// running it in whole test suite fails
// manually tried to execute LoadBitmapTask, but this does not start "doInBackground", but only creates class
// @Test
// @ScreenshotTest
// fun corruptImage() {
// val activity = testActivityRule.launchActivity(null)
//
// val ocFile = OCFile("/test.png")
// val sut = PreviewImageFragment.newInstance(ocFile, true, false)
//
// activity.addFragment(sut)
//
// while (!sut.lifecycle.currentState.isAtLeast(Lifecycle.State.RESUMED)) {
// shortSleep()
// }
//
// screenshot(activity)
// }
//
// @Test
// @ScreenshotTest
// fun validImage() {
// val activity = testActivityRule.launchActivity(null)
//
// val ocFile = OCFile("/test.png")
// ocFile.storagePath = getFile("imageFile.png").absolutePath
//
// val sut = PreviewImageFragment.newInstance(ocFile, true, false)
//
// activity.addFragment(sut)
//
// while (!sut.lifecycle.currentState.isAtLeast(Lifecycle.State.RESUMED)) {
// shortSleep()
// }
//
// screenshot(activity)
// }
}
@@ -1,54 +1,70 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <[email protected]>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.owncloud.android.ui.preview.pdf
import androidx.lifecycle.Lifecycle
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.annotation.UiThread
import androidx.test.core.app.launchActivity
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
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.TestActivity
import com.owncloud.android.AbstractIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.utils.ScreenshotTest
import org.junit.Rule
import org.junit.After
import org.junit.Before
import org.junit.Test
class PreviewPdfFragmentScreenshotIT : AbstractIT() {
private val testClassName = "com.owncloud.android.ui.preview.pdf.PreviewPdfFragmentScreenshotIT"
companion object {
private const val PDF_FILE_ASSET = "test.pdf"
}
@get:Rule
val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false)
@Before
fun registerIdlingResource() {
IdlingRegistry.getInstance().register(EspressoIdlingResource.countingIdlingResource)
}
@After
fun unregisterIdlingResource() {
IdlingRegistry.getInstance().unregister(EspressoIdlingResource.countingIdlingResource)
}
@Test
@UiThread
@ScreenshotTest
fun showPdf() {
val activity = testActivityRule.launchActivity(null)
launchActivity<TestActivity>().use { scenario ->
scenario.onActivity { activity ->
onIdleSync {
EspressoIdlingResource.increment()
val pdfFile = getFile(PDF_FILE_ASSET)
val ocFile = OCFile("/test.pdf").apply {
storagePath = pdfFile.absolutePath
}
val pdfFile = getFile(PDF_FILE_ASSET)
val ocFile = OCFile("/test.pdf").apply {
storagePath = pdfFile.absolutePath
val sut = PreviewPdfFragment.newInstance(ocFile)
activity.addFragment(sut)
sut.dismissSnack()
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "showPdf", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(activity, screenShotName)
}
}
}
val sut = PreviewPdfFragment.newInstance(ocFile)
activity.addFragment(sut)
while (!sut.lifecycle.currentState.isAtLeast(Lifecycle.State.RESUMED)) {
shortSleep()
}
activity.runOnUiThread {
sut.dismissSnack()
}
shortSleep()
waitForIdleSync()
screenshot(activity)
}
}
@@ -20,6 +20,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isRoot
import com.owncloud.android.utils.EspressoIdlingResource
import com.owncloud.android.AbstractIT
import com.owncloud.android.MainApp
import com.owncloud.android.extensions.launchAndCapture
import com.owncloud.android.lib.common.accounts.AccountUtils
import com.owncloud.android.utils.ScreenshotTest
import org.junit.After
@@ -71,84 +72,50 @@ class TrashbinActivityIT : AbstractIT() {
@UiThread
@ScreenshotTest
fun files() {
launchActivity<TrashbinActivity>().use { scenario ->
scenario.onActivity { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.FILES)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
onIdleSync {
EspressoIdlingResource.increment()
sut.loadFolder(
onComplete = { EspressoIdlingResource.decrement() },
onError = { EspressoIdlingResource.decrement() }
)
onView(isRoot()).check(matches(isDisplayed()))
val screenShotName = createName(testClassName + "_" + "files", "")
screenshotViaName(sut, screenShotName)
}
}
}
launchAndCapture<TrashbinActivity>(testClassName, "files", before = { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.FILES)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
sut.loadFolder(
onComplete = { EspressoIdlingResource.decrement() },
onError = { EspressoIdlingResource.decrement() }
)
})
}
@Test
@UiThread
@ScreenshotTest
fun empty() {
launchActivity<TrashbinActivity>().use { scenario ->
scenario.onActivity { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
onIdleSync {
EspressoIdlingResource.increment()
sut.loadFolder(
onComplete = { EspressoIdlingResource.decrement() },
onError = { EspressoIdlingResource.decrement() }
)
onView(isRoot()).check(matches(isDisplayed()))
val screenShotName = createName(testClassName + "_" + "empty", "")
screenshotViaName(sut, screenShotName)
}
}
}
launchAndCapture<TrashbinActivity>(testClassName, "empty", before = { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
sut.loadFolder(
onComplete = { EspressoIdlingResource.decrement() },
onError = { EspressoIdlingResource.decrement() }
)
})
}
@Test
@UiThread
@ScreenshotTest
fun loading() {
launchActivity<TrashbinActivity>().use { scenario ->
scenario.onActivity { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
onIdleSync {
EspressoIdlingResource.increment()
sut.showInitialLoading()
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "loading", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
launchAndCapture<TrashbinActivity>(testClassName, "loading", before = { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
sut.showInitialLoading()
})
}
@Test
@UiThread
@ScreenshotTest
fun normalUser() {
launchActivity<TrashbinActivity>().use { scenario ->
scenario.onActivity { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
onIdleSync {
EspressoIdlingResource.increment()
sut.showUser()
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "normalUser", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
launchAndCapture<TrashbinActivity>(testClassName, "normalUser", before = { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
sut.showUser()
})
}
@Test
@@ -167,19 +134,10 @@ class TrashbinActivityIT : AbstractIT() {
putExtra(Intent.EXTRA_USER, "differentUser@https://nextcloud.localhost")
}
launchActivity<TrashbinActivity>(intent).use { scenario ->
scenario.onActivity { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
onIdleSync {
EspressoIdlingResource.increment()
sut.showUser()
EspressoIdlingResource.decrement()
val screenShotName = createName(testClassName + "_" + "differentUser", "")
onView(isRoot()).check(matches(isDisplayed()))
screenshotViaName(sut, screenShotName)
}
}
}
launchAndCapture<TrashbinActivity>(testClassName, "differentUser", intent = intent, before = { sut ->
val trashbinRepository = TrashbinLocalRepository(TestCase.EMPTY)
sut.trashbinPresenter = TrashbinPresenter(trashbinRepository, sut)
sut.showUser()
})
}
}
@@ -25,6 +25,7 @@ import com.owncloud.android.datamodel.e2e.v1.decrypted.Encrypted;
import com.owncloud.android.datamodel.e2e.v1.encrypted.EncryptedFolderMetadataFileV1;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.e2ee.CsrHelper;
import com.owncloud.android.utils.crypto.CryptoHelper;
import com.owncloud.android.utils.EncryptionUtils;
import org.junit.Assert;
@@ -44,7 +45,6 @@ import java.security.PrivateKey;
import java.security.SecureRandom;
import java.security.interfaces.RSAPrivateCrtKey;
import java.security.interfaces.RSAPublicKey;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -57,7 +57,6 @@ import javax.crypto.Cipher;
import static com.owncloud.android.utils.EncryptionUtils.decodeStringToBase64Bytes;
import static com.owncloud.android.utils.EncryptionUtils.decryptFile;
import static com.owncloud.android.utils.EncryptionUtils.decryptFolderMetaData;
import static com.owncloud.android.utils.EncryptionUtils.decryptPrivateKey;
import static com.owncloud.android.utils.EncryptionUtils.decryptStringAsymmetric;
import static com.owncloud.android.utils.EncryptionUtils.decryptStringSymmetric;
import static com.owncloud.android.utils.EncryptionUtils.deserializeJSON;
@@ -262,13 +261,8 @@ public class EncryptionTestIT extends AbstractIT {
byte[] privateKeyBytes = privateKey.getEncoded();
String privateKeyString = encodeBytesToBase64String(privateKeyBytes);
String encryptedString;
if (new Random().nextBoolean()) {
encryptedString = EncryptionUtils.encryptPrivateKey(privateKeyString, keyPhrase);
} else {
encryptedString = EncryptionUtils.encryptPrivateKeyOld(privateKeyString, keyPhrase);
}
String decryptedString = decryptPrivateKey(encryptedString, keyPhrase);
String encryptedString = CryptoHelper.INSTANCE.encryptPrivateKey(privateKeyString, keyPhrase);
String decryptedString = CryptoHelper.INSTANCE.decryptPrivateKey(encryptedString, keyPhrase);
assertEquals(privateKeyString, decryptedString);
}
@@ -30,8 +30,6 @@ class CapabilityUtilsIT : AbstractIT() {
assertTrue(test(NextcloudVersion.nextcloud_22))
assertTrue(test(NextcloudVersion.nextcloud_21))
assertTrue(test(OwnCloudVersion.nextcloud_20))
assertTrue(test(OwnCloudVersion.nextcloud_19))
assertTrue(test(OwnCloudVersion.nextcloud_18))
}
private fun test(version: OwnCloudVersion): Boolean =
@@ -44,6 +44,7 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyFactory;
@@ -96,7 +97,11 @@ public final class PushUtils {
if (!new File(privateKeyPath).exists() && !new File(publicKeyPath).exists()) {
try {
if (!keyPathFile.exists()) {
keyPathFile.mkdir();
try {
Files.createDirectory(keyPathFile.toPath());
} catch (IOException e) {
Log_OC.e(TAG, "Could not create directory: " + keyPathFile.getAbsolutePath(), e);
}
}
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(2048);
@@ -304,8 +309,12 @@ public final class PushUtils {
try {
if (!new File(path).exists()) {
File newFile = new File(path);
newFile.getParentFile().mkdirs();
newFile.createNewFile();
try {
Files.createDirectories(newFile.getParentFile().toPath());
} catch (IOException e) {
Log_OC.e(TAG, "Could not create directory: " + newFile.getParentFile(), e);
}
Files.createFile(newFile.toPath());
}
keyFileOutputStream = new FileOutputStream(path);
keyFileOutputStream.write(encoded);
+14 -3
View File
@@ -121,7 +121,7 @@
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:enableOnBackInvokedCallback="false"
android:enableOnBackInvokedCallback="true"
android:theme="@style/Theme.ownCloud.Toolbar"
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute"
@@ -269,9 +269,18 @@
android:exported="false"
tools:replace="android:exported" />
<receiver
android:name="com.nextcloud.client.jobs.offlineOperations.receiver.OfflineOperationReceiver"
android:exported="false" />
<receiver
android:name=".operations.upload.UploadFileBroadcastReceiver"
android:exported="false" />
<receiver
android:name="com.nextcloud.client.jobs.MediaFoldersDetectionWork$NotificationReceiver"
android:exported="false" />
<receiver
android:name="com.nextcloud.client.jobs.upload.FileUploadBroadcastReceiver"
android:exported="false" />
<receiver
android:name="com.nextcloud.client.jobs.NotificationWork$NotificationReceiver"
android:exported="false" />
@@ -344,6 +353,7 @@
<activity
android:name=".ui.activity.SettingsActivity"
android:exported="false"
android:enableOnBackInvokedCallback="false"
android:theme="@style/PreferenceTheme" />
<activity
android:name=".ui.preview.PreviewImageActivity"
@@ -575,6 +585,8 @@
</intent-filter>
</receiver>
<receiver android:name="com.nextcloud.client.jobs.folderDownload.FolderDownloadWorkerReceiver" android:exported="false" />
<activity
android:name=".ui.activity.CopyToClipboardActivity"
android:exported="false"
@@ -607,8 +619,7 @@
<activity
android:name=".ui.activity.ManageSpaceActivity"
android:exported="false"
android:label="@string/manage_space_title"
android:theme="@style/Theme.ownCloud" />
android:label="@string/manage_space_title" />
<service
android:name=".services.AccountManagerService"
@@ -17,7 +17,10 @@ import com.nextcloud.client.core.Clock
import com.nextcloud.client.core.ClockImpl
import com.nextcloud.client.database.dao.ArbitraryDataDao
import com.nextcloud.client.database.dao.FileDao
import com.nextcloud.client.database.dao.FileSystemDao
import com.nextcloud.client.database.dao.OfflineOperationDao
import com.nextcloud.client.database.dao.RecommendedFileDao
import com.nextcloud.client.database.dao.SyncedFolderDao
import com.nextcloud.client.database.dao.UploadDao
import com.nextcloud.client.database.entity.ArbitraryDataEntity
import com.nextcloud.client.database.entity.CapabilityEntity
@@ -25,6 +28,7 @@ import com.nextcloud.client.database.entity.ExternalLinkEntity
import com.nextcloud.client.database.entity.FileEntity
import com.nextcloud.client.database.entity.FilesystemEntity
import com.nextcloud.client.database.entity.OfflineOperationEntity
import com.nextcloud.client.database.entity.RecommendedFileEntity
import com.nextcloud.client.database.entity.ShareEntity
import com.nextcloud.client.database.entity.SyncedFolderEntity
import com.nextcloud.client.database.entity.UploadEntity
@@ -48,7 +52,8 @@ import com.owncloud.android.db.ProviderMeta
SyncedFolderEntity::class,
UploadEntity::class,
VirtualEntity::class,
OfflineOperationEntity::class
OfflineOperationEntity::class,
RecommendedFileEntity::class
],
version = ProviderMeta.DB_VERSION,
autoMigrations = [
@@ -75,7 +80,10 @@ import com.owncloud.android.db.ProviderMeta
AutoMigration(from = 86, to = 87, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class),
AutoMigration(from = 87, to = 88, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class),
// manual migration used for 88 to 89
AutoMigration(from = 89, to = 90)
AutoMigration(from = 89, to = 90),
AutoMigration(from = 90, to = 91),
AutoMigration(from = 91, to = 92),
AutoMigration(from = 92, to = 93, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class)
],
exportSchema = true
)
@@ -87,6 +95,9 @@ abstract class NextcloudDatabase : RoomDatabase() {
abstract fun fileDao(): FileDao
abstract fun offlineOperationDao(): OfflineOperationDao
abstract fun uploadDao(): UploadDao
abstract fun recommendedFileDao(): RecommendedFileDao
abstract fun fileSystemDao(): FileSystemDao
abstract fun syncedFolderDao(): SyncedFolderDao
companion object {
const val FIRST_ROOM_DB_VERSION = 65
@@ -9,11 +9,17 @@ package com.nextcloud.client.database.dao
import androidx.room.Dao
import androidx.room.Query
import androidx.room.Update
import com.nextcloud.client.database.entity.FileEntity
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta
import com.owncloud.android.utils.MimeType
@Suppress("TooManyFunctions")
@Dao
interface FileDao {
@Update
fun update(entity: FileEntity)
@Query("SELECT * FROM filelist WHERE _id = :id LIMIT 1")
fun getFileById(id: Long): FileEntity?
@@ -58,4 +64,51 @@ interface FileDao {
"ORDER BY internal_two_way_sync_timestamp DESC"
)
fun getInternalTwoWaySyncFolders(fileOwner: String): List<FileEntity>
@Query(
"""
SELECT *
FROM filelist
WHERE parent = :parentId
AND file_owner = :accountName
AND is_encrypted = 0
AND (content_type = :dirType OR content_type = :webdavType)
ORDER BY ${ProviderTableMeta.FILE_DEFAULT_SORT_ORDER}
"""
)
fun getNonEncryptedSubfolders(
parentId: Long,
accountName: String,
dirType: String = MimeType.DIRECTORY,
webdavType: String = MimeType.WEBDAV_FOLDER
): List<FileEntity>
@Query(
"""
SELECT *
FROM filelist
WHERE parent = :parentId
AND file_owner = :accountName
AND (content_type != :dirType AND content_type != :webdavType)
ORDER BY ${ProviderTableMeta.FILE_DEFAULT_SORT_ORDER}
"""
)
fun getSubfiles(
parentId: Long,
accountName: String,
dirType: String = MimeType.DIRECTORY,
webdavType: String = MimeType.WEBDAV_FOLDER
): List<FileEntity>
@Query(
"""
SELECT *
FROM filelist
WHERE file_owner = :fileOwner
AND parent = :parentId
AND ${ProviderTableMeta.FILE_NAME} LIKE '%' || :query || '%'
ORDER BY ${ProviderTableMeta.FILE_DEFAULT_SORT_ORDER}
"""
)
fun searchFilesInFolder(parentId: Long, fileOwner: String, query: String): List<FileEntity>
}
@@ -0,0 +1,40 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2025 Alper Ozturk <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.database.dao
import androidx.room.Dao
import androidx.room.Query
import com.nextcloud.client.database.entity.FilesystemEntity
import com.owncloud.android.db.ProviderMeta
@Dao
interface FileSystemDao {
@Query(
"""
SELECT *
FROM ${ProviderMeta.ProviderTableMeta.FILESYSTEM_TABLE_NAME}
WHERE ${ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID} = :syncedFolderId
AND ${ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD} = 0
AND ${ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER} = 0
AND ${ProviderMeta.ProviderTableMeta._ID} > :lastId
ORDER BY ${ProviderMeta.ProviderTableMeta._ID}
LIMIT :limit
"""
)
suspend fun getAutoUploadFilesEntities(syncedFolderId: String, limit: Int, lastId: Int): List<FilesystemEntity>
@Query(
"""
UPDATE ${ProviderMeta.ProviderTableMeta.FILESYSTEM_TABLE_NAME}
SET ${ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD} = 1
WHERE ${ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_LOCAL_PATH} = :localPath
AND ${ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID} = :syncedFolderId
"""
)
suspend fun markFileAsUploaded(localPath: String, syncedFolderId: String)
}
@@ -40,4 +40,7 @@ interface OfflineOperationDao {
@Query("DELETE FROM offline_operations")
fun clearTable()
@Query("DELETE FROM offline_operations WHERE _id = :id")
fun deleteById(id: Int)
}
Loaded 100 of 524 files, more files were not shown because too many files have changed in this diff. Show more