Compare commits

..
Author SHA1 Message Date
Tobias Kaminsky e8ca3b9a2a daily dev 20200724
fix crash on folder picker of synced folder
Fixed create folder due to new system (write on server is only performed upon unlock) added test case for remove file
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-07-24 03:41:10 +02:00
Tobias Kaminsky 3a5baf8a29 Merge remote-tracking branch 'origin/master' into dev 2020-07-24 03:32:06 +02:00
Andy Scherzinger 6fda99a633 Merge pull request #6522 from nextcloud/fabCrash
fix crash on folder picker of synced folder
2020-07-23 20:41:05 +02:00
tobiasKaminsky a3487adbdf fix crash on folder picker of synced folder
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-23 16:40:57 +02:00
Tobias Kaminsky 57919b63c7 Merge pull request #6514 from nextcloud/dependabot/gradle/androidx.work-work-runtime-ktx-2.4.0
Bump work-runtime-ktx from 2.3.4 to 2.4.0
2020-07-23 09:12:16 +02:00
dependabot-preview[bot] 5dfeb14412 Bump work-runtime-ktx from 2.3.4 to 2.4.0
Bumps work-runtime-ktx from 2.3.4 to 2.4.0.

Signed-off-by: dependabot-preview[bot] <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-23 08:20:30 +02:00
Tobias Kaminsky 10b5113299 Merge pull request #6515 from nextcloud/dependabot/gradle/androidx.work-work-runtime-2.4.0
Bump work-runtime from 2.3.4 to 2.4.0
2020-07-23 08:19:12 +02:00
dependabot-preview[bot] e0c15717f7 Bump work-runtime from 2.3.4 to 2.4.0
Bumps work-runtime from 2.3.4 to 2.4.0.

Signed-off-by: dependabot-preview[bot] <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-23 07:39:39 +02:00
Andy Scherzinger ed94dfb139 Merge pull request #6479 from nextcloud/encUpdate
Fixed create folder due to new system (write on server is only performed upon unlock)
2020-07-23 07:06:24 +02:00
Nextcloud bot 623a0e9c59 [tx-robot] updated from transifex 2020-07-23 03:34:13 +00:00
Tobias Kaminsky 4dc69acc6c daily dev 20200723
Add huawei upload
ETM internal strings that specify background jobs do not need to be translated
Update translations
2020-07-23 03:38:24 +02:00
Tobias Kaminsky 721f3824df Merge remote-tracking branch 'origin/master' into dev 2020-07-23 03:30:50 +02:00
tobiasKaminsky 907e9f0b26 Fixed create folder due to new system (write on server is only performed upon unlock)
added test case for remove file

Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-22 16:47:53 +02:00
Andy Scherzinger 1bf3425ab2 Merge pull request #6511 from nextcloud/huawei
Add huawei upload
2020-07-22 16:47:11 +02:00
tobiasKaminsky 933c61d0c9 Fixed create folder due to new system (write on server is only performed upon unlock)
added test case for remove file

Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-22 16:28:48 +02:00
tobiasKaminsky b39d3d4182 Add huawei upload
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-22 14:43:44 +02:00
Nextcloud bot d852aff107 [tx-robot] updated from transifex 2020-07-22 08:10:53 +00:00
Tobias Kaminsky 8e97d363fe Merge pull request #6503 from nextcloud/doNotTranslateETM
ETM internal strings that specify background jobs do not need to be translated
2020-07-22 07:11:15 +02:00
Nextcloud bot cb6ccbe650 [tx-robot] updated from transifex 2020-07-22 03:32:50 +00:00
Tobias Kaminsky 37fa5dbf6c daily dev 20200722
Warn on NC16 as outdated server
Test login on integrationTests
Update 3rd-party dependencies
2020-07-22 03:38:19 +02:00
Tobias Kaminsky 779b179025 Merge remote-tracking branch 'origin/master' into dev 2020-07-22 03:30:47 +02:00
tobiasKaminsky 121c6c1f23 Fixed create folder due to new system (write on server is only performed upon unlock)
added test case for remove file

Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-21 14:58:28 +02:00
tobiasKaminsky 4d040fba86 ETM internal strings that specify background jobs do not need to be translated
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-21 11:52:29 +02:00
Tobias Kaminsky 2dfde203c8 Merge pull request #6501 from nextcloud/bumpServerVersions
Warn on NC16 as outdated server
2020-07-21 11:47:11 +02:00
tobiasKaminsky f4684f15c1 Warn on NC16 as outdated server
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-21 08:35:18 +02:00
dependabot-preview[bot] 14cec7d029 Merge pull request #6498 from nextcloud/dependabot/gradle/net.bytebuddy-byte-buddy-android-1.10.13 2020-07-21 05:25:32 +00:00
Tobias Kaminsky 4fad4403fc Merge pull request #4146 from nextcloud/loginOnEmulator
Test login on integrationTests
2020-07-21 07:15:37 +02:00
dependabot-preview[bot] 95c2db021f Merge pull request #6497 from nextcloud/dependabot/gradle/org.mockito-mockito-android-3.4.4 2020-07-21 05:11:16 +00:00
Tobias Kaminsky 85632d6721 daily dev 20200721
upon encryption directly ask for mnemonic/setup
supprss lint warning
New download manager
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-07-21 03:40:56 +02:00
Tobias Kaminsky 1561f1415d Merge remote-tracking branch 'origin/master' into dev 2020-07-21 03:31:55 +02:00
dependabot-preview[bot] 8cf7ba60b5 Bump byte-buddy-android from 1.10.10 to 1.10.13
Bumps [byte-buddy-android](https://github.com/raphw/byte-buddy) from 1.10.10 to 1.10.13.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.10.10...byte-buddy-1.10.13)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-21 01:14:06 +00:00
dependabot-preview[bot] a8db8ef38f Bump mockito-android from 3.3.3 to 3.4.4
Bumps [mockito-android](https://github.com/mockito/mockito) from 3.3.3 to 3.4.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.3.3...v3.4.4)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-21 01:12:35 +00:00
Tobias Kaminsky 7861eb787e Merge pull request #6495 from nextcloud/directlyAskForE2E
upon encryption directly ask for mnemonic/setup
2020-07-20 17:13:26 +02:00
tobiasKaminsky 196b16d1d3 Test login on integrationTests
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 16:17:27 +02:00
Tobias Kaminsky 4f97110ab3 Merge pull request #6048 from nextcloud/ezaquarii/new-download-manager
New download manager
2020-07-20 12:52:49 +02:00
dependabot-preview[bot] 2150295acc Merge pull request #6493 from nextcloud/dependabot/gradle/daggerVersion-2.28.3 2020-07-20 10:42:44 +00:00
tobiasKaminsky de0467381c upon encryption directly ask for mnemonic/setup
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 12:33:58 +02:00
tobiasKaminsky 5a9d578018 supprss lint warning
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 12:28:50 +02:00
Chris Narkiewicz 75b9fa8551 New download manager
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-20 12:28:47 +02:00
dependabot-preview[bot] 72b9dd069a Bump daggerVersion from 2.28.1 to 2.28.3
Bumps `daggerVersion` from 2.28.1 to 2.28.3.

Updates `dagger` from 2.28.1 to 2.28.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.28.1...dagger-2.28.3)

Updates `dagger-android` from 2.28.1 to 2.28.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.28.1...dagger-2.28.3)

Updates `dagger-android-support` from 2.28.1 to 2.28.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.28.1...dagger-2.28.3)

Updates `dagger-compiler` from 2.28.1 to 2.28.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.28.1...dagger-2.28.3)

Updates `dagger-android-processor` from 2.28.1 to 2.28.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.28.1...dagger-2.28.3)

Signed-off-by: dependabot-preview[bot] <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 12:26:12 +02:00
Andy Scherzinger 51f48549c3 Merge pull request #6494 from nextcloud/dependabot/gradle/org.mockito-mockito-android-3.4.4
Bump mockito-android from 3.4.2 to 3.4.4
2020-07-20 11:53:50 +02:00
Andy Scherzinger 1b1823db0a Merge pull request #6492 from nextcloud/dependabot/gradle/org.mockito-mockito-core-3.4.4
Bump mockito-core from 3.4.2 to 3.4.4
2020-07-20 11:53:27 +02:00
dependabot-preview[bot] 65a2b895f5 Bump mockito-core from 3.4.2 to 3.4.4
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.4.2...v3.4.4)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-20 09:32:57 +00:00
dependabot-preview[bot] 81bb72344c Bump mockito-android from 3.4.2 to 3.4.4
Bumps [mockito-android](https://github.com/mockito/mockito) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.4.2...v3.4.4)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-20 09:32:06 +00:00
Tobias Kaminsky 8a2bd6370d Merge pull request #6487 from nextcloud/fixScreenshotFDA
update FileDisplayActivityIT
2020-07-20 11:30:39 +02:00
tobiasKaminsky 88a609fc0e another try to get tests green
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 11:12:16 +02:00
tobiasKaminsky ffa19f0fa9 update screenshots to reflect https
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 10:58:00 +02:00
tobiasKaminsky 8957d5a525 missing protocol prefix
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 10:09:38 +02:00
tobiasKaminsky df72d84f91 fix last remaining tests
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-20 09:06:08 +02:00
Nextcloud bot c4fc2f52ea [tx-robot] updated from transifex 2020-07-19 03:33:32 +00:00
Tobias Kaminsky 633c82de93 daily dev 20200718
Use same color for status bar
Fix crash on missing user
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-07-18 03:40:42 +02:00
Tobias Kaminsky e85cf54640 Merge remote-tracking branch 'origin/master' into dev 2020-07-18 03:31:58 +02:00
Andy Scherzinger ad12be8218 Merge pull request #6483 from nextcloud/dependabot/gradle/org.mockito-mockito-core-3.4.2
Bump mockito-core from 3.4.0 to 3.4.2
2020-07-17 23:17:09 +02:00
Andy Scherzinger 0ab788d116 Merge pull request #6484 from nextcloud/dependabot/gradle/org.mockito-mockito-android-3.4.2
Bump mockito-android from 3.4.0 to 3.4.2
2020-07-17 23:16:44 +02:00
tobiasKaminsky 7a3ef013d1 always start with no account
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 13:37:04 +02:00
tobiasKaminsky acbb2f06bf disable flaky screenshot tests
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 13:18:12 +02:00
tobiasKaminsky b29767b648 remove accounts, as otherwise account from AbstractOnServer might be there
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 12:52:54 +02:00
tobiasKaminsky d17dd38589 Fix DialogFragmentIT
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 12:32:27 +02:00
tobiasKaminsky 78cc80266a Fix: server IT tests need AbstractOnServerIT
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 12:16:41 +02:00
tobiasKaminsky d1adb2bf74 update FileDisplayActivityIT
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 11:56:23 +02:00
Tobias Kaminsky faab13ca92 Merge pull request #6476 from nextcloud/authCrash
Fix crash on missing user
2020-07-17 11:56:10 +02:00
Andy Scherzinger 1cf178893a Merge pull request #6480 from nextcloud/loginColor
Use same color for status bar
2020-07-17 09:27:44 +02:00
dependabot-preview[bot] a56a34079b Bump mockito-android from 3.4.0 to 3.4.2
Bumps [mockito-android](https://github.com/mockito/mockito) from 3.4.0 to 3.4.2.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.4.0...v3.4.2)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-17 08:33:01 +02:00
dependabot-preview[bot] e753f8ea3d Bump mockito-core from 3.4.0 to 3.4.2
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.4.0 to 3.4.2.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.4.0...v3.4.2)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-17 08:32:26 +02:00
tobiasKaminsky 404f43fad4 Use same color for status bar
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 08:18:28 +02:00
tobiasKaminsky 9a07418e51 Fix crash on missing user
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 08:07:45 +02:00
Tobias Kaminsky 7b1522e86a Merge pull request #6486 from nextcloud/fixSettingScreenshotTest
update ScreenshotIT
2020-07-17 08:07:12 +02:00
tobiasKaminsky be977dda31 update ScreenshotIT
add helper script

Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-17 07:47:59 +02:00
Nextcloud bot aa5cf6b5ae [tx-robot] updated from transifex 2020-07-17 03:32:59 +00:00
Tobias Kaminsky 9a64fe7aff daily dev 20200717
new screenshots, disabled non working
Add tests for dialogs
fix wrong show of sort/list group and FAB in details or text preview
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-07-17 03:40:10 +02:00
Tobias Kaminsky 2afbf11f73 Merge remote-tracking branch 'origin/master' into dev 2020-07-17 03:30:49 +02:00
Tobias Kaminsky f7e08a724b Merge pull request #6441 from nextcloud/previewText
fix wrong show of sort/list group and FAB in details or text preview
2020-07-16 11:08:52 +02:00
Nextcloud bot 990673077f [tx-robot] updated from transifex 2020-07-16 03:43:23 +00:00
Tobias Kaminsky 3b2fd340d3 Merge remote-tracking branch 'origin/master' into dev 2020-07-16 03:32:45 +02:00
Andy Scherzinger cc1c4e9b11 Merge pull request #6452 from nextcloud/dialogTests
Add tests for dialogs
2020-07-15 19:31:26 +02:00
tobiasKaminsky cc18577efa fix after rebasing
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-15 15:44:36 +02:00
tobiasKaminsky db6c1ba055 new screenshots, disabled non working
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-15 15:42:26 +02:00
tobiasKaminsky 3b89449939 RetryRule does not work on Screenshot Tests
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-15 15:42:26 +02:00
tobiasKaminsky 4336082bb7 Add tests for dialogs
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-15 15:42:26 +02:00
Tobias Kaminsky 93183cf9b2 Merge pull request #6474 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-4.0.1
Bump gradle from 4.0.0 to 4.0.1
2020-07-15 15:39:31 +02:00
Nextcloud bot e4335583cf [tx-robot] updated from transifex 2020-07-15 03:59:53 +00:00
dependabot-preview[bot] 7932a2a876 Bump gradle from 4.0.0 to 4.0.1
Bumps gradle from 4.0.0 to 4.0.1.

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-15 01:12:12 +00:00
Nextcloud bot 818ff4f11d [tx-robot] updated from transifex 2020-07-14 03:31:31 +00:00
Tobias Kaminsky 225f133341 daily dev 20200714
Migrate FileMenuFiler to User model
Migrate UploadFileOperation to User model
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-07-14 03:41:44 +02:00
Tobias Kaminsky ef5362f877 Merge remote-tracking branch 'origin/master' into dev 2020-07-14 03:32:22 +02:00
Tobias Kaminsky 7dd42f0bac Merge pull request #6438 from nextcloud/ezaquarii/migrate-upload-file-operation-to-user-model
Migrate UploadFileOperation to User model
2020-07-13 08:37:48 +02:00
Tobias Kaminsky ca7cdc9524 Merge pull request #6447 from nextcloud/ezaquarii/migrate-file-menu-filter-to-user-model
Migrate FileMenuFiler to User model
2020-07-13 08:37:07 +02:00
Tobias Kaminsky 4e31f15c09 Merge pull request #6466 from nextcloud/dependabot/gradle/org.mockito-mockito-core-3.4.0
Bump mockito-core from 3.3.3 to 3.4.0
2020-07-13 07:32:58 +02:00
Tobias Kaminsky 0896ad7c17 Merge pull request #6467 from nextcloud/dependabot/gradle/org.mockito-mockito-android-3.4.0
Bump mockito-android from 3.3.3 to 3.4.0
2020-07-13 07:32:31 +02:00
dependabot-preview[bot] 2edc1320ea Bump mockito-android from 3.3.3 to 3.4.0
Bumps [mockito-android](https://github.com/mockito/mockito) from 3.3.3 to 3.4.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.3.3...v3.4.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-13 01:14:00 +00:00
dependabot-preview[bot] 493d0b76ee Bump mockito-core from 3.3.3 to 3.4.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.3.3 to 3.4.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.3.3...v3.4.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-07-13 01:13:08 +00:00
Nextcloud bot 9b73819256 [tx-robot] updated from transifex 2020-07-12 03:31:03 +00:00
Nextcloud bot 34c27204d4 [tx-robot] updated from transifex 2020-07-11 03:31:32 +00:00
Tobias Kaminsky d7b9d5df07 daily dev 20200711
Theme login with server capability
remove unused import
spotbugs: remove unused variables
dialog buttons shouldn't have a background color
make sure dialog button text is not allCaps and title is standard material colored
remove unused variable
Remove title theming of modal dialog
show downloaded encrypted files in subfolders
direct login works again
Update translations
2020-07-11 03:38:10 +02:00
Tobias Kaminsky d27dd7c4c6 Merge remote-tracking branch 'origin/master' into dev 2020-07-11 03:30:50 +02:00
Andy Scherzinger d96b4e4c6c Merge pull request #6442 from nextcloud/themeLogin
Theme login with server capability
2020-07-10 11:52:26 +02:00
Tobias Kaminsky 234c8d33ee Merge pull request #6434 from nextcloud/removeDialogTitleTheming
Remove title theming of modal dialog
2020-07-10 11:41:19 +02:00
tobiasKaminsky b46af2b5fa fix tests
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-10 11:34:25 +02:00
tobiasKaminsky ea0c09dd49 Theme login with server capability
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-10 11:22:55 +02:00
Tobias Kaminsky a2743f206a Merge pull request #6445 from nextcloud/downloadedE2E
show downloaded encrypted files in subfolders
2020-07-10 10:57:49 +02:00
Tobias Kaminsky 3730eff7ae Merge pull request #6435 from nextcloud/directLogin
direct login works again
2020-07-10 10:57:24 +02:00
Nextcloud bot aef8ee5384 [tx-robot] updated from transifex 2020-07-10 03:35:10 +00:00
Tobias Kaminsky 5e8a2b714c daily dev 20200710
Migrate data transfer listener to User model
Update translations
2020-07-10 03:38:29 +02:00
Tobias Kaminsky 77c76bd10f Merge remote-tracking branch 'origin/master' into dev 2020-07-10 03:30:49 +02:00
Chris Narkiewicz 69414303a8 Migrate FileMenuFiler to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-09 23:00:19 +01:00
Chris Narkiewicz 7bb49bd610 Migrate UploadFileOperation to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-09 17:51:23 +02:00
nextcloud-android-bot 94b26cc28e Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-07-09 14:50:07 +00:00
Andy Scherzinger 2ed70f279d remove unused import
Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-09 16:34:52 +02:00
Andy Scherzinger 2916c82a5b spotbugs: remove unused variables
Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-09 16:34:51 +02:00
Andy Scherzinger b6d09c42a9 dialog buttons shouldn't have a background color
Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-09 16:34:50 +02:00
Andy Scherzinger 8585e44d4b make sure dialog button text is not allCaps and title is standard material colored
Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-09 16:34:50 +02:00
Andy Scherzinger 7cda9b5e8d remove unused variable
Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-09 16:34:49 +02:00
Andy Scherzinger 27fc8c6540 Remove title theming of modal dialog
Resolves #6429

Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-09 16:34:37 +02:00
Tobias Kaminsky a7b90ed588 Merge pull request #6439 from nextcloud/ezaquarii/migrate-data-transfer-listener-to-user-model
Migrate data transfer listener to User model
2020-07-09 15:19:17 +02:00
tobiasKaminsky 419b14afcf show downloaded encrypted files in subfolders
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-09 12:17:47 +02:00
tobiasKaminsky be9d4facce fix wrong show of sort/list group and FAB in details or text preview
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-09 07:43:20 +02:00
Nextcloud bot 89edfe518b [tx-robot] updated from transifex 2020-07-09 03:33:24 +00:00
Chris Narkiewicz 6b3c4621b7 Migrate data transfer listener to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-08 22:47:35 +01:00
tobiasKaminsky d8d24908da direct login works again
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-08 16:03:12 +02:00
Nextcloud bot 4eadfac145 [tx-robot] updated from transifex 2020-07-08 03:42:18 +00:00
Tobias Kaminsky 062151a248 daily dev 20200708
do not user NotNull, but NonNull
Migrate SetupEncryptionDialogFragment to User model
Migrate MimeTypeUtil.getFileTypeIcon to User model
Migrate PreviewImagePagerAdapter to User model
Update translations
2020-07-08 03:38:10 +02:00
Tobias Kaminsky 9c139e5186 Merge remote-tracking branch 'origin/master' into dev 2020-07-08 03:30:49 +02:00
Tobias Kaminsky 9c066bbe2a Merge pull request #6426 from nextcloud/reduceOutput
reduce log output for drone
2020-07-07 15:48:00 +02:00
Andy Scherzinger 2562a84352 Merge pull request #6425 from nextcloud/changelog-master-stable-3.12.1
Add changelog for 3.12.1
2020-07-07 14:57:44 +02:00
tobiasKaminsky a884bab878 reduce log output for drone
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-07 11:48:25 +02:00
Tobias Kaminsky e3121bf18d Merge pull request #6423 from nextcloud/noNotNull
do not user NotNull, but NonNull
2020-07-07 11:34:02 +02:00
tobiasKaminsky 909fb2187f Add changelog for 3.12.1
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-07 10:32:29 +02:00
tobiasKaminsky 1b62bb93cb do not user NotNull, but NonNull
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-07 10:16:32 +02:00
Tobias Kaminsky fd1d391d2b Merge pull request #6421 from nextcloud/ezaquarii/migrate-setup-encryption-dialog-fragment-to-user-model
Migrate SetupEncryptionDialogFragment to User model
2020-07-07 07:55:30 +02:00
Tobias Kaminsky b047dccd56 Merge pull request #6420 from nextcloud/ezaquarii/migrate-mime-type-util-get-file-type-icon-to-user-model
Migrate MimeTypeUtil.getFileTypeIcon to User model
2020-07-07 07:51:26 +02:00
Tobias Kaminsky b39bceb607 Merge pull request #6419 from nextcloud/ezaquarii/migrate-preview-image-pager-adapter-to-user-model
Migrate PreviewImagePagerAdapter to User model
2020-07-07 07:50:27 +02:00
Nextcloud bot 31ac25f8d0 [tx-robot] updated from transifex 2020-07-07 03:36:26 +00:00
Tobias Kaminsky ff823480c9 daily dev 20200707
fix possible NPE
minor code formatting
Fix ReceiveExternalFilesActivity account -> user
Migrate MumeTypeUtil.folderTypeIcon to user model
Migrate UploadListAdapter to User model
Migrate player service and preview fragment to User model
Update translations
2020-07-07 03:38:16 +02:00
Tobias Kaminsky a7182dc7ae Merge remote-tracking branch 'origin/master' into dev 2020-07-07 03:30:49 +02:00
Chris Narkiewicz 3c87c8fc67 Migrate SetupEncryptionDialogFragment to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-06 20:58:36 +01:00
Chris Narkiewicz eb722457ca Migrate MimeTypeUtil.getFileTypeIcon to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-06 20:46:13 +01:00
Chris Narkiewicz c56e2c3d21 Migrate PreviewImagePagerAdapter to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-06 20:31:33 +01:00
Tobias Kaminsky 6b431a388e Merge pull request #6415 from nextcloud/ezaquarii/migrate-mimetypeutil-get-folder-type-icon-to-user-model
Migrate MimeTypeUtil.folderTypeIcon to user model
2020-07-06 15:29:42 +02:00
Tobias Kaminsky 5e6038ef1d Merge pull request #6414 from nextcloud/ezaquarii/migrate-upload-list-adapter-to-user-model
Migrate UploadListAdapter to User model
2020-07-06 15:29:11 +02:00
Tobias Kaminsky 3f254ee348 Merge pull request #6375 from nextcloud/ezaquarii/migrate-audio-player-and-audio-preview-to-user-model
Migrate audio player and preview fragment to user model
2020-07-06 15:28:35 +02:00
tobiasKaminsky 13593fb7f7 fix possible NPE
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-06 11:31:02 +02:00
tobiasKaminsky f9b232fb49 minor code formatting
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-06 10:37:18 +02:00
tobiasKaminsky 0af29bf500 Fix ReceiveExternalFilesActivity account -> user
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-06 10:29:07 +02:00
Nextcloud bot 9cd108d229 [tx-robot] updated from transifex 2020-07-06 03:25:45 +00:00
Chris Narkiewicz ed9afe8c6c Migrate MumeTypeUtil.folderTypeIcon to user model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-05 23:12:56 +01:00
Chris Narkiewicz c650e55af9 Migrate UploadListAdapter to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-05 22:53:29 +01:00
Chris Narkiewicz 277f08b941 Migrate player service and preview fragment to User model
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-07-05 22:18:55 +01:00
Nextcloud bot 8e7ce3c7a1 [tx-robot] updated from transifex 2020-07-05 03:26:35 +00:00
Tobias Kaminsky 867b3c25d7 daily dev 20200705
Update translations
2020-07-05 03:40:28 +02:00
Tobias Kaminsky dd52045b4d Merge remote-tracking branch 'origin/master' into dev 2020-07-05 03:31:06 +02:00
Nextcloud bot d52b1cc6ba [tx-robot] updated from transifex 2020-07-04 03:28:45 +00:00
Tobias Kaminsky 40ab5cffa1 daily dev 20200704
remove fileDrop capability
Resolve #6399 adding theming logic for share link icons
Spotbugs: MS 	com.owncloud.android.db.ProviderMeta$ProviderTableMeta.FILE_ALL_COLUMNS is a mutable array MS 	com.owncloud.android.providers.UsersAndGroupsSearchProvider.ACTION_SHARE_WITH isn't final and can't be protected from malicious code MS 	com.owncloud.android.utils.FileSortOrder.sortOrders is a mutable collection MS 	org.nextcloud.providers.cursors.FileCursor.DEFAULT_DOCUMENT_PROJECTION should be package protected
Edit label for public share split up between public share and user shares
l10n: Delete a space character
Update translations
Update Nextcloud Android library
2020-07-04 03:41:11 +02:00
Tobias Kaminsky 371160b479 Merge remote-tracking branch 'origin/master' into dev 2020-07-04 03:32:26 +02:00
Nextcloud bot d137302dab [tx-robot] updated from transifex 2020-07-03 03:31:35 +00:00
Tobias Kaminsky ce4e1c15f5 Merge remote-tracking branch 'origin/master' into dev 2020-07-03 03:32:14 +02:00
Andy Scherzinger 93528534aa Merge pull request #6404 from nextcloud/removeFilesdrop
remove fileDrop capability
2020-07-02 14:34:39 +02:00
Tobias Kaminsky 1126823db9 Merge pull request #6400 from nextcloud/themeIconImagesWithUnicolorBackgrounds
Add theming logic for share link icons
2020-07-02 13:55:14 +02:00
tobiasKaminsky 73bc3735d4 remove fileDrop capability
Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-02 13:50:37 +02:00
Tobias Kaminsky a6dd338c79 Merge pull request #6403 from nextcloud/maliciousCode
Spotbugs: fixed all malicious code errors
2020-07-02 12:46:20 +02:00
Andy Scherzinger fd47348f1b Resolve #6399 adding theming logic for share link icons
Signed-off-by: Andy Scherzinger <[email protected]>
2020-07-02 09:18:32 +02:00
Nextcloud bot 0f67f4b1e1 [tx-robot] updated from transifex 2020-07-02 03:37:07 +00:00
Tobias Kaminsky 75650bcfe8 Merge remote-tracking branch 'origin/master' into dev 2020-07-02 03:40:59 +02:00
nextcloud-android-bot a06057acfa Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-07-01 13:52:27 +00:00
tobiasKaminsky eda28d67a6 Spotbugs:
MS 	com.owncloud.android.db.ProviderMeta$ProviderTableMeta.FILE_ALL_COLUMNS is a mutable array
MS 	com.owncloud.android.providers.UsersAndGroupsSearchProvider.ACTION_SHARE_WITH isn't final and can't be protected from malicious code
MS 	com.owncloud.android.utils.FileSortOrder.sortOrders is a mutable collection
MS 	org.nextcloud.providers.cursors.FileCursor.DEFAULT_DOCUMENT_PROJECTION should be package protected

Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-01 15:36:56 +02:00
Andy Scherzinger 2192bdcf39 Merge pull request #6396 from nextcloud/editLabel
Edit label for public share
2020-07-01 13:49:43 +02:00
tobiasKaminsky 4bb0a3c176 Edit label for public share
split up between public share and user shares

Signed-off-by: tobiasKaminsky <[email protected]>
2020-07-01 12:07:26 +02:00
Tobias Kaminsky 325e6005c5 Merge pull request #6397 from nextcloud/Valdnet-patch-1
l10n: Delete a space character
2020-07-01 11:11:16 +02:00
Valdnet ee3e92c805 l10n: Delete a space character 2020-07-01 09:22:38 +02:00
Nextcloud bot 19d37ef49d [tx-robot] updated from transifex 2020-07-01 03:27:02 +00:00
Tobias Kaminsky 2f7597cc68 daily dev 20200701
remove EditShareFragment.java
remove unused ressources
add default to switch
fix switch statement
add missing import
fix test
minor code changes after rebase
Synced folder dialog: remove local and remote folder icons
Synced folder dialog: use display name instead of full path for local folder
Synced folder dialog: remove folder path expand action
Deep link handler tests
Move user filtering to deep link handler
Refactored deep link handling
Deep link handler prototype
allow 3 times deep nextcloud nesting
Update pattern matcher to allow pretty urls
allow pretty urls
revert library
fixes after rebase
remove literals in conditional statements
UI fine tuning for link items / sharing fragments
add multiple share links
Add to jetified-dagger-lint-aar-2.28.1 for custom lint check
Bump to dagger 2.28.1
Provide DeckApi via dependency injection framework
Migate file details and share details to User model
Fix NPE in OCFileListFragment when OCFile is null
Update translations
Update 3rd-party dependencies
2020-07-01 03:38:05 +02:00
Tobias Kaminsky d31a83c426 Merge remote-tracking branch 'origin/master' into dev 2020-07-01 03:30:46 +02:00
Andy Scherzinger 0acae91fdf Merge pull request #6392 from nextcloud/removeEditShareFragment
remove EditShareFragment.java
2020-06-30 16:52:23 +02:00
tobiasKaminsky f6e8636cfa remove EditShareFragment.java
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 15:32:17 +02:00
Andy Scherzinger ba62819180 Merge pull request #6391 from nextcloud/switch
add default to switch
2020-06-30 14:46:01 +02:00
Tobias Kaminsky cee5b45b84 Merge pull request #6121 from nextcloud/enhance_deep_links
enhance deep linking to allow pretty urls
2020-06-30 12:30:43 +02:00
tobiasKaminsky 05748959e9 exit always with 0
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 11:55:52 +02:00
Tobias Kaminsky 969c0d3916 Merge pull request #5593 from nextcloud/fix-synced-folder-dialog-click
Synced folder dialog: fix summary click event intercepting parent
2020-06-30 11:46:05 +02:00
tobiasKaminsky 726e4ca7b4 remove unused ressources
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 10:52:46 +02:00
nextcloud-android-bot 444dcd000e Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-30 07:55:26 +00:00
Tobias Kaminsky 551628d4fe Merge pull request #6358 from nextcloud/multipleShareLink
add multiple share links
2020-06-30 09:51:12 +02:00
Tobias Kaminsky 9f7f28c7c1 Merge pull request #6373 from nextcloud/ezaquarii/add-deck-api-to-dependency-injection-framework
Provide DeckApi via dependency injection framework
2020-06-30 09:49:17 +02:00
drone 5fa9f7420d Merge commit 'db5b0752f87d7b0647e7d8c99c21adc99151abb1' 2020-06-30 07:42:19 +00:00
tobiasKaminsky db5b0752f8 add default to switch
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 09:39:28 +02:00
tobiasKaminsky 7cbfc58036 fix switch statement
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 09:35:33 +02:00
tobiasKaminsky 3d7e8b770a add missing import
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 08:45:52 +02:00
Tobias Kaminsky f1a70ccb32 Merge pull request #6364 from nextcloud/ezaquarii/fix-npe-in-file-list-fragment-when-file-is-null
Fix NPE in OCFileListFragment when OCFile is null
2020-06-30 08:42:52 +02:00
tobiasKaminsky d721941032 fix test
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 08:41:27 +02:00
tobiasKaminsky f07e14fd30 minor code changes after rebase
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 08:34:39 +02:00
Alice Gaudon 7af28a1c36 Synced folder dialog: remove local and remote folder icons
Signed-off-by: Alice Gaudon <[email protected]>
2020-06-30 07:53:13 +02:00
Alice Gaudon e5f56152b0 Synced folder dialog: use display name instead of full path for local folder
Signed-off-by: Alice Gaudon <[email protected]>
2020-06-30 07:53:13 +02:00
Alice Gaudon 4a4ad20e66 Synced folder dialog: remove folder path expand action
Signed-off-by: Alice Gaudon <[email protected]>
2020-06-30 07:53:13 +02:00
Chris Narkiewicz 74e68d6b8e Deep link handler tests
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-30 07:51:21 +02:00
Chris Narkiewicz a887a4c32b Move user filtering to deep link handler
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-30 07:51:21 +02:00
Chris Narkiewicz 50b19e5d77 Refactored deep link handling
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-30 07:51:21 +02:00
Chris Narkiewicz bcb1262064 Deep link handler prototype
Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-30 07:51:20 +02:00
szaimen 214689bc0d allow 3 times deep nextcloud nesting
Signed-off-by: szaimen <[email protected]>
2020-06-30 07:51:20 +02:00
szaimen ed4917db14 Update pattern matcher to allow pretty urls
Signed-off-by: szaimen <[email protected]>
2020-06-30 07:51:20 +02:00
szaimen 815e30166e allow pretty urls
Signed-off-by: szaimen <[email protected]>
2020-06-30 07:51:20 +02:00
tobiasKaminsky 40d40c32b1 revert library
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 07:34:24 +02:00
tobiasKaminsky 51365fa7c3 fixes after rebase
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 07:34:24 +02:00
Andy Scherzinger 3848346f4a remove literals in conditional statements 2020-06-30 07:34:23 +02:00
Andy Scherzinger 3c7fe3a405 UI fine tuning for link items / sharing fragments
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-30 07:34:04 +02:00
tobiasKaminsky 8c9841f033 add multiple share links
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-30 07:34:03 +02:00
Tobias Kaminsky ff4a0a7030 Merge pull request #6372 from nextcloud/ezaquarii/migrate-file-details-to-user-model
Migate file details and share details to User model
2020-06-30 07:29:48 +02:00
Tobias Kaminsky 197552a488 Merge pull request #6158 from nextcloud/dependabot/gradle/daggerVersion-2.28
Bump daggerVersion from 2.27 to 2.28
2020-06-30 07:27:39 +02:00
Nextcloud bot beb45efc0b [tx-robot] updated from transifex 2020-06-30 03:26:21 +00:00
Tobias Kaminsky b630abe052 daily dev 20200630
Lint ignore
Replace fragment by FragmentContainerView
remove element color references
remove unused method
improve edge case FAB coloring
move primary action button theming to new theming method
Introduce light/dark theme / black/white primary-color-aware primary-button theming
proper coloring of drawer items in black/white edge case scenarios
proper button coloring for dark theme + black primary color
Remove duplacation
black nav bar on image preview
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-06-30 03:43:25 +02:00
Tobias Kaminsky 07a2106d45 Merge remote-tracking branch 'origin/master' into dev 2020-06-30 03:32:48 +02:00
tobiasKaminsky 10f6ec94fa Add to jetified-dagger-lint-aar-2.28.1 for custom lint check
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 16:59:20 +02:00
tobiasKaminsky 738291b2fa Bump to dagger 2.28.1
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 16:31:15 +02:00
dependabot-preview[bot] 14fd15e9ae Bump daggerVersion from 2.27 to 2.28
Bumps `daggerVersion` from 2.27 to 2.28.

Updates `dagger` from 2.27 to 2.28
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.27...dagger-2.28)

Updates `dagger-android` from 2.27 to 2.28
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.27...dagger-2.28)

Updates `dagger-android-support` from 2.27 to 2.28
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.27...dagger-2.28)

Updates `dagger-compiler` from 2.27 to 2.28
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.27...dagger-2.28)

Updates `dagger-android-processor` from 2.27 to 2.28
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.27...dagger-2.28)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-29 16:31:15 +02:00
Tobias Kaminsky 4073cd235c Merge pull request #6341 from nextcloud/fragmentContainerView
Replace fragment by FragmentContainerView
2020-06-29 16:30:40 +02:00
tobiasKaminsky cc517ffcfd Lint ignore
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 16:00:44 +02:00
tobiasKaminsky 98d1b5e2b9 split up delete old commit to always delete them
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 16:00:44 +02:00
tobiasKaminsky 3102c23d2c always delete old comments
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 16:00:44 +02:00
tobiasKaminsky 32a0d1c309 Replace fragment by FragmentContainerView
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 16:00:44 +02:00
Tobias Kaminsky 212b3a6ef9 Merge pull request #6385 from nextcloud/fixDeleteOnSuccess
type -> TYPE
2020-06-29 15:59:58 +02:00
tobiasKaminsky fd7b722ac4 type -> TYPE
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 15:59:36 +02:00
Tobias Kaminsky 0207e70323 Merge pull request #6384 from nextcloud/dronePermission
make deleteOutdatedComments.sh executable
2020-06-29 15:42:14 +02:00
tobiasKaminsky fb5ae37a38 make deleteOutdatedComments.sh executable
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-29 15:41:55 +02:00
Tobias Kaminsky ced60bf59b Merge pull request #6366 from nextcloud/deleteOutdatedComments
Delete outdated comments in case of success
2020-06-29 10:28:59 +02:00
Tobias Kaminsky 3c609a329f Merge pull request #6332 from nextcloud/enh/darkThemeOptimizations
Enh/dark theme optimizations
2020-06-29 10:28:36 +02:00
Tobias Kaminsky 9a0d1085ed Merge pull request #6382 from nextcloud/dependabot/gradle/gradle.plugin.com.github.spotbugs.snom-spotbugs-gradle-plugin-4.4.4
Bump spotbugs-gradle-plugin from 4.4.3 to 4.4.4
2020-06-29 10:00:45 +02:00
Tobias Kaminsky a5142483a4 Merge pull request #6381 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.10.0
Bump detekt-gradle-plugin from 1.9.1 to 1.10.0
2020-06-29 10:00:31 +02:00
Tobias Kaminsky 1edaffeafe Merge pull request #6380 from nextcloud/dependabot/gradle/net.bytebuddy-byte-buddy-1.10.13
Bump byte-buddy from 1.10.12 to 1.10.13
2020-06-29 10:00:12 +02:00
Tobias Kaminsky b2ff37505e Merge pull request #6244 from nextcloud/blackNavBar
black nav bar on image preview
2020-06-29 09:59:06 +02:00
Nextcloud bot ebbedb46a0 [tx-robot] updated from transifex 2020-06-29 03:26:45 +00:00
dependabot-preview[bot] dfe2e5dbd4 Bump spotbugs-gradle-plugin from 4.4.3 to 4.4.4
Bumps spotbugs-gradle-plugin from 4.4.3 to 4.4.4.

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-29 01:14:26 +00:00
dependabot-preview[bot] c1f5817f3f Bump detekt-gradle-plugin from 1.9.1 to 1.10.0
Bumps detekt-gradle-plugin from 1.9.1 to 1.10.0.

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-29 01:13:56 +00:00
dependabot-preview[bot] 9f23230bf1 Bump byte-buddy from 1.10.12 to 1.10.13
Bumps [byte-buddy](https://github.com/raphw/byte-buddy) from 1.10.12 to 1.10.13.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.10.12...byte-buddy-1.10.13)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-29 01:13:16 +00:00
Nextcloud bot fbfdf1104a [tx-robot] updated from transifex 2020-06-28 03:27:05 +00:00
Nextcloud bot bf587f1a65 [tx-robot] updated from transifex 2020-06-27 03:26:25 +00:00
Tobias Kaminsky cbfa9ff6cb daily dev 20200627
lint: remove unused resource
Enhance FileDetailSharingFragment: - remove no users text - disable search view if reshare is not allowed - show note icon
Hide on scrolling for activities and notifications
fix #5468 if we have no activity, do nothing
2020-06-27 03:38:19 +02:00
Tobias Kaminsky 6db7c79962 Merge remote-tracking branch 'origin/master' into dev 2020-06-27 03:30:49 +02:00
Chris Narkiewicz dbae9443eb Provide DeckApi via dependency injection framework
- renamed integration packate to integrations (plural)
- created DI module for integrations
- added provider for DeckApi
- inject DeckApi to background job factory

Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-26 23:43:43 +01:00
Chris Narkiewicz e13a3ca7cb Migate file details and share details to User model
UserAccountManager:
 - added userOwnsFile API that replaces accountOwnsFile
 - deprecated accountOwnsFile

FileDisplayActivity:
 - simplified initFragmentWithFile by passing non-null instanecs
   of user and file and thus avoiding numerous redundant null-checks
 - fragments are initialized using User model instead of Account
 - transfer and download callbacks use getUser() instead of getAccount()
   and pass user instance to framents

ShareActivity
 - initlize fragment using user model instead of account
 - close acivity immediately if current user is not available
   (cannot reach such state not, but historically account was nullable)

FileDetailTabAdapter
 - framents are initialized using User model instead of Account

FileDetailActivitiesFragment
 - migrated to User
 - removed dependency on constants from FileActivity

FileDetailFragment
 - migrated to User
 - removed dependency on constants from FileActivity

FileDetailsSharingFragment
 - migrated to User
 - removed dependency on constants from FileActivity

Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-26 23:07:40 +01:00
nextcloud-android-bot 79f4270bb9 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-26 13:35:51 +00:00
Andy Scherzinger 5f73a5ec75 update screenshots
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:30 +02:00
Andy Scherzinger 0ad81bdd29 remove element color references
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:29 +02:00
Andy Scherzinger 8af257d54f remove unused method
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:27 +02:00
Andy Scherzinger a7088c8c87 improve edge case FAB coloring
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:25 +02:00
Andy Scherzinger 5b76892ab1 move primary action button theming to new theming method
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:24 +02:00
Andy Scherzinger 7005cdef2e Introduce light/dark theme / black/white primary-color-aware primary-button theming
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:22 +02:00
Andy Scherzinger 643454c1d7 proper coloring of drawer items in black/white edge case scenarios
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:21 +02:00
Andy Scherzinger 20d2ef989d proper button coloring for dark theme + black primary color
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 15:15:14 +02:00
Andy Scherzinger dfc94f4505 Merge pull request #6354 from nextcloud/noShare
Enhance FileDetailSharingFragment
2020-06-26 13:27:16 +02:00
tobiasKaminsky 8f0e4eab60 Delete outdated comments in case of success
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-26 12:51:47 +02:00
Andy Scherzinger 93d0875883 Merge pull request #6253 from nextcloud/noNothingIfNoActivity
PreviewImageFragment: if we have no activity, do nothing
2020-06-26 11:13:58 +02:00
Joris Bodin 947e4a1b10 Remove duplacation
Signed-off-by: Joris Bodin <[email protected]>
2020-06-26 11:05:44 +02:00
tobiasKaminsky c55e9b8fd2 black nav bar on image preview
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-26 11:05:44 +02:00
Andy Scherzinger 2b5c39095d lint: remove unused resource
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-26 11:03:09 +02:00
tobiasKaminsky 348ae4435a Enhance FileDetailSharingFragment:
- remove no users text
- disable search view if reshare is not allowed
- show note icon

Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-26 11:03:03 +02:00
Tobias Kaminsky a22b0724ae Merge pull request #6367 from nextcloud/fixTypeInReport
type -> TYPE
2020-06-26 10:58:58 +02:00
tobiasKaminsky c42c24be80 type -> TYPE
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-26 10:58:34 +02:00
Tobias Kaminsky 7e03aa39b5 Merge pull request #6365 from nextcloud/fixDeleteCommits
fix deleting outdated comments
2020-06-26 10:36:11 +02:00
tobiasKaminsky 097434916e fix deleting outdated comments
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-26 10:35:48 +02:00
Tobias Kaminsky 728de81736 Merge pull request #6263 from nextcloud/scrollPart2
Hide on scrolling for activities and notifications
2020-06-26 08:39:57 +02:00
Tobias Kaminsky 21f2ce7425 daily dev 20200626
changes due to CR
Removed legacy login cleaned up a bit AuthenticatorActivity
add null check
fix OCP_OVERLY_CONCRETE_PARAMETER
use fixed spotbug version
fix tests
make function puplic for testing
Fix zoom, toggle background
Removed possible NPE
removed duplicated sort/switch grid buttons
Changes due to CR
Hide on scrolling, fix https://github.com/nextcloud/android/issues/6238
use view instead of linear layout as common parent
Update translations
Update 3rd-party dependencies
2020-06-26 03:40:15 +02:00
Tobias Kaminsky 8ba7eb619e Merge remote-tracking branch 'origin/master' into dev 2020-06-26 03:30:48 +02:00
Chris Narkiewicz 5609b5041e Fix NPE in OCFileListFragment when OCFile is null
1. Fixed NPE
2. Audited all use of nullable field in all called APIs
3. Updated called APIs nullability documentation

Fixes #6282

Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-25 22:55:08 +01:00
tobiasKaminsky d36c2d35a5 Hide on scrolling for activities and notifications
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 23:44:03 +02:00
tobiasKaminsky 741cc24d11 fix #5468
if we have no activity, do nothing

Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 23:36:05 +02:00
Andy Scherzinger 5288548e70 Merge pull request #6338 from nextcloud/legacyLoginFlow
Removed legacy login
2020-06-25 23:33:57 +02:00
nextcloud-android-bot e0d5676151 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-25 21:18:34 +00:00
tobiasKaminsky 7ed4e2b24e changes due to CR
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 22:57:48 +02:00
tobiasKaminsky 58ba15ac95 Removed legacy login
cleaned up a bit AuthenticatorActivity

Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 22:57:22 +02:00
Andy Scherzinger fe1cd33c26 Merge pull request #6344 from nextcloud/ocp
fix OCP_OVERLY_CONCRETE_PARAMETER
2020-06-25 20:30:34 +02:00
Andy Scherzinger c3f838d445 Merge pull request #6349 from nextcloud/dependabot/gradle/gradle.plugin.com.github.spotbugs.snom-spotbugs-gradle-plugin-4.4.3
Bump spotbugs-gradle-plugin from 4.3.0 to 4.4.3
2020-06-25 20:29:45 +02:00
Andy Scherzinger 2f60b75fc5 add null check 2020-06-25 18:55:50 +02:00
nextcloud-android-bot f6e7c44596 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-25 16:55:05 +00:00
tobiasKaminsky 1017e3ac3b fix OCP_OVERLY_CONCRETE_PARAMETER
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 18:45:28 +02:00
Andy Scherzinger 2913918232 Merge pull request #6361 from nextcloud/fixZoom
Fix zoom, toggle background
2020-06-25 17:12:00 +02:00
tobiasKaminsky ca7350fa8a use fixed spotbug version
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 16:52:12 +02:00
dependabot-preview[bot] 2c5fb2b2f9 Bump spotbugs-gradle-plugin from 4.3.0 to 4.4.3
Bumps spotbugs-gradle-plugin from 4.3.0 to 4.4.3.

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-25 16:52:12 +02:00
Tobias Kaminsky d70502f747 Merge pull request #6262 from nextcloud/hideOnScrolling
Hide on scrolling
2020-06-25 16:18:40 +02:00
tobiasKaminsky 38c28332e2 fix tests
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 15:57:46 +02:00
tobiasKaminsky bd5c9dfa1e make function puplic for testing
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 15:22:58 +02:00
tobiasKaminsky db4a7ee8f5 Fix zoom, toggle background
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 15:17:54 +02:00
Andy Scherzinger 066fef03c2 Merge pull request #6359 from nextcloud/photoBugfix
use view instead of linear layout as common parent
2020-06-25 13:44:32 +02:00
nextcloud-android-bot 741fb410f1 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-25 11:13:55 +00:00
nextcloud-android-bot 961e6c179a Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-25 13:00:04 +02:00
tobiasKaminsky 22657040bd Removed possible NPE
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 12:59:54 +02:00
tobiasKaminsky a9dc3f5787 removed duplicated sort/switch grid buttons
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 12:59:54 +02:00
tobiasKaminsky e5ec91b5a7 Changes due to CR
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 12:59:54 +02:00
tobiasKaminsky 1ecd64f128 Hide on scrolling, fix https://github.com/nextcloud/android/issues/6238
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 12:59:54 +02:00
tobiasKaminsky 6dfb4c7ef6 use view instead of linear layout as common parent
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-25 12:48:40 +02:00
Nextcloud bot 56a1fc868d [tx-robot] updated from transifex 2020-06-25 03:28:24 +00:00
Tobias Kaminsky 7140340c59 daily dev 20200625
Remove useless parents
fix USBR_UNNECESSARY_STORE_BEFORE_RETURN
remove unused constants
fix URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD
on user share permission: unshare as destructive option on bottom
Use same search hint as on server
rich workspace not in folder picker activity
#6247 View Binding - Fix new SpotBugs performance warning (unread field)
fix LSC_LITERAL_STRING_COMPARISON
#6247 View Binding - Remove unused imports
#6247 View Binding - SendButtonAdapter.ViewHolder
#6247 View Binding - AccountItemBinding & AccountActionBinding
#6247 View Binding - ConflictResolveDialogBinding
Combined ShareActivity with FileDetailSharingFragment as much as possible
Update Nextcloud Android library
2020-06-25 03:40:02 +02:00
Tobias Kaminsky 360f9dab90 Merge remote-tracking branch 'origin/master' into dev 2020-06-25 03:31:45 +02:00
Andy Scherzinger 83d4aaf1ab Merge pull request #6345 from nextcloud/usbr
fix USBR_UNNECESSARY_STORE_BEFORE_RETURN
2020-06-24 23:18:08 +02:00
Andy Scherzinger 01d9d2e437 Merge pull request #6347 from nextcloud/uselessParent
Remove useless parents
2020-06-24 23:15:04 +02:00
nextcloud-android-bot 98d930b8ab Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-24 21:00:09 +00:00
nextcloud-android-bot 0fa902d2d2 Drone: update Lint results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-24 20:58:48 +00:00
tobiasKaminsky 1f5352f2ec Remove useless parents
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-24 22:05:37 +02:00
tobiasKaminsky 72fce1dd1e fix USBR_UNNECESSARY_STORE_BEFORE_RETURN
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-24 21:54:56 +02:00
Andy Scherzinger 9e633b91b5 Merge pull request #6342 from nextcloud/view-binding
View binding
2020-06-24 20:28:20 +02:00
Andy Scherzinger 37fdd97c29 Merge pull request #6355 from nextcloud/unshareOnBottom
on user share permission: unshare as destructive option on bottom
2020-06-24 20:22:20 +02:00
Andy Scherzinger cb0ae700db Merge pull request #6346 from nextcloud/urf
fix URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD
2020-06-24 17:21:41 +02:00
nextcloud-android-bot 9f3e1857db Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-24 15:17:33 +00:00
Andy Scherzinger f0a608acde remove unused constants
Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-24 17:00:38 +02:00
tobiasKaminsky 4a791dda86 fix URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-24 16:45:15 +02:00
Andy Scherzinger 3e05624064 Merge pull request #6351 from nextcloud/castException
rich workspace not in folder picker activity
2020-06-24 12:52:36 +02:00
Andy Scherzinger 33dfc9651a Merge pull request #6353 from nextcloud/userSearchText
Use same search hint as on server
2020-06-24 12:49:21 +02:00
tobiasKaminsky 14172fd1f0 on user share permission: unshare as destructive option on bottom
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-24 11:51:53 +02:00
tobiasKaminsky b18ff7404e Use same search hint as on server
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-24 10:58:24 +02:00
Tobias Kaminsky ed8819ec86 Merge pull request #6327 from nextcloud/combineShare
Combined ShareActivity with FileDetailSharingFragment as much as possible
2020-06-24 10:43:24 +02:00
tobiasKaminsky a424706368 rich workspace not in folder picker activity
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-24 07:56:58 +02:00
Andy Scherzinger 7ced94d42e Merge pull request #6343 from nextcloud/lsc
fix LSC_LITERAL_STRING_COMPARISON
2020-06-24 06:56:54 +02:00
Tobias Kaminsky 86ebd24f2d daily dev 20200624
Fixed NPE when hiding ssl cert
#6247 View Binding - Fix codacy issue
#6247 View Binding - FileDisplayActivity and partial Ssl views
Fix improper deleting synced folder by OfflineSyncWork
Remove redundant style
color nav bar
Update Nextcloud Android library
2020-06-24 03:40:08 +02:00
Tobias Kaminsky 99d6c1c5fd Merge remote-tracking branch 'origin/master' into dev 2020-06-24 03:31:44 +02:00
Stefan Niedermann 0aed8aaa86 #6247 View Binding - Fix new SpotBugs performance warning (unread field)
Signed-off-by: Stefan Niedermann <[email protected]>
2020-06-23 18:21:22 +02:00
nextcloud-android-bot c5abe938bd Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-23 14:30:27 +00:00
tobiasKaminsky 4e52f7f970 fix LSC_LITERAL_STRING_COMPARISON
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-23 14:59:02 +02:00
Stefan Niedermann a43933082d #6247 View Binding - Remove unused imports
Signed-off-by: Stefan Niedermann <[email protected]>
2020-06-23 14:10:18 +02:00
Stefan Niedermann 374bb21c33 #6247 View Binding - SendButtonAdapter.ViewHolder
Signed-off-by: Stefan Niedermann <[email protected]>
2020-06-23 14:01:45 +02:00
Stefan Niedermann 558f1775de #6247 View Binding - AccountItemBinding & AccountActionBinding
Signed-off-by: Stefan Niedermann <[email protected]>
2020-06-23 11:15:03 +02:00
Stefan Niedermann 934e1f406a #6247 View Binding - ConflictResolveDialogBinding
Signed-off-by: Stefan Niedermann <[email protected]>
2020-06-23 10:51:40 +02:00
tobiasKaminsky 7732ff065b Combined ShareActivity with FileDetailSharingFragment as much as possible
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-23 10:47:43 +02:00
Tobias Kaminsky 9e6fa5c769 Merge pull request #6281 from nextcloud/view-binding
#6247 View Binding - FileDisplayActivity and partial Ssl views
2020-06-23 10:36:08 +02:00
Tobias Kaminsky 59fddce138 Merge pull request #6243 from nextcloud/navBar
color nav bar
2020-06-23 10:30:52 +02:00
tobiasKaminsky e503106960 Fixed NPE when hiding ssl cert
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-23 09:23:59 +02:00
Stefan Niedermann 96aecac8ed #6247 View Binding - Fix codacy issue
Signed-off-by: Stefan Niedermann <[email protected]>
2020-06-23 09:23:59 +02:00
Stefan Niedermann ab3dff9e1b #6247 View Binding - FileDisplayActivity and partial Ssl views 2020-06-23 09:23:59 +02:00
Tobias Kaminsky 2bbaf7b21d Merge pull request #6335 from stephanritscher/fix-deleting-synced-folder
Fix improper deleting synced folder by OfflineSyncWork
2020-06-23 08:12:21 +02:00
Stephan Ritscher 9370cbab09 Fix improper deleting synced folder by OfflineSyncWork 2020-06-22 21:09:41 +02:00
Tobias Kaminsky a04f52915a daily dev 20200620
minor changes to build.gradle and fixed type on uploadReport.sh
minor changes to build.gradle
Use always recommended spotbug version, defined by plugin exclude data binding generated classes
Fixed Lint: MissingClass: Missing registered class Range: Outside Range UseAppTint: app:tint attribute should be used on ImageView UseCompatLoadingForDrawables UseCompatTextViewDrawableXml
Fix spotbugs output
update combinedTestReport
change to newer spotbugs
change Gradle to 6.1.1
Update Nextcloud Android library
Update 3rd-party dependencies
2020-06-20 03:43:55 +02:00
Tobias Kaminsky 0de60103b1 Merge remote-tracking branch 'origin/master' into dev 2020-06-20 03:32:16 +02:00
Tobias Kaminsky 388301082d Merge pull request #6322 from nextcloud/bountysource
Do not advertise bountyscource, but NC include
2020-06-19 13:00:32 +02:00
tobiasKaminsky 4bdd27ffe0 Do not advertise bountyscource, but NC include
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 12:59:41 +02:00
Andy Scherzinger fb1bb6905c Merge pull request #6180 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-4.0.0
Bump gradle from 3.6.3 to 4.0.0
2020-06-19 12:23:56 +02:00
nextcloud-android-bot 3a28b84e9d Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-19 09:29:38 +00:00
tobiasKaminsky 94d7506cb5 fix after rebase
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:16:34 +02:00
tobiasKaminsky ab0ea3e8d9 minor changes to build.gradle and fixed type on uploadReport.sh
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:05:47 +02:00
tobiasKaminsky eb08f75257 minor changes to build.gradle
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:24 +02:00
tobiasKaminsky e40893a136 Use always recommended spotbug version, defined by plugin
exclude data binding generated classes

Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:24 +02:00
tobiasKaminsky 5f185326ab Fixed Lint:
MissingClass: Missing registered class
Range: Outside Range
UseAppTint: app:tint attribute should be used on ImageView
UseCompatLoadingForDrawables
UseCompatTextViewDrawableXml

Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:22 +02:00
tobiasKaminsky a9f689044d Delete old comments for corresponding type
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:07 +02:00
tobiasKaminsky 7360bbabfe Fix spotbugs output
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:07 +02:00
tobiasKaminsky 0f9ec55d7a update combinedTestReport
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:07 +02:00
tobiasKaminsky 7802fabf0e if multiple apksigner are available, use newest one
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:07 +02:00
tobiasKaminsky f6f401aa0d change to newer spotbugs
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:07 +02:00
tobiasKaminsky 123593fc4e change Gradle to 6.1.1
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-19 11:03:06 +02:00
dependabot-preview[bot] a9b8bf7f3a Bump gradle from 3.6.3 to 4.0.0
Bumps gradle from 3.6.3 to 4.0.0.

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-19 11:03:06 +02:00
Andy Scherzinger 0630142792 Merge pull request #6320 from nextcloud/dependabot/gradle/net.bytebuddy-byte-buddy-1.10.12
Bump byte-buddy from 1.10.11 to 1.10.12
2020-06-19 09:56:47 +02:00
Tobias Kaminsky 94dfdd88a6 daily dev 20200619
check if activity is running before showing dialog
Migrate ContactsPreferenceActivity startup to type-safe API
Show "photos" in title
centralize intent creation for - FileUploader - ConflictsResolveActivity
Update translations
2020-06-19 03:37:42 +02:00
Tobias Kaminsky 33d5826337 Merge remote-tracking branch 'origin/master' into dev 2020-06-19 03:30:43 +02:00
dependabot-preview[bot] 7306bc096d Bump byte-buddy from 1.10.11 to 1.10.12
Bumps [byte-buddy](https://github.com/raphw/byte-buddy) from 1.10.11 to 1.10.12.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.10.11...byte-buddy-1.10.12)

Signed-off-by: dependabot-preview[bot] <[email protected]>
2020-06-19 01:13:00 +00:00
Joris Bodin a475af6ac6 Remove redundant style
Signed-off-by: Joris Bodin <[email protected]>
2020-06-18 11:02:52 +02:00
Andy Scherzinger c048fe2121 Merge pull request #6256 from nextcloud/clickConflictNotification
fix #5281: click on conflict notification opens conflict dialog directly
2020-06-18 09:26:58 +02:00
Tobias Kaminsky ace90ef2ad Merge pull request #6306 from nextcloud/fixBatteryDialog
check if activity is running before showing dialog
2020-06-18 07:06:47 +02:00
Tobias Kaminsky 1b1a58ed8c Merge pull request #6289 from nextcloud/ezaquarii/migrate-contacts-preference-activity-startup-to-type-safe-api
Migrate ContactsPreferenceActivity startup to type-safe API
2020-06-18 07:03:58 +02:00
tobiasKaminsky 6e7cdededb color nav bar
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-18 06:57:43 +02:00
Tobias Kaminsky cc06c8b613 Merge pull request #6283 from nextcloud/fixPhotoviewTitle
Show "photos" in title
2020-06-18 06:54:58 +02:00
Nextcloud bot 347abae8aa [tx-robot] updated from transifex 2020-06-18 03:28:10 +00:00
Tobias Kaminsky b65fd5bd46 daily dev 20200618
Theme refresh bugfix
Fix appbar photos view when enter in background
remove unneeded linearLayout id
Drop Android 4.2 support
Use MaterialButton for addAccount action in accounts screen
Add touch states to file_list_actions_bottom_sheet
tint first run
perperly align 3-dot menu of folder items
Update translations
Update 3rd-party dependencies
2020-06-18 03:38:57 +02:00
Tobias Kaminsky 6d3c96c8f3 Merge remote-tracking branch 'origin/master' into dev 2020-06-18 03:30:42 +02:00
Andy Scherzinger 6a6913b17e Merge pull request #6303 from thgoebel/bottom-sheet-touch
Add touch states to file_list_actions_bottom_sheet
2020-06-17 18:53:25 +02:00
Andy Scherzinger 28279bc3c1 Merge pull request #6284 from nextcloud/fixPhotoViewAppbar
Fix appbar photos view when enter in background
2020-06-17 16:55:18 +02:00
Andy Scherzinger 663537f304 Merge pull request #6209 from nextcloud/dependabot/gradle/com.pinterest-ktlint-0.37.0
Bump ktlint from 0.36.0 to 0.37.0
2020-06-17 16:54:38 +02:00
Andy Scherzinger 39bb258648 Merge pull request #6231 from nextcloud/theme-refresh
Theme refresh bugfix
2020-06-17 16:53:51 +02:00
Andy Scherzinger a33cc9d278 Merge pull request #6309 from nextcloud/layout
remove unneeded linearLayout id
2020-06-17 16:53:06 +02:00
Andy Scherzinger 73c22d4e8f Merge pull request #6307 from thgoebel/addaccount-materialbutton
Use MaterialButton for addAccount action in accounts screen
2020-06-17 16:37:28 +02:00
Andy Scherzinger 7b88e39572 Merge pull request #6278 from nextcloud/enh/dropAndroid42
Drop Android 4.2 support
2020-06-17 15:35:51 +02:00
Daniel Bailey 6f31f92a3f Theme refresh bugfix
Removed call to setLocalNightMode from DrawerActivity to allow the theme
setting to be done by SettingsActivity and the following activity
recreation to be handled by BaseActivity.

Signed-off-by: Daniel Bailey <[email protected]>
2020-06-17 14:33:19 +02:00
Tobias Kaminsky f499fb3ee8 Merge pull request #6265 from nextcloud/fix/iconAlignment
Properly align 3-dot menu of folder items
2020-06-17 14:26:36 +02:00
Tobias Kaminsky d053177cf7 Merge pull request #6296 from nextcloud/tintFirstRun
tint first run
2020-06-17 14:25:41 +02:00
nextcloud-android-bot 8e5f893812 Drone: update Lint results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2020-06-17 12:12:39 +00:00
Joris Bodin 7f1ba75b7d Fix appbar photos view when enter in background
Signed-off-by: Joris Bodin <[email protected]>
2020-06-17 12:21:32 +02:00
tobiasKaminsky b6b57fa06e remove unneeded linearLayout id
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-17 11:06:38 +02:00
Andy Scherzinger adac921f5c Drop Android 4.2 support
Resolves #6276

Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-17 10:58:35 +02:00
dependabot-preview[bot] 78b879d10f Bump ktlint from 0.36.0 to 0.37.2
Bumps [ktlint](https://github.com/pinterest/ktlint) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/pinterest/ktlint/releases)
- [Changelog](https://github.com/pinterest/ktlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pinterest/ktlint/compare/0.36.0...0.37.0)

changed to new syntax

Signed-off-by: dependabot-preview[bot] <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-17 10:45:36 +02:00
Thore Goebel 7c5948b61a Use MaterialButton for addAccount action in accounts screen 2020-06-17 09:00:35 +02:00
tobiasKaminsky 0b15433cda check if activity is running before showing dialog
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-17 07:57:15 +02:00
Nextcloud bot 228a44fc87 [tx-robot] updated from transifex 2020-06-17 03:26:05 +00:00
Tobias Kaminsky fbb3a339bc daily dev 20200617
remove non needed exceptions
Split off of #5150
Update translations
Update Nextcloud Android library
2020-06-17 03:40:21 +02:00
Tobias Kaminsky 5d9d094f42 Merge remote-tracking branch 'origin/master' into dev 2020-06-17 03:32:15 +02:00
Thore Goebel 094416e8e3 Add touch states to file_list_actions_bottom_sheet 2020-06-16 18:06:01 +02:00
tobiasKaminsky fd7cf51a4b tint first run
Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-15 16:23:30 +02:00
Chris Narkiewicz 3e3d80d08c Migrate ContactsPreferenceActivity startup to type-safe API
This change addresses #6277 bug in more comprehensible way.
All calls to Context.startActivity(...) starthing
ContactsPreferenceActivity are replaced with type-safe
calls to static ContactsPreferenceActivity.startActivity*
sets of APIs.

No client code should be calling `Intent(..., ContactsPreferenceActivity.class)`
constructor anymore.

See #5866 for discussion about the pattern used in this PR.

Signed-off-by: Chris Narkiewicz <[email protected]>
2020-06-13 17:42:24 +01:00
Joris Bodin fa9804d742 Show "photos" in title
Signed-off-by: Joris Bodin <[email protected]>
2020-06-12 15:25:44 +02:00
Tobias Kaminsky 49a93485c4 daily dev 20200611
add lint ignore for newApi within build dir
Ignore RestrictedApiCheck for generated files
Check also generated sources to avoid unused resources warning
Add account: grey color align text
Fix unit tests
#6247 View Binding - ShareFileFragment (Remove Jetbrains annotation)
#6247 View Binding - ShareFileFragment
Update translations
Update Nextcloud Android library
2020-06-11 03:40:38 +02:00
Tobias Kaminsky a2487ff457 Merge remote-tracking branch 'origin/master' into dev 2020-06-11 03:32:07 +02:00
Andy Scherzinger 7d000f964e perperly align 3-dot menu of folder items
Fixes #6259

Signed-off-by: Andy Scherzinger <[email protected]>
2020-06-10 17:52:48 +02:00
Tobias Kaminsky b633ebd86b daily dev 20200610
replace edge colors
remove action_sort
Fix crash when creating client
Update translations
Update 3rd-party dependencies
2020-06-10 03:39:31 +02:00
Tobias Kaminsky 77ab8116cc Merge remote-tracking branch 'origin/master' into dev 2020-06-10 03:30:43 +02:00
tobiasKaminsky e95caf3572 centralize intent creation for
- FileUploader
- ConflictsResolveActivity

fix #5281: click on conflict notification opens conflict dialog directly

Signed-off-by: tobiasKaminsky <[email protected]>
2020-06-09 14:13:23 +02:00
Tobias Kaminsky 75ce22d2db daily dev 20200609
use check arrow for chosen account
Update translations
2020-06-09 03:37:23 +02:00
Tobias Kaminsky 9801bbef76 Merge remote-tracking branch 'origin/master' into dev 2020-06-09 03:30:42 +02:00
Tobias Kaminsky 45ef15cd66 daily dev 20200607
Fix format
Added some tool hints for easier development
Update translations
2020-06-07 03:37:58 +02:00
Tobias Kaminsky 36eaee63b6 Merge remote-tracking branch 'origin/master' into dev 2020-06-07 03:30:44 +02:00
Tobias Kaminsky 6bd0fd9eb6 daily dev 20200606
set gradient via imageview for markdown previews
invert activity icon on dark mode removed outer white border on shared_via_ink
split up unit&IT tests from screenshot tests
drone/ updateScreenshot update
fix #6137
Fix after rebase
Add local variable for storageManager
Add etag column to capabilities table
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-06-06 03:41:58 +02:00
Tobias Kaminsky 5adef2978a Merge remote-tracking branch 'origin/master' into dev 2020-06-06 03:32:13 +02:00
Tobias Kaminsky 9016b98cb1 daily dev 20200605
show rich workspace in grid spanned across first row
Adjusted one comment
Fixed a bug relative to actionmode + Enhanced actionmode behaviour
ReceiveExternalFiles to new layout
Upload list activity: new sort / switch button
set sorting button text for trashbin activity, extract button text logic to utils method
Fix lint
Fix onResume FileDetailFragment
Improve google style
Fix appbar when show FileDetailFragment
Fix contextual action bar theme
Appbar like google and fix property file appbar
change trashbin view to new layout
Update translations
2020-06-05 03:37:21 +02:00
Tobias Kaminsky 389b0efe14 Merge remote-tracking branch 'origin/master' into dev 2020-06-05 03:30:43 +02:00
Tobias Kaminsky b0ac12f933 daily dev 20200604
invert if to make it more readable
only scroll to position, if highlighted item exists
Replaced primary color by element color for chosen Sort-By element
Applied a new fallback color for DarkMode
Update translations
Update Nextcloud Android library
2020-06-04 03:40:14 +02:00
Tobias Kaminsky d968dc20b3 Merge remote-tracking branch 'origin/master' into dev 2020-06-04 03:32:07 +02:00
Tobias Kaminsky e9734ffb00 daily dev 20200603
fix search related items in drawer
Removed unused items in FileDisplayActivity + Fixed some bugs
Fixed lint
Removed startSynchronization method
Removed unused Sync account + Fixed a display inconsistency bug
Increased searchview width when deployed
Restructured options menu + Removed unused items
Update translations
2020-06-03 03:37:27 +02:00
Tobias Kaminsky 89eaa947e1 Merge remote-tracking branch 'origin/master' into dev 2020-06-03 03:30:42 +02:00
Tobias Kaminsky 134286eff1 daily dev 20200530
exclude all files for backup
Do not show rich workspace when "on devices"
correct empty message for "on devices"
2020-05-30 03:37:18 +02:00
Tobias Kaminsky fe20249af3 Merge remote-tracking branch 'origin/master' into dev 2020-05-30 03:30:41 +02:00
Tobias Kaminsky af14a5ae95 daily dev 20200529
synced folder dialog, if disabled: - do not allow to click on any item - checkboxes are grey
refresh favorites result in actually reloading favorites
Fixed the color for Drawer Quota + fixed a global bug about color
Replaced the logo and header drawer background/color
Adjusted drawer quota font-size + Formated Drawer XML code
Fixed spotbugs useless issue
Fixed Android Studio lint
Adjusted drawer menu item tint management
Increased the Drawer Quota progressbar height
Replaced Drawer logo color by Primary one (with white-replace)
Fixed some Drawer errors due to clean
Added Drawer logo description
Removed the Drawer profiles part + removed unused code
Remove deprecated method and fix color in light
Refactor UploadFilesActivity
fix test
fix favorite star to top
re-arrange code
hide share icon in grid mode
Update Nextcloud Android library
Update 3rd-party dependencies
2020-05-29 03:40:29 +02:00
Tobias Kaminsky 9ed8713503 Merge remote-tracking branch 'origin/master' into dev 2020-05-29 03:32:08 +02:00
Tobias Kaminsky bb83592db3 daily dev 20200527
Revert "Fixed unused resources linter warning"
Fixed unused resources linter warning
Implemented "Switch to account" feature in Accounts list
Fix #6147
Fix lint
- disabling test_orchestrator - E2E tests only on NC19+ - fixed Tests
Improve design
Fixed definitively KTLint errors
Enhanced code syntax
Fixed Spotbugs and KtLint reports
Aligned icons + Cleaned code + Implemented listeners
Implemented ChooseAccountFragment dialog + Fixed some things around accounts management
do not let media scanner throw an exception as otherwise upload fails
Update translations
2020-05-27 03:47:28 +02:00
Tobias Kaminsky 2d3aef36f6 Merge remote-tracking branch 'origin/master' into dev 2020-05-27 03:40:55 +02:00
Tobias Kaminsky 74e7b13968 daily dev 20200526
FIX: #5752 Upload files: too much whitespace
Revert "[FIX: #5752] Upload files: too much whitespace"
If we cancel by user, we pass a reason, so app can handle it correctly
Add jaxb dependencies for builde (with jdk>8)
Fix contacts backup job interval
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-05-26 03:40:28 +02:00
Tobias Kaminsky df6256edd4 Merge remote-tracking branch 'origin/master' into dev 2020-05-26 03:32:03 +02:00
Tobias Kaminsky 5843499d7a daily dev 20200523
Add media title to mediaStore if necessary
Set title in mediaStore, when upload from "move to <nc> folder"
insert uploaded image to mediaStore
do not use media scanner
Update translations
Update 3rd-party dependencies
2020-05-23 03:37:13 +02:00
Tobias Kaminsky 46c410cad6 Merge remote-tracking branch 'origin/master' into dev 2020-05-23 03:30:40 +02:00
Tobias Kaminsky 016fa1373a daily dev 20200521
Fix upload and wrote tests
Fix upload and wrote tests
Properly show default/generated avatar if there is no one yet
Fix navigationbar in all activity
Improve userinfo item
Use ConstraintLayout
Refactor
Remove old layout
E2E overhaul - Limit online editing/stream when e2e-encrypted file - download files in subfolder to correct local folder name - use httpd/unix-directory for folder in metadata - set encryption status of subfolder
Update translations
2020-05-21 03:37:11 +02:00
Tobias Kaminsky 2c1c49076c Merge remote-tracking branch 'origin/master' into dev 2020-05-21 03:30:40 +02:00
Tobias Kaminsky d9f2d996bf daily dev 20200520
Fix wrongly sized png thumbnail after download #6006
Update translations
Update Nextcloud Android library
2020-05-20 03:39:01 +02:00
Tobias Kaminsky 13f071a721 Merge remote-tracking branch 'origin/master' into dev 2020-05-20 03:31:35 +02:00
Tobias Kaminsky 3963a0dec1 daily dev 20200519
Add licence
Add light navigationbar and fix statusbar with actionMode
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-05-19 03:40:50 +02:00
Tobias Kaminsky b417d6eae9 Merge remote-tracking branch 'origin/master' into dev 2020-05-19 03:31:38 +02:00
Tobias Kaminsky 561c5f4b94 daily dev 20200517
fix unused background
remove unused files and colors
Remove unused background for selection in grid_sync_item
Replace list_selector background by ripple effect
remove unused background in grid_image
remove unused background list_selector on grid_item
remove unused properties in list_item
Fix selected item background color
Update translations
2020-05-17 03:37:19 +02:00
Tobias Kaminsky 40c2de359f Merge remote-tracking branch 'origin/master' into dev 2020-05-17 03:30:41 +02:00
Tobias Kaminsky 2c2a07de46 daily dev 20200516
Fixed linter warnings
Add SQL query pagination to fix #5891
Add some tests for upload storage manager
Minor changes after rebase
Appbar like google
Bug fix
Fix toolbar color un darkmode
Fix tiny jump
Improve color in darkmode and fix another searchview collapsed
Fix when searchview is open and reload page
Implement new searchbar
Don't show new appbar with DeviceOnly
Fix userinfo and previewimage toolbar
Remove redundant code
Fix SyncedFoldersActivity
Fix select nav_all_files in drawer
Only show new app bar for "all_files"
Add home search appbar
spotbugs: Unused public or protected field
Fix wrong extra_account, which used user instead of account
Fix linter warnings
Tried to fix the "Spotbug" NAB detections
Removed "Dead store" spotbug error for PhotoSearchTask
Cleaned up the old toolbar progressbar dependent code
Replaced toolbar loading by SwipeRefresh in Files list
Update translations
Update 3rd-party dependencies
2020-05-16 03:37:24 +02:00
Tobias Kaminsky 7f00d2b018 Merge remote-tracking branch 'origin/master' into dev 2020-05-16 03:30:39 +02:00
Tobias Kaminsky 2b0f55982e daily dev 20200515
Fix the star for favorite for shimmers
fix crash when populating info on vanished activity
Fix the shimmer that had been accidentally hidden on master
spotbugs. needless boxing of a boolean constant
Fix gridview enabled name
Fix grid image padding dimension name
remove some warnings
fix thumbnail dynamic size
Fix fab behavior hide and ripple color
Fix after rebase
DeckApi unit test
Adjusted javadoc
Removed logging
Add license header and code format
Internal refactoring of the DeckApiImpl
Add some java doc
Rename interface and implementation for Deck integration
Use Optional for DeckIntegration and better name for interface
Don't instantiate intent each time in the for loop
Don't spam logs
Small refactorings
Added default serialVersionUID for new Exception classes
Fix typo in handle
Add GPL headers
Move Deck exception classes into own files
Move Deck integration logic to own package
Set shimmer corner same as the thumbnail
remove unused imports
Set thumbnail shimmer height same as the thumbnail
set new margin for icons in grid view
custom different radius for icons on the grid view and the list view
3 Columns on grid mode
add margin in grid mode
Add corners in shimmer effect for all modes
add thumbnail corners on grid and list mode fix to 8dp
Update translations
2020-05-15 03:37:12 +02:00
Tobias Kaminsky f53b16a48c Merge remote-tracking branch 'origin/master' into dev 2020-05-15 03:30:41 +02:00
Tobias Kaminsky bfc054f38a daily dev 20200513
consistent naming schema for folder icons
replace folder icons with material design like versions
Implemented a fixed width for local file indicator
remove EXTRA_FILE_PATH
move field to local variable
Fixed a bug relative to account switch
Splitted User ClickListener interface in two methods
spotbugs: FCBL_FIELD_COULD_BE_LOCAL
Replaced "Open" by "View Profile" and removed french translation for transifex
Aligned the files icons
Fix parameters passed to downloader during contacts list download
Added account deletion feature
Enabled the actions and the inflating for Accounts Management
Implemented view in listener + Pre-implemented menu inflating
Applied a listener on account menu button
Pre-added a menu to manage accounts
Translation fix
Update strings.xml file
Update strings.xml file
Update Nextcloud Android library
2020-05-13 03:39:50 +02:00
Tobias Kaminsky 08ed7a971e Merge remote-tracking branch 'origin/master' into dev 2020-05-13 03:31:58 +02:00
Tobias Kaminsky 1bc187ec48 daily dev 20200512
Fixed account extra argument passed to OperationsService when starting sync
Update translations
Update Nextcloud Android library
2020-05-12 03:39:16 +02:00
Tobias Kaminsky 93e0fef71b Merge remote-tracking branch 'origin/master' into dev 2020-05-12 03:31:41 +02:00
Tobias Kaminsky cbe99d978e daily dev 20200508
remove unused file
Update translations
2020-05-08 03:37:28 +02:00
Tobias Kaminsky 0734102c4c Merge remote-tracking branch 'origin/master' into dev 2020-05-08 03:30:55 +02:00
Tobias Kaminsky 4e1ef91f8c daily dev 20200507
Refactor and readd unnecessary id
Fix account removal, #6012
Remove Evernote job scheduler dependency
show "no new version available" only when clicking on it, not in background check
Readd necessaries values
Improve sort button and hide if necessary
Reduce lint warning
Remove unused dependencies
Shimmer effect in grid mode
Improve ripple
Replace shimmer effect on list mode view
Add loaderViewLibrary for youtube skeleton effect
Improve margin and lower case button
fix some warnings for lint
Hide FAB in scroll
Reduce spotbugs
Hide when scroll
Add new sort and gridview switch button. Remove duplication
fix shimmer background marge for grid mode
Fix shimmer background width for grid mode
Background shimmer size on grid image is the same as the downloaded pictures
Infinite shimmer animation continue while scrolling until the thumbnail is loaded
Replaced some file and list icons
add a corner on the background of the shimmer
stop shimmer on network error and show a default picture
Shimmer effect only when you download a thumbnail and you only display gray during the progression
remove unused shimmer effects
Replaced some icons by Material ones + Removed a useless double-icon
add facebook shimmer effect
Replaced some icons
add facebook shimmer effect
Updated headers (removed due to autochange) + Replaced some icons by Material ones
Replaced some icons by Material ones to (removed useless icons)
Remove unused class
Update translations
2020-05-07 03:37:13 +02:00
Tobias Kaminsky 25adbd4f47 Merge remote-tracking branch 'origin/master' into dev 2020-05-07 03:30:44 +02:00
Tobias Kaminsky c3f015b695 daily dev 20200506
Migrate UserListAdapter to new User model
Update translations
Update 3rd-party dependencies
2020-05-06 03:38:18 +02:00
Tobias Kaminsky f0c09bdd7b Merge remote-tracking branch 'origin/master' into dev 2020-05-06 03:31:41 +02:00
Tobias Kaminsky abaecc3bcc daily dev 20200505
Fix color
Update translations
2020-05-05 03:37:33 +02:00
Tobias Kaminsky b12671234a Merge remote-tracking branch 'origin/master' into dev 2020-05-05 03:30:54 +02:00
Tobias Kaminsky 5e6beb78ff daily dev 20200501
fix typo organized imports
fix #4540
fix multiselect #5970
Migrate remaining jobs to WorkManager
Fixed invisible back-button
add missing work manager function to create notification work
Migrate NotificationJob to WorkManager API
Update translations
Update Nextcloud Android library
2020-05-01 03:37:40 +02:00
Tobias Kaminsky 834ad8018a Merge remote-tracking branch 'origin/master' into dev 2020-05-01 03:30:51 +02:00
Tobias Kaminsky 84d740c231 Merge remote-tracking branch 'origin/master' into dev 2020-04-30 03:31:56 +02:00
Tobias Kaminsky bbdeec4d9e daily dev 20200429
Fix background tests
Remove unused argument
Unused function
Improve methode name
Revert " Bugfix for #5929"
Fix dark mode "follow system"
Put back the Material values (due invision false values)
revert background image for notifications
Tinted checkboxes in ConflictsResolveDialog Activity icons have a 'night mode' background circle. Signed-off-by: Daniel Bailey <[email protected]>
set secondary action button in notifications to grey
proper toolbar theming ignoring dark/light theme for toolbar colors
properly theme SwipeRefreshLayout
unify divider colors
change dark theme background to #121212 see https://material.io/design/color/dark-theme.html#properties
dark theme favorite icon
don't tint drawer menu toggle
use proper rtl values
raise margin for bottom sheet menu item divider
Dark Mode Improvements (2)
Fixes bug whereby a user initiated change to dark mode isn't applied for "follow system".
Bump to 3.13 alpha
Better item selected background color in dark mode
Improve variable name
Change ActionMode color
Correction Whitespace and remove superficial comments
add missing back button in ManageAccountsActivity & UserInfoActivity
Enhanced dark mode for some text colors
Replaced comma separator by bullet character in files list
Adjusted size of file list item
Removed edited icons, merged changes in a new branch
Set color of hamburger icon
Replaced some icons by Material ones to (removed useless icons)
Fix setting background if change manualy dark theme (And remove duplication)
Changed Drawer and global texts colors
Reformat ThemeUtils
Black Status bar in light theme <23 api
Refactor and fix bug
Change font color for darkmode and remove unused code
Refactor
New color, white for light theme and grey for dark theme. New progressbar
Fixed bug relative to inflating (due to < API 21)
Start files sync job when enabling auto upload
Migrate file sync related jobs to WorkManager API
Replaced colors by native Android ones
Update translations
2020-04-29 03:37:24 +02:00
Tobias Kaminsky 5858f68878 Merge remote-tracking branch 'origin/master' into dev 2020-04-29 03:30:49 +02:00
Tobias Kaminsky c1396fd3b8 daily dev 20200425
Update translations
2020-04-25 03:37:28 +02:00
Tobias Kaminsky 46f0880b83 Merge remote-tracking branch 'origin/master' into dev 2020-04-25 03:30:55 +02:00
Tobias Kaminsky 8b9147ac4a daily dev 20200424
Switch to bouncycastle
Update translations
2020-04-24 03:41:00 +02:00
Tobias Kaminsky 4653f10957 Merge remote-tracking branch 'origin/master' into dev 2020-04-24 03:31:09 +02:00
Tobias Kaminsky 894b4b0977 daily dev 20200423
Formated the code (applied DRY principle)
Resolved the crash when account is not new (Auth)
refactorings
close SSO streams
Update translations
2020-04-23 03:39:51 +02:00
Tobias Kaminsky 1a473b6f6e Merge remote-tracking branch 'origin/master' into dev 2020-04-23 03:31:03 +02:00
Tobias Kaminsky fde2de08e0 daily dev 20200422
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-04-22 03:41:23 +02:00
Tobias Kaminsky f53e509085 Merge remote-tracking branch 'origin/master' into dev 2020-04-22 03:32:05 +02:00
Tobias Kaminsky d37e0e8254 Merge remote-tracking branch 'origin/master' into dev 2020-04-21 03:33:10 +02:00
Tobias Kaminsky c0e80d5ebd daily dev 20200417
code formatting
Make the name collision policy for auto uploads selectable, fixes #5599.
Release connections after usage
[FIX: #5752] Upload files: too much whitespace
Readd enableAccountHandling for show slider
Update 3rd-party dependencies
2020-04-17 03:41:33 +02:00
Tobias Kaminsky f22a7c70b3 Merge remote-tracking branch 'origin/master' into dev 2020-04-17 03:30:56 +02:00
Tobias Kaminsky 8a5d4bec67 daily dev 20200416
fix https://github.com/nextcloud/android/issues/5457
Update translations
2020-04-16 03:38:24 +02:00
Tobias Kaminsky 766b7c755a Merge remote-tracking branch 'origin/master' into dev 2020-04-16 03:30:53 +02:00
Tobias Kaminsky 6c889e62cb daily dev 20200415
Don't put User model into ConflictsResolveActivity account extra
show all files when clicking on show files
Update translations
Update Nextcloud Android library
2020-04-15 03:40:19 +02:00
Tobias Kaminsky 7f3ca4fa9f Merge remote-tracking branch 'origin/master' into dev 2020-04-15 03:32:45 +02:00
Tobias Kaminsky e53d40a4e3 daily dev 20200410
Fix OOM during image browsing
Do not tint dialog
Migrate FileDownloader server to User model
2020-04-10 03:37:11 +02:00
Tobias Kaminsky bf7e13efbf Merge remote-tracking branch 'origin/master' into dev 2020-04-10 03:30:52 +02:00
Tobias Kaminsky 7a9e67e788 daily dev 20200409
Log exception in ContactsImportWork catch block
codacy: Avoid unused local variables
codacy: Avoid unused method parameters
reformat code
codacy: Unnecessary use of fully qualified name
codacy: Avoid unused private fields
codacy: Avoid unused imports
check if at least one account is set up, before receiving files
Change pdf icon
Directly show loading spinner show "no files" only if folder is known to be empty
Fix crash while showing ConflictDialog
Rich workspaces: can be null (if disabled), or string (empty or with content)
Search: only parse search if search event is there
NC18+: add possibility to set expiration date on user/group shares
Ninja-fix formatting of CONTRIBUTING.md
Migrate contacts import job to new API
Migrate ChooseRichDocumentsTemplateDialogFragment to User
Migrate EditShareFragment to new User model
Remove deprecated contacts backup job
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-04-09 03:39:02 +02:00
Tobias Kaminsky fbfefd5235 Merge remote-tracking branch 'origin/master' into dev 2020-04-09 03:30:53 +02:00
Tobias Kaminsky 535624264c Merge remote-tracking branch 'origin/master' into dev 2020-04-08 03:32:01 +02:00
Tobias Kaminsky a7bf4aa581 daily dev 20200405
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-04-05 03:38:20 +02:00
Tobias Kaminsky 67e2fee514 Merge remote-tracking branch 'origin/master' into dev 2020-04-05 03:30:56 +02:00
Tobias Kaminsky 7d2d48f1c6 Merge remote-tracking branch 'origin/master' into dev 2020-04-04 03:32:38 +02:00
Tobias Kaminsky 7f47effb34 daily dev 20200403
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-04-03 03:39:12 +02:00
Tobias Kaminsky 7651a9df83 Merge remote-tracking branch 'origin/master' into dev 2020-04-03 03:30:54 +02:00
Tobias Kaminsky d66a60e6af Merge remote-tracking branch 'origin/master' into dev 2020-04-02 03:34:12 +02:00
Tobias Kaminsky 697d660d42 daily dev 20200331
if no offline editor is available, use OO/Cool/Text
edit downloaded md/text file is working now
First use preferred mimetypes, then editor for optional mimetypes
Update translations
Update 3rd-party dependencies
2020-03-31 03:38:56 +02:00
Tobias Kaminsky c45ae25414 Merge remote-tracking branch 'origin/master' into dev 2020-03-31 03:30:55 +02:00
Tobias Kaminsky 14d6e473a3 daily dev 20200327
Changelog for 3.11.0
Add changelog for 3.11.0
Update translations
2020-03-27 03:37:11 +01:00
Tobias Kaminsky 46051694fe Merge remote-tracking branch 'origin/master' into dev 2020-03-27 03:30:50 +01:00
Tobias Kaminsky 44793c2ba7 daily dev 20200325
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-03-25 03:42:24 +01:00
Tobias Kaminsky 9caa4ab460 Merge remote-tracking branch 'origin/master' into dev 2020-03-25 03:32:41 +01:00
Tobias Kaminsky 42f5469afc daily dev 20200324
Bump to latest firebase messaging
fix activity image loading
Update translations
Update 3rd-party dependencies
2020-03-24 03:38:55 +01:00
Tobias Kaminsky 0b19e2129d Merge remote-tracking branch 'origin/master' into dev 2020-03-24 03:30:51 +01:00
Tobias Kaminsky 796db9d195 daily dev 20200323
Fix for sso Grant/Deny dialog text color in dark mode.
Wrong string
Update translations
2020-03-23 03:37:18 +01:00
Tobias Kaminsky bc2a0725ac Merge remote-tracking branch 'origin/master' into dev 2020-03-23 03:30:52 +01:00
Tobias Kaminsky 78f1289cd5 daily dev 20200320
revert to master lib
Add circle support for searching / displaying
Fixes "Report a bug" button in community tab
Adjusted file list banner background colour in dark mode
Tint buttons in upload
Dark Mode Improvements
fix lint to exclude correct freemarker version
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-03-20 03:40:13 +01:00
Tobias Kaminsky 1227572edd Merge remote-tracking branch 'origin/master' into dev 2020-03-20 03:32:19 +01:00
Tobias Kaminsky f8428a0d1f daily dev 20200319
remove outdated background for dev
Update translations
2020-03-19 03:37:09 +01:00
Tobias Kaminsky 5f30815410 Merge remote-tracking branch 'origin/master' into dev 2020-03-19 03:30:50 +01:00
Tobias Kaminsky e568054e94 daily dev 20200318
fix wrong assumption how conflict dialog show work updated tests
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2020-03-18 03:37:22 +01:00
Tobias Kaminsky 0c051fd72b Merge remote-tracking branch 'origin/master' into dev 2020-03-18 03:30:52 +01:00
Tobias Kaminsky 3f1dfed3a8 Merge remote-tracking branch 'origin/master' into dev 2020-03-17 03:32:02 +01:00
Tobias Kaminsky 0c7bec049f daily dev 20200313
Migrate contacts backup job to new background job manager API
add gradient to preview images in toolbar
fix crash when sorting in folder picker
remove unneeded ressource
adjust share size
Correct font color in dark mode
tint back button correctly
Update translations
2020-03-13 03:37:10 +01:00
Tobias Kaminsky f36ac479a8 Merge remote-tracking branch 'origin/master' into dev 2020-03-13 03:30:52 +01:00
Tobias Kaminsky 510c6c26e8 daily dev 20200312
v3.12.-Alpha1
Fix border of disabled FAB
Update translations
Update Nextcloud Android library
2020-03-12 03:39:22 +01:00
Tobias Kaminsky 909c9606ce Merge remote-tracking branch 'origin/master' into dev 2020-03-12 03:31:58 +01:00
Tobias Kaminsky 4923a8efa7 daily dev 20200311
All files shows root again annotated functions with correct NonNull
Improve readability on active drawer item
Use UTF8 PostMethod everywhere
Update contributing.md
Update translations
2020-03-11 03:36:49 +01:00
Tobias Kaminsky 3e741eee31 Merge remote-tracking branch 'origin/master' into dev 2020-03-11 03:30:50 +01:00
Tobias Kaminsky 99e3843427 daily dev 20200310
Fix NPE on restoring file detail sharing fragment
Update translations
2020-03-10 03:36:51 +01:00
Tobias Kaminsky 3996901d7c Merge remote-tracking branch 'origin/master' into dev 2020-03-10 03:30:50 +01:00
Tobias Kaminsky c09264bc0f daily dev 20200307
remove unused dimens value
remove unneeded call
use correct dimens id
remove sdk17 checks
Remove outdated right/left as now only start/end is needed
change minimum supported Android version to 4.2
Properly signal error when user id migration fails
Enabled migration manager in MainApp
Removed MigrationManager Robolectric tests
Support for optional migrations
Migrations manager
remove ununsed raw files
remove unused class
Update translations
Update 3rd-party dependencies
2020-03-07 03:38:14 +01:00
Tobias Kaminsky 4f7fd16470 Merge remote-tracking branch 'origin/master' into dev 2020-03-07 03:30:49 +01:00
Tobias Kaminsky d19e9e0556 daily dev 20200306
Fix test
Update Nextcloud Android library
Update 3rd-party dependencies
2020-03-06 03:41:32 +01:00
Tobias Kaminsky 56d7169ca2 Merge remote-tracking branch 'origin/master' into dev 2020-03-06 03:32:20 +01:00
Tobias Kaminsky 3a77d8071d daily dev 20200305
update dev changelog recognition for updating library
Update translations
Update Nextcloud Android library
2020-03-05 07:27:09 +01:00
Tobias Kaminsky a65b208355 Merge remote-tracking branch 'origin/master' into dev 2020-03-05 07:19:03 +01:00
Tobias Kaminsky 0f0173ccf3 Merge remote-tracking branch 'origin/master' into dev 2020-03-05 03:32:28 +01:00
Tobias Kaminsky 8c2c38d916 daily dev 20200304
switch back to light mode after test
remove unneeded strings
Disable old login method
Update Nextcloud Android library
2020-03-04 03:37:34 +01:00
Tobias Kaminsky 4f0bf90433 Merge remote-tracking branch 'origin/master' into dev 2020-03-04 03:30:48 +01:00
Tobias Kaminsky bd01843be7 daily dev 20200303
fix dev lib replacement
dev: change library before building
Show slideshow as new activity
Update translations
Update Nextcloud Android library
2020-03-03 07:35:01 +01:00
Tobias Kaminsky d5fe7679da Merge remote-tracking branch 'origin/master' into dev 2020-03-03 07:26:42 +01:00
Tobias Kaminsky be11180ca9 Merge remote-tracking branch 'origin/master' into dev 2020-03-03 03:32:22 +01:00
Tobias Kaminsky 9938f2e421 daily dev 20200228
3facd6c20 Merge remote-tracking branch 'origin/master' into dev
d88dac628 Merge pull request #5536 from nextcloud/changeFolderString
42d1dafaf Change to better english
43dfa7a77 Merge pull request #5528 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.6.0
4481af43f Merge pull request #5529 from nextcloud/dependabot/gradle/org.mockito-mockito-core-3.3.1
36dbdf5f6 Merge pull request #5527 from nextcloud/dependabot/gradle/markwonVersion-4.2.2
cd893c685 Bump mockito-core from 3.3.0 to 3.3.1
8b14e8a8b Bump detekt-gradle-plugin from 1.5.1 to 1.6.0
82d0ad98d Bump markwonVersion from 4.2.1 to 4.2.2
eb94a66b2 [tx-robot] updated from transifex
543e25667 [tx-robot] updated from transifex
97c53b38c daily dev 20200225
2020-02-28 03:41:00 +01:00
Tobias Kaminsky 3facd6c200 Merge remote-tracking branch 'origin/master' into dev 2020-02-28 03:32:21 +01:00
Tobias Kaminsky 97c53b38ce daily dev 20200225
d7febee4f Merge remote-tracking branch 'origin/master' into dev
a163321fa Merge pull request #5511 from nextcloud/dependabot/gradle/org.mockito-mockito-core-3.3.0
6ab91c959 [tx-robot] updated from transifex
68d6fe555 daily dev 20200224
2020-02-25 03:39:00 +01:00
Tobias Kaminsky d7febee4fa Merge remote-tracking branch 'origin/master' into dev 2020-02-25 03:32:22 +01:00
Tobias Kaminsky 68d6fe5557 daily dev 20200224
f782e3d9f Merge remote-tracking branch 'origin/master' into dev
c6bb9744e Merge pull request #5498 from nextcloud/stableMaterial
0b90250b6 [tx-robot] updated from transifex
7b049a99d [tx-robot] updated from transifex
70471b623 [tx-robot] updated from transifex
bdaaf63fc [tx-robot] updated from transifex
1cc383df2 daily dev 20200222
2020-02-24 03:37:29 +01:00
Tobias Kaminsky f782e3d9fd Merge remote-tracking branch 'origin/master' into dev 2020-02-24 03:30:48 +01:00
Tobias Kaminsky 1cc383df2a daily dev 20200222
84cef3baf Merge remote-tracking branch 'origin/master' into dev
e1b8d525e Merge pull request #5445 from nextcloud/headMethod
92f5e07b9 [tx-robot] updated from transifex
de4fc2cd2 daily dev 20200221
2020-02-22 03:37:31 +01:00
Tobias Kaminsky 84cef3bafc Merge remote-tracking branch 'origin/master' into dev 2020-02-22 03:30:46 +01:00
Tobias Kaminsky de4fc2cd2b daily dev 20200221
9b3f00c12 Merge remote-tracking branch 'origin/master' into dev
da6a29a51 Merge pull request #5493 from nextcloud/dependabot/gradle/androidx.work-work-runtime-ktx-2.3.2
2356e839d Bump work-runtime-ktx from 2.3.1 to 2.3.2
7305272bd Merge pull request #5494 from nextcloud/dependabot/gradle/androidx.work-work-runtime-2.3.2
be238a3f9 Merge pull request #5471 from nextcloud/richWorkspace18only
65548c4b4 [tx-robot] updated from transifex
ac6a64b67 Drone: update Lint results to reflect reduced error/warning count [skip ci]
993aa4afb Bump work-runtime from 2.3.0 to 2.3.2
0f1da5238 [tx-robot] updated from transifex
26bbfa353 daily dev 20200219
2020-02-21 03:37:48 +01:00
Tobias Kaminsky 9b3f00c12d Merge remote-tracking branch 'origin/master' into dev 2020-02-21 03:30:48 +01:00
Tobias Kaminsky 26bbfa3538 daily dev 20200219
3f62afabf Merge remote-tracking branch 'origin/master' into dev
5d428fe9a Merge pull request #4788 from nextcloud/instantupload_all
49f3a6725 ConflictsResolveActivity: code style and readability improvements
6540e3ef7 Upload list conflicts: replace trash icon with menu and add resolve action
a4ff1f11d Customize upload sync conflict notification strings
e77ffa00a Fix synced folder layout form control widgets alignment
91ef307e7 Fix database migration of field forceOverwrite to NameCollisionPolicy
52d089b18 FileUploader: fix codacy issues and SpotBugs
ec27f840a FileUploader: code cleanup
7713a28a4 FileUploader: require explicit NameCollisionPolicy and change default used value
6783e8ab4 Make file uploads ask the user what to do when the file already exists on remote
213002f44 Make newly created synced folders auto upload existing files by default
1b7bd72c4 ADD: [instantupload] setting to also upload existing files
c24345316 Merge pull request #5465 from nextcloud/fix/create-folder-crash-autosync
d178cde22 daily dev 20200218
2020-02-19 03:37:25 +01:00
Tobias Kaminsky 3f62afabf6 Merge remote-tracking branch 'origin/master' into dev 2020-02-19 03:30:48 +01:00
Tobias Kaminsky d178cde220 daily dev 20200218
2b26a5176 Merge remote-tracking branch 'origin/master' into dev
4616b0d40 Merge pull request #5447 from nextcloud/ezaquarii/migrate-jobs-to-new-user-model
20b910a64 Merge pull request #5442 from nextcloud/ezaquarii/fix-crash-on-text-file-creation
0977c3791 Fix crash during text file creation
5c74f2b1b [tx-robot] updated from transifex
27fabe745 [tx-robot] updated from transifex
60295480b daily dev 20200215
2020-02-18 03:37:38 +01:00
Tobias Kaminsky 2b26a5176a Merge remote-tracking branch 'origin/master' into dev 2020-02-18 03:30:49 +01:00
Tobias Kaminsky 60295480b5 daily dev 20200215
020e5a2c3 Merge remote-tracking branch 'origin/master' into dev
490b292ad Merge pull request #5300 from nextcloud/sharedSearchAgain
61027524f test
af93382c6 test
68f06ea15 [tx-robot] updated from transifex
2d82f80e9 daily dev 20200214
2020-02-15 03:37:26 +01:00
Tobias Kaminsky 020e5a2c3b Merge remote-tracking branch 'origin/master' into dev 2020-02-15 03:30:49 +01:00
Tobias Kaminsky 2d82f80e9c daily dev 20200214
706ae93a3 Merge remote-tracking branch 'origin/master' into dev
045a7aa9e Merge pull request #5466 from nextcloud/squareIcon
eefeda930 Add square google icon
7156aaff2 [tx-robot] updated from transifex
57ce989a5 daily dev 20200213
2020-02-14 03:38:38 +01:00
Tobias Kaminsky 706ae93a32 Merge remote-tracking branch 'origin/master' into dev 2020-02-14 03:31:56 +01:00
Tobias Kaminsky 57ce989a5a daily dev 20200213
23fea78a9 Merge remote-tracking branch 'origin/master' into dev
67880e275 Merge pull request #5450 from nextcloud/etmScreenshots
a063f32d2 Merge pull request #5434 from nextcloud/ezaquarii/migrate-account-list-to-new-user-model
d841f6425 Screenshot tests for ETM
0569b0de6 Screenshot tests ManageAccountsActivity
53024d1cd Migrate account list to new user model
e716c99a9 [tx-robot] updated from transifex
1dd355dde daily dev 20200212
2020-02-13 03:37:26 +01:00
Tobias Kaminsky 23fea78a96 Merge remote-tracking branch 'origin/master' into dev 2020-02-13 03:30:48 +01:00
Tobias Kaminsky 1dd355ddec daily dev 20200212
e1d684255 Merge remote-tracking branch 'origin/master' into dev
f520f2f9a Merge pull request #5436 from nextcloud/ezaquarii/make-user-model-parcelable
25cbeb4bd Merge pull request #5422 from nextcloud/gplayScreenshots
87eb8e0d1 [tx-robot] updated from transifex
644b91dce daily dev 20200211
2020-02-12 03:37:18 +01:00
Tobias Kaminsky e1d6842552 Merge remote-tracking branch 'origin/master' into dev 2020-02-12 03:30:48 +01:00
Tobias Kaminsky 644b91dce0 daily dev 20200211
92ddf10d0 Merge remote-tracking branch 'origin/master' into dev
5905b1c5a Merge pull request #5432 from nextcloud/ezaquarii/migrate-drawer-menu-utils-to-new-user-model
4be18adc2 Merge pull request #5064 from nextcloud/ezaquarii/extract-account-logic-from-base-activity-into-mixin
619b5d05d Merge pull request #5419 from nextcloud/dependabot/gradle/org.projectlombok-lombok-1.18.12
2d6e73dd3 Merge pull request #5414 from nextcloud/fixContactCrash
1bb04aa29 also increase annotationProcessor
6048243f4 Fix crash: Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.Void[]
0027df9d0 [tx-robot] updated from transifex
6dd5d925a Merge pull request #5443 from nextcloud/fixTransifex
b4db9d07a do not break line on transifex
b5fb9c137 Migrate drawer menu utilities to new user model
a906a14b1 daily dev 20200208
2020-02-11 03:38:43 +01:00
Tobias Kaminsky 92ddf10d07 Merge remote-tracking branch 'origin/master' into dev 2020-02-11 03:31:51 +01:00
Tobias Kaminsky a906a14b15 daily dev 20200208
66c25fa25 Merge remote-tracking branch 'origin/master' into dev
f415cd966 Merge pull request #5420 from nextcloud/dependabot/gradle/org.parceler-parceler-1.1.13
2b2800bc7 Bump parceler from 1.1.12 to 1.1.13
98d751880 Merge pull request #5418 from nextcloud/dependabot/gradle/org.parceler-parceler-api-1.1.13
8ce35e3f5 manually bump lint
6fbe0b595 daily dev 20200207
2020-02-08 03:38:35 +01:00
Tobias Kaminsky 66c25fa255 Merge remote-tracking branch 'origin/master' into dev 2020-02-08 03:31:55 +01:00
Tobias Kaminsky 6fbe0b5952 daily dev 20200207
ad21ad34c Merge remote-tracking branch 'origin/master' into dev
b13cba02c Merge pull request #5412 from nextcloud/dependabot/gradle/androidx.work-work-runtime-ktx-2.3.1
dc1a3f1f0 Drone: update Lint results to reflect reduced error/warning count [skip ci]
aa3727e03 Bump work-runtime-ktx from 2.3.0 to 2.3.1
7dbf43b2f Merge pull request #5413 from nextcloud/lint
4a1e1b1ca Bump to "Obsolete custom lint check"
f18b9363a daily dev 20200206
2020-02-07 03:37:51 +01:00
Tobias Kaminsky ad21ad34cd Merge remote-tracking branch 'origin/master' into dev 2020-02-07 03:30:48 +01:00
Tobias Kaminsky f18b9363ad daily dev 20200206
ac971ae36 Merge remote-tracking branch 'origin/master' into dev
94abac7f7 Merge pull request #5403 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.5.1
8890770fb Bump detekt-gradle-plugin from 1.5.0 to 1.5.1
823808e37 Merge pull request #5407 from nextcloud/changelog-master-stable-3.10.1
c7669fe9d Merge pull request #5393 from nextcloud/removeUnsetType
e8d00fd81 proper headline formatting
c5be0ad7e Merge pull request #5399 from nextcloud/extractArbitraryDataSet
a0de3e5ad Add changelog for 3.10.1
0936945b3 Merge pull request #5328 from nextcloud/fix/not-enough-space-dialog
c7d2b0e80 Merge pull request #5404 from nextcloud/uploadReportVerbose
7e4711a23 github comment if preliminary step failed
778fec9e2 extract openDrawer test into AbstractIT rebased
3a78c1b9d add more UI tests
e118f9a51 Remove UnsetType as we do not have bottom bar anymore…
c7ea6458b extract ArbitraryDataSet class cleanup
7c84a9f92 Merge pull request #5296 from nextcloud/fix/defective-search
f9a47e6b3 Formated the code
c64e90e8c Merge pull request #5401 from nextcloud/needlesslyBoxing
84adb9eaa Merge pull request #5400 from nextcloud/rakekniven-patch-1
0d0a4a319 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
d7918c59c Merge commit '1bf079d2cd85fe4770716bbf02790651290d66c1'
1bf079d2c NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION: Method needlessly boxes a boolean constant
e19b58178 l10n: Grammar: url -> URL
75c0871e6 Merge pull request #5395 from nextcloud/dependabot/gradle/org.greenrobot-eventbus-3.2.0
ebba5ea4e Merge pull request #5396 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.5.0
a2e327bdc [tx-robot] updated from transifex
a5d0fe936 daily dev 20200205
2020-02-06 03:39:07 +01:00
Tobias Kaminsky ac971ae36d Merge remote-tracking branch 'origin/master' into dev 2020-02-06 03:30:48 +01:00
Tobias Kaminsky a5d0fe9362 daily dev 20200205
4ce26101b Merge remote-tracking branch 'origin/master' into dev
f9af611a2 Merge pull request #4878 from nextcloud/ezaquarii/contributions-engineering-practices-section
fab19e8f7 minor enhancements
460389579 Added TOC links and Engineering section to CONTRIBUTING.md
f7d7a0c7a Merge pull request #5378 from nextcloud/dependabot/gradle/markwonVersion-4.2.1
f7220f461 Merge pull request #5246 from siebica/master
3d5a40fa0 Merge pull request #5169 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.4.0
eb903ab48 add UI test for Markdown
64c253be6 Merge pull request #5089 from cheecodes/master
ff400e16b [tx-robot] updated from transifex
55f6aebab daily dev 20200204
2020-02-05 03:39:11 +01:00
Tobias Kaminsky 4ce26101b0 Merge remote-tracking branch 'origin/master' into dev 2020-02-05 03:30:47 +01:00
Tobias Kaminsky 55f6aebabf daily dev 20200204
c9d3605ec Merge remote-tracking branch 'origin/master' into dev
5d868e47f Merge pull request #5363 from nextcloud/fix/lolipop-webview-crash
0c272ad1d Merge pull request #5231 from nextcloud/roundedCorners
b787284ab bump spotbugs
6e202dd94 Merge pull request #5383 from nextcloud/whitePrimaryColor
66b78e0eb changed to 8dp
5ac25d545 remove unneeded resource
176c7f893 Merge pull request #5382 from nextcloud/prLineWrapping
120a6ca87 PR template: line wrapping
81c3bcef3 Merge pull request #5381 from nextcloud/movePRtemplate
622f1f9f6 move pr template
f8ff0e106 Auth activity with primary white color
aeee4beba [tx-robot] updated from transifex
d60133bb8 [tx-robot] updated from transifex
c3be96884 [tx-robot] updated from transifex
489b5e051 daily dev 20200201
2020-02-04 03:38:36 +01:00
Tobias Kaminsky c9d3605ec2 Merge remote-tracking branch 'origin/master' into dev 2020-02-04 03:31:42 +01:00
Tobias Kaminsky 489b5e0514 daily dev 20200201
158d06112 Merge remote-tracking branch 'origin/master' into dev
9c12102d2 Merge pull request #5360 from nextcloud/testDocumentation
b8d042e17 Basic documentation of how to test add checklist as PR template
e617e5708 Merge pull request #5358 from nextcloud/transifexFix
73697963c [tx-robot] updated from transifex
bd99ee995 No need of CDATA
a8409b3aa daily dev 20200131
2020-02-01 03:37:14 +01:00
Tobias Kaminsky 158d061127 Merge remote-tracking branch 'origin/master' into dev 2020-02-01 03:30:44 +01:00
Tobias Kaminsky a8409b3aa8 daily dev 20200131
d93f893b6 Merge remote-tracking branch 'origin/master' into dev
8dc162960 Merge pull request #5209 from nextcloud/ooDownloadFile
7f558a14a Merge pull request #5352 from nextcloud/dependabot/gradle/daggerVersion-2.26
613c24220 daily dev 20200130
2020-01-31 03:37:21 +01:00
Tobias Kaminsky d93f893b6b Merge remote-tracking branch 'origin/master' into dev 2020-01-31 03:30:42 +01:00
Tobias Kaminsky 613c242205 daily dev 20200130
edc6198f2 daily dev 20200129
0c3c286c0 Merge remote-tracking branch 'origin/master' into dev
4a9fc087a Merge pull request #5349 from nextcloud/devBranchMigration
cfb830668 dev: do not modify master, but push everything to dev branch
e03b819ef daily dev 20200129
2020-01-30 03:37:27 +01:00
Tobias Kaminsky edc6198f29 daily dev 20200129
0c3c286c0 Merge remote-tracking branch 'origin/master' into dev
4a9fc087a Merge pull request #5349 from nextcloud/devBranchMigration
cfb830668 dev: do not modify master, but push everything to dev branch
e03b819ef daily dev 20200129
2020-01-29 08:52:36 +01:00
Tobias Kaminsky 0c3c286c0a Merge remote-tracking branch 'origin/master' into dev 2020-01-29 08:45:22 +01:00
Tobias Kaminsky 7aab6137be daily dev 20200124
e4f099237 Merge pull request #5203 from nextcloud/directEditingPre5
04b5b6ae3 Merge pull request #5288 from nextcloud/dependabot/gradle/androidx.work-work-runtime-2.3.0
fc8c9b7bb Bump work-runtime from 2.2.0 to 2.3.0
63b5276c8 Merge pull request #5289 from nextcloud/dependabot/gradle/androidx.lifecycle-lifecycle-viewmodel-ktx-2.2.0
ed2e90bf3 Merge pull request #5286 from nextcloud/dependabot/gradle/androidx.work-work-runtime-ktx-2.3.0
ce6ce0663 [tx-robot] updated from transifex
b62d29194 Bump lifecycle-viewmodel-ktx from 2.1.0 to 2.2.0
d42566be7 Bump work-runtime-ktx from 2.2.0 to 2.3.0
f783eed9b [tx-robot] updated from transifex
642682b21 daily dev 20200122
2020-01-24 03:38:01 +01:00
515 changed files with 11216 additions and 8113 deletions

No files matched your search

+14 -50
View File
@@ -22,13 +22,14 @@ steps:
- emulator-headless -avd android-27 -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 src/main/res/values/setup.xml
- sed -i s"#server#server#" gradle.properties
- sed -i s"#1#5#" ./src/androidTest/java/com/nextcloud/client/RetryTestRule.kt
- ./gradlew assembleGplay
- ./gradlew assembleGplayDebug
- scripts/wait_for_emulator.sh
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew jacocoTestGplayDebugUnitTestReport && scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew installGplayDebugAndroidTest
- scripts/wait_for_server.sh "server"
- ./gradlew createGplayDebugCoverageReport -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew createGplayDebugCoverageReport -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest && scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew combinedTestReport
- name: notify
image: drillster/drone-email
@@ -55,6 +56,8 @@ steps:
services:
- name: server
image: nextcloudci/server:server-17 # also change in updateScreenshots.sh
environment:
EVAL: true
commands:
- BRANCH='stable18' /usr/local/bin/initnc.sh
- echo 127.0.0.1 server >> /etc/hosts
@@ -101,13 +104,14 @@ steps:
- scripts/checkIfRunDrone.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST || exit 0
- emulator-headless -avd android-27 -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 src/main/res/values/setup.xml
- sed -i s"#1#5#" ./src/androidTest/java/com/nextcloud/client/RetryTestRule.kt
- ./gradlew assembleGplay
- ./gradlew assembleGplayDebug
- scripts/wait_for_emulator.sh
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew jacocoTestGplayDebugUnitTestReport && scripts/deleteOutdatedComments.sh "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew installGplayDebugAndroidTest
- scripts/wait_for_server.sh "server"
- ./gradlew createGplayDebugCoverageReport -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew createGplayDebugCoverageReport -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest && scripts/deleteOutdatedComments.sh "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew combinedTestReport
- curl -o codecov.sh https://codecov.io/bash
- bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
@@ -136,6 +140,8 @@ steps:
services:
- name: server
image: nextcloudci/server:server-17 # also change in updateScreenshots.sh
environment:
EVAL: true
commands:
- /usr/local/bin/initnc.sh
- echo 127.0.0.1 server >> /etc/hosts
@@ -186,8 +192,7 @@ steps:
- ./gradlew assembleGplayDebug
- scripts/wait_for_emulator.sh
- ./gradlew installGplayDebugAndroidTest
- scripts/wait_for_server.sh "server"
- ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Screenshot" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest && scripts/deleteOutdatedComments.sh "stable" "Screenshot" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Screenshot" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- name: notify
image: drillster/drone-email
settings:
@@ -209,26 +214,6 @@ steps:
- failure
branch:
- master
services:
- name: server
image: nextcloudci/server:server-17 # also change in updateScreenshots.sh
commands:
- BRANCH='stable18' /usr/local/bin/initnc.sh
- su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1"
- su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2"
- su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3"
- su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G"
- su www-data -c "php /var/www/html/occ group:add users"
- su www-data -c "php /var/www/html/occ group:adduser users user1"
- su www-data -c "php /var/www/html/occ group:adduser users user2"
- su www-data -c "git clone -b stable18 https://github.com/nextcloud/activity.git /var/www/html/apps/activity/"
- su www-data -c "php /var/www/html/occ app:enable activity"
- su www-data -c "git clone -b stable18 https://github.com/nextcloud/text.git /var/www/html/apps/text/"
- su www-data -c "php /var/www/html/occ app:enable text"
- su www-data -c "php /var/www/html/occ app:enable end_to_end_encryption"
- /usr/local/bin/run.sh
trigger:
branch:
- master
@@ -261,8 +246,8 @@ steps:
- ./gradlew assembleGplayDebug
- scripts/wait_for_emulator.sh
- ./gradlew installGplayDebugAndroidTest
- scripts/wait_for_server.sh "server"
- ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Screenshot" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- sed -i s"#5#1#" ./src/androidTest/java/com/nextcloud/client/RetryTestRule.kt
- ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest && scripts/deleteOutdatedComments.sh "master" "Screenshot" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Screenshot" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- name: notify
image: drillster/drone-email
settings:
@@ -284,27 +269,6 @@ steps:
- failure
branch:
- master
services:
- name: server
image: nextcloudci/server:server-17 # also change in updateScreenshots.sh
commands:
- /usr/local/bin/initnc.sh
- su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1"
- su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2"
- su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3"
- su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G"
- su www-data -c "php /var/www/html/occ group:add users"
- su www-data -c "php /var/www/html/occ group:adduser users user1"
- su www-data -c "php /var/www/html/occ group:adduser users user2"
- su www-data -c "git clone -b master https://github.com/nextcloud/activity.git /var/www/html/apps/activity/"
- su www-data -c "php /var/www/html/occ app:enable activity"
- su www-data -c "git clone -b master https://github.com/nextcloud/text.git /var/www/html/apps/text/"
- su www-data -c "php /var/www/html/occ app:enable text"
- su www-data -c "git clone -b master https://github.com/nextcloud/end_to_end_encryption/ /var/www/html/apps/end_to_end_encryption/"
- su www-data -c "php /var/www/html/occ app:enable end_to_end_encryption"
- /usr/local/bin/run.sh
trigger:
branch:
- master
@@ -388,7 +352,7 @@ steps:
- sed -i "/qa/,/\}/ s/versionCode .*/versionCode $DRONE_BUILD_NUMBER/" build.gradle
- sed -i "/qa/,/\}/ s/versionName .*/versionName \"$DRONE_BUILD_NUMBER\"/" build.gradle
- ./gradlew assembleQaDebug
- /opt/android-sdk-linux/build-tools/*/apksigner sign --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias key0 --ks scripts/QA_keystore.jks build/outputs/apk/qa/debug/qa-debug-*.apk
- $(find /opt/android-sdk-linux/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 build/outputs/apk/qa/debug/qa-debug-*.apk
- scripts/uploadArtifact.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
trigger:
+1 -1
View File
@@ -1,2 +1,2 @@
# You can add one username per supported platform and one custom link
custom: https://www.bountysource.com/teams/nextcloud/issues?tracker_ids=38838206
custom: https://nextcloud.com/include/
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
with:
java-version: 1.8
- name: Install NDK
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" --sdk_root=${ANDROID_SDK_ROOT}
- name: Build with Gradle
run: |
mkdir -p $HOME/.gradle
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
with:
java-version: 1.8
- name: Install NDK
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" --sdk_root=${ANDROID_SDK_ROOT}
- name: Build generic
run: |
mkdir -p $HOME/.gradle
+2
View File
@@ -47,3 +47,5 @@ fastlane/Fastfile
# scan temporary files
**/fastlane/test_output
/fastlane/vendor/
/.bundle/
+8
View File
@@ -1,3 +1,11 @@
## 3.12.1 (July, 07, 2020)
- UI does not hang when changing auto upload
- fix crash on contacts backup settings
- bugfixes
For a full list, please see https://github.com/nextcloud/android/milestone/49
## 3.12.0 (June, 10, 2020)
- add circle support for searching/displaying
+1
View File
@@ -379,6 +379,7 @@ Generally, whenever you need:
* media playback
* networking
* logging
* notifications management
we have something more suitable.
+10
View File
@@ -0,0 +1,10 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
source "https://rubygems.org"
gem 'fastlane'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
+180
View File
@@ -0,0 +1,180 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.343.0)
aws-sdk-core (3.104.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.36.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.75.0)
aws-sdk-core (~> 3, >= 3.104.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.3)
claide (1.0.3)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.6.1)
rake (~> 13.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.0.0)
excon (0.75.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.7)
fastlane (2.152.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (>= 0.17, < 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (>= 0.13.1, < 2.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.37.0, < 0.39.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-huawei_appgallery_connect (1.0.9)
gh_inspector (1.1.3)
google-api-client (0.38.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.3)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.26.2)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.3.1)
jwt (2.2.1)
memoist (0.16.2)
mini_magick (4.10.1)
mini_mime (1.0.2)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.0)
os (1.1.0)
plist (3.5.0)
public_suffix (4.0.5)
rake (13.0.1)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.17.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
fastlane
fastlane-plugin-huawei_appgallery_connect
BUNDLED WITH
2.1.4
+56 -54
View File
@@ -1,10 +1,11 @@
import com.github.spotbugs.snom.SpotBugsTask
// Gradle build file
//
// This project was started in Eclipse and later moved to Android Studio. In the transition, both IDEs were supported.
// Due to this, the files layout is not the usual in new projects created with Android Studio / gradle. This file
// merges declarations usually split in two separates build.gradle file, one for global settings of the project in
// its root folder, another one for the app module in subfolder of root.
import com.github.spotbugs.SpotBugsTask
buildscript {
ext.kotlin_version = '1.3.72'
@@ -20,13 +21,11 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath('com.dicedmelon.gradle:jacoco-android:0.1.4') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
classpath 'gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:1.6.6'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath('com.hiya:jacoco-android:0.2')
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.4.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.9.1"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.10.0"
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
classpath 'com.karumi:shot:4.3.0'
}
@@ -39,7 +38,7 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'checkstyle'
apply plugin: 'pmd'
apply plugin: 'jacoco-android'
apply plugin: 'com.hiya.jacoco-android'
apply plugin: 'com.github.spotbugs'
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'shot'
@@ -51,7 +50,7 @@ configurations {
exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
exclude group: 'org.jetbrains', module: 'annotations-java5' // via prism4j, already using annotations explicitely
exclude group: 'org.jetbrains', module: 'annotations-java5' // via prism4j, already using annotations explicitly
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
@@ -60,15 +59,15 @@ configurations {
ext {
jacocoVersion = "0.8.2"
daggerVersion = "2.27"
daggerVersion = "2.28.3"
markwonVersion = "4.4.0"
prismVersion = "2.0.0"
androidLibraryVersion = "master-SNAPSHOT"
androidLibraryVersion ="fea60eb25cff6fc58d777b3fc237aa1d8493d15f"
travisBuild = System.getenv("TRAVIS") == "true"
// allows for -Dpre-dex=false to be set
preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
// allows for -D pre-dex=false to be set
preDexEnabled = "true" == System.getProperty("pre-dex", "true")
}
repositories {
@@ -99,9 +98,7 @@ for (TaskExecutionRequest tr : getGradle().getStartParameter().getTaskRequests()
}
}
spotbugs {
toolVersion = '3.1.12'
}
android {
lintOptions {
@@ -126,7 +123,7 @@ android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 17
minSdkVersion 18
targetSdkVersion 29
// arguments to be passed to functional tests
@@ -174,8 +171,8 @@ android {
versionDev {
applicationId "com.nextcloud.android.beta"
dimension "default"
versionCode 20200129
versionName "20200129"
versionCode 20200724
versionName "20200724"
}
qa {
@@ -196,7 +193,7 @@ android {
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
// Skip pre-dexing when running on Travis CI or when disabled via -D pre-dex=false.
preDexLibraries = preDexEnabled && !travisBuild
}
@@ -238,41 +235,33 @@ android {
android.applicationVariants.all { variant ->
String variantName = variant.name
String capVariantName = variantName.substring(0, 1).toUpperCase() + variantName.substring(1)
tasks.register("spotbugs${capVariantName}", SpotBugsTask) {
tasks.register("spotbugs${capVariantName}Report", SpotBugsTask) {
ignoreFailures = true // should continue checking
effort = "max"
reportLevel = "medium"
classes = fileTree("$project.buildDir/intermediates/javac/${variantName}/classes/")
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")
pluginClasspath = project.configurations.spotbugsPlugins
source = fileTree('src/main/java')
classpath = files()
include '**/*.java'
exclude '**/gen/**'
reports {
xml.enabled = false
html.enabled = true
html {
enabled = true
destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
}
}
}
}
check.dependsOn 'checkstyle', 'spotbugsGplayDebug', 'pmd', 'lint', 'ktlint', 'detekt'
check.dependsOn 'checkstyle', 'spotbugsGplayDebugReport', 'pmd', 'lint', 'ktlint', 'detekt'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled true
}
viewBinding {
enabled true
buildFeatures {
dataBinding true
viewBinding true
}
}
@@ -304,8 +293,9 @@ dependencies {
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.2.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
implementation "androidx.work:work-runtime:2.3.4"
implementation "androidx.work:work-runtime-ktx:2.3.4"
implementation "androidx.work:work-runtime:2.4.0"
implementation "androidx.work:work-runtime-ktx:2.4.0"
implementation "androidx.fragment:fragment:1.2.5"
implementation 'com.github.albfernandez:juniversalchardet:2.0.3' // need this version for Android <7
compileOnly 'com.google.code.findbugs:annotations:2.0.1'
implementation 'commons-io:commons-io:2.7'
@@ -341,7 +331,7 @@ dependencies {
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
ktlint "com.pinterest:ktlint:0.36.0"
ktlint "com.pinterest:ktlint:0.37.2"
implementation 'org.conscrypt:conscrypt-android:2.4.0'
// Shimmer animation
@@ -360,16 +350,16 @@ dependencies {
// dependencies for local unit tests
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:3.3.3'
testImplementation 'org.mockito:mockito-core:3.4.4'
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'org.powermock:powermock-core:2.0.7'
testImplementation 'org.powermock:powermock-module-junit4:2.0.7'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.7'
testImplementation 'org.json:json:20200518'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation "androidx.arch.core:core-testing:2.1.0"
kaptAndroidTest "com.google.dagger:dagger-compiler:$daggerVersion"
kaptTest "com.google.dagger:dagger-compiler:$daggerVersion"
testImplementation 'androidx.arch.core:core-testing:2.1.0'
testImplementation 'io.mockk:mockk:1.10.0'
testImplementation 'io.mockk:mockk-android:1.10.0'
// dependencies for instrumented tests
// JUnit4 Rules
@@ -382,7 +372,20 @@ dependencies {
// Espresso core
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
androidTestImplementation 'org.mockito:mockito-core:3.3.1'
androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
// Mocking support
androidTestImplementation 'com.github.tmurakami:dexopener:2.0.5' // required to allow mocking on API 27 and older
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
androidTestImplementation 'org.mockito:mockito-core:3.4.4'
androidTestImplementation("org.mockito:mockito-android:3.4.4") {
exclude group: "net.bytebuddy", module: "byte-buddy-android"
}
androidTestImplementation 'net.bytebuddy:byte-buddy:1.10.13'
androidTestImplementation "net.bytebuddy:byte-buddy-android:1.10.13"
androidTestImplementation "io.mockk:mockk-android:1.10.0"
androidTestImplementation 'androidx.arch.core:core-testing:2.0.1'
// 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
@@ -400,9 +403,10 @@ dependencies {
// androidJacocoAnt "org.jacoco:org.jacoco.agent:${jacocoVersion}"
implementation "com.github.stateless4j:stateless4j:2.6.0"
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
androidTestImplementation "org.mockito:mockito-android:3.3.3"
androidTestImplementation 'net.bytebuddy:byte-buddy:1.10.11'
}
spotbugs {
toolVersion = '3.1.12'
}
configurations.all {
@@ -425,17 +429,15 @@ android.applicationVariants.all { variant ->
tasks.register("combinedTestReport", JacocoReport) {
reports {
xml.enabled = true
html.enabled = true
xml.enabled true
html.enabled true
csv.enabled false
}
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
def debugTree = fileTree(dir: "$project.buildDir/intermediates/classes/gplay/debug", excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"
sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: project.buildDir, includes: [
additionalSourceDirs.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories.setFrom files(subprojects.sourceSets.main.output)
executionData.setFrom project.fileTree(dir: project.buildDir, includes: [
'jacoco/testGplayDebugUnitTest.exec', 'outputs/code-coverage/connected/flavors/GPLAY/*coverage.ec'
])
}
+6 -6
View File
@@ -83,14 +83,14 @@ complexity:
ignoreStringsRegex: '$^'
TooManyFunctions:
active: true
thresholdInFiles: 11
thresholdInClasses: 11
thresholdInInterfaces: 11
thresholdInObjects: 11
thresholdInFiles: 15
thresholdInClasses: 15
thresholdInInterfaces: 15
thresholdInObjects: 15
thresholdInEnums: 11
ignoreDeprecated: false
ignoreDeprecated: true
ignorePrivate: false
ignoreOverridden: false
ignoreOverridden: true
empty-blocks:
active: true
+17
View File
@@ -8,6 +8,9 @@ fastlane_version "2.58.0"
# export FASTLANE_NEXTCLOUD_KEY_ALIAS=""
# export FASTLANE_NEXTCLOUD_KEY_PASSWORD=""
# export FASTLANE_NEXTCLOUD_GITHUB_API_TOKEN=""
# export FASTLANE_NEXTCLOUD_HUAWEI_CLIENT_ID=""
# export FASTLANE_NEXTCLOUD_HUAWEI_CLIENT_SECRET=""
# export FASTLANE_NEXTCLOUD_HUAWEI_APP_ID=""
skip_docs
@@ -70,6 +73,7 @@ lane :releasePhase2_Final do |options|
checkIfAPKexists()
tag(info)
uploadToPlaystore_Final(info)
uploadToHuawei_Final(info)
createGithubRelease_Final(info)
fdroidMergeRequest_Final(info)
createChangelogPullRequest_Final(info)
@@ -116,6 +120,19 @@ lane :beautifyPhone do
sh("adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100")
end
# to install
# bundle exec fastlane add_plugin huawei_appgallery_connect
# bundle install --path build/vendor/bundle
private_lane :uploadToHuawei_Final do |options|
huawei_appgallery_connect(
client_id: ENV["FASTLANE_NEXTCLOUD_HUAWEI_CLIENT_ID"],
client_secret: ENV["FASTLANE_NEXTCLOUD_HUAWEI_CLIENT_SECRET"],
app_id: ENV["FASTLANE_NEXTCLOUD_HUAWEI_APP_ID"],
apk_path: "release/nextcloud-" + options["versionCode"] + ".apk",
submit_for_review: true,
)
end
## private lanes
desc "Build debug and test APK for screenshots"
+6
View File
@@ -0,0 +1,6 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-huawei_appgallery_connect'
gem 'fastlane-plugin-huawei_appgallery_connect'
+2 -2
View File
@@ -1,6 +1,6 @@
#Wed Aug 21 07:03:37 CEST 2019
#Fri May 29 07:39:21 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+7
View File
@@ -55,4 +55,11 @@
<issue id="NewApi" severity="error">
<ignore path="build" />
</issue>
<issue id="ObsoleteLintCustomCheck" severity="warning">
<ignore path="**/fragment-1.2.5/**/lint.jar" />
<ignore path="**/work-runtime-2.**/**/lint.jar" />
<ignore path="**/jetified-butterknife-runtime-10.2.1/**/lint.jar" />
<ignore path="**/jetified-dagger-lint-aar-2.28.**/**/lint.jar" />
</issue>
</lint>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

+1 -1
View File
@@ -1 +1 @@
373
329
+2 -2
View File
@@ -47,7 +47,7 @@ require 'xmlsimple'
# run FindBugs
puts "running FindBugs..."
system './gradlew assembleGplayDebug'
system './gradlew assembleGplayDebug 1>/dev/null'
# confirm that assemble ran w/out error
result = $?.to_i
@@ -56,7 +56,7 @@ if result != 0
exit 1
end
system './gradlew spotbugsGplayDebug'
system './gradlew spotbugsGplayDebugReport 1>/dev/null 2>&1'
# find FindBugs report file
findbugs_reports = Dir.glob(FINDBUGS_REPORT_FILE)
+1 -1
View File
@@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 95 warnings</span>
<span class="mdl-layout-title">Lint Report: 83 warnings</span>
+1 -1
View File
@@ -56,7 +56,7 @@ end
# run Lint
puts "running Lint..."
system './gradlew clean lint'
system './gradlew clean lint 1>/dev/null'
# confirm that Lint ran w/out error
result = $?.to_i
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
if [ $# -lt 2 ]; then
echo "1: record: true/false
2: class name
3: method name"
exit
fi
sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g src/main/res/values/setup.xml
emulator -writable-system -avd uiComparison -no-snapshot -gpu swiftshader_indirect -no-audio -skin 500x833 &
cd src/androidTest/java
class=$(find | grep $2 | grep java | head -n1|sed s'/\//\./'g | sed s'#^\.\.##' | sed s'#\.java##')
cd ../../../
if [ $1 == "true" ] ; then
record="-Precord"
else
record=""
fi
if [ -e $3 ] ; then
method=""
else
method="#$3"
fi
./gradlew gplayDebugExecuteScreenshotTests $record \
-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest \
-Pandroid.testInstrumentationRunnerArguments.class=$class$method
sed -i s'#<bool name="is_beta">true</bool>#<bool name="is_beta">false</bool>#'g src/main/res/values/setup.xml
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
BRANCH=$1
TYPE=$2
PR=$3
GITHUB_USER=$4
GITHUB_PASSWORD=$5
BRANCH_TYPE=$BRANCH-$TYPE
# delete all old comments, matching this type
oldComments=$(curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X GET https://api.github.com/repos/nextcloud/android/issues/$PR/comments | jq --arg TYPE $BRANCH_TYPE '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) + "|" + (.body | test([$TYPE]) | tostring)'| grep "true|true" | tr -d "\"" | cut -f1 -d"|")
echo $oldComments | while read comment ; do
curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X DELETE https://api.github.com/repos/nextcloud/android/issues/comments/$comment
done
exit 0
+2 -2
View File
@@ -74,7 +74,7 @@ sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g
## update/create all screenshots
#./gradlew gplayDebugExecuteScreenshotTests -Precord \
#-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotOnServerTest
#-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest
## update screenshots in a class
#./gradlew gplayDebugExecuteScreenshotTests \
@@ -94,7 +94,7 @@ until [ $resultCode -eq 0 ] || [ $retryCount -gt 2 ]
do
# test all screenshots
./gradlew gplayDebugExecuteScreenshotTests \
-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotOnServerTest
-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest
resultCode=$?
((retryCount++))
-57
View File
@@ -1,57 +0,0 @@
#!/usr/bin/env bash
## emulator
if [[ ! $(emulator -list-avds | grep uiComparison -c) -eq 0 ]]; then
avdmanager delete avd -n uiComparison
(sleep 5; echo "no") | avdmanager create avd -n uiComparison -c 100M -k "system-images;android-27;google_apis;x86" --abi "google_apis/x86"
fi
if [ "$1" == "debug" ]; then
emulator -writable-system -avd uiComparison -no-snapshot -gpu swiftshader_indirect -no-audio -skin 500x833 1>/dev/null &
else
emulator -writable-system -avd uiComparison -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 1>/dev/null &
fi
PID=$!
scripts/wait_for_emulator.sh
sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g src/main/res/values/setup.xml
## update/create all screenshots
#./gradlew gplayDebugExecuteScreenshotTests -Precord \
#-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotWithoutServerTest
## update screenshots in a class
#./gradlew gplayDebugExecuteScreenshotTests \
#-Precord \
#-Pandroid.testInstrumentationRunnerArguments.class=\
#com.owncloud.android.ui.dialog.SyncFileNotEnoughSpaceDialogFragmentTest
## update single screenshot within a class
#./gradlew gplayDebugExecuteScreenshotTests \
#-Precord \
#-Pandroid.testInstrumentationRunnerArguments.class=\
#com.nextcloud.client.FileDisplayActivityIT#showShares
resultCode=-1
retryCount=0
until [ $resultCode -eq 0 ] || [ $retryCount -gt 2 ]
do
# test all screenshots
./gradlew gplayDebugRemoveScreenshots
./gradlew gplayDebugExecuteScreenshotTests \
-Precord \
-Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotWithoutServerTest
resultCode=$?
((retryCount++))
done
sed -i s'#<bool name="is_beta">true</bool>#<bool name="is_beta">false</bool>#'g src/main/res/values/setup.xml
if [ "$1" == "debug" ]; then
exit
fi
# tidy up
kill "$PID"
+29 -8
View File
@@ -1,6 +1,21 @@
#!/usr/bin/env bash
deleteOldComments() {
# delete all old comments, matching this type
echo "Deleting old comments for $BRANCH_TYPE"
oldComments=$(curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X GET https://api.github.com/repos/nextcloud/android/issues/$PR/comments | jq --arg TYPE $BRANCH_TYPE '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) + "|" + (.body | test([$TYPE]) | tostring)'| grep "true|true" | tr -d "\"" | cut -f1 -d"|")
count=$(echo $oldComments | grep true | wc -l)
echo "Found $count old comments"
echo $oldComments | while read comment ; do
echo "Deleting comment: $comment"
curl 2>/dev/null -u $GITHUB_USER:$GITHUB_PASSWORD -X DELETE https://api.github.com/repos/nextcloud/android/issues/comments/$comment
done
}
upload() {
deleteOldComments
cd $1
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
@@ -9,7 +24,7 @@ upload() {
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER"
curl -u $GITHUB_USER:$GITHUB_PASSWORD -X POST https://api.github.com/repos/nextcloud/android/issues/$PR/comments \
-d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER \" }"
-d "{ \"body\" : \"$BRANCH_TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER \" }"
exit 1
}
@@ -17,10 +32,11 @@ upload() {
#1: LOG_USERNAME
#2: LOG_PASSWORD
#3: DRONE_BUILD_NUMBER
#4: TYPE (IT or Unit)
#5: DRONE_PULL_REQUEST
#6: GIT_USERNAME
#7: GIT_TOKEN
#4: BRANCH (stable or master)
#5: TYPE (IT or Unit)
#6: DRONE_PULL_REQUEST
#7: GIT_USERNAME
#8: GIT_TOKEN
URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-integrationTests
ID=$3
@@ -31,7 +47,8 @@ TYPE=$5
PR=$6
GITHUB_USER=$7
GITHUB_PASSWORD=$8
REMOTE_FOLDER=$ID-$TYPE
REMOTE_FOLDER=$ID-$TYPE-$BRANCH
BRANCH_TYPE=$BRANCH-$TYPE
set -e
@@ -46,24 +63,28 @@ fi
if [ -e $FOLDER ]; then
upload $FOLDER
else
echo "$BRANCH-$TYPE test failed, but no output was generated. Maybe a preliminary stage failed."
deleteOldComments
echo "$BRANCH_TYPE test failed, but no output was generated. Maybe a preliminary stage failed."
curl -u $GITHUB_USER:$GITHUB_PASSWORD \
-X POST https://api.github.com/repos/nextcloud/android/issues/$PR/comments \
-d "{ \"body\" : \"$BRANCH-$TYPE test failed, but no output was generated. Maybe a preliminary stage failed. \" }"
-d "{ \"body\" : \"$BRANCH_TYPE test failed, but no output was generated. Maybe a preliminary stage failed. \" }"
if [ -e build/reports/androidTests/connected/flavors/GPLAY ] ; then
TYPE="IT"
BRANCH_TYPE=$BRANCH-$TYPE
upload "build/reports/androidTests/connected/flavors/GPLAY"
fi
if [ -e build/reports/tests/testGplayDebugUnitTest ] ; then
TYPE="Unit"
BRANCH_TYPE=$BRANCH-$TYPE
upload "build/reports/tests/testGplayDebugUnitTest"
fi
if [ -e build/reports/shot/verification ] ; then
TYPE="Screenshot"
BRANCH_TYPE=$BRANCH-$TYPE
upload "build/reports/shot/verification"
fi
fi
+1
View File
@@ -32,6 +32,7 @@
<Or>
<Class name="~.*BindingImpl"/>
<Class name="~.*\.DataBinderMapperImpl" />
<Class name="~.*Binding" />
</Or>
</Match>
-2
View File
@@ -31,6 +31,4 @@
android:sharedUserId="${applicationId}.uid">
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator, tools.fastlane.screengrab" />
<application android:name="com.owncloud.android.TestApp"></application>
</manifest>
@@ -23,13 +23,13 @@
package com.nextcloud.client;
import android.Manifest;
import android.view.View;
import com.facebook.testing.screenshot.Screenshot;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.R;
import com.owncloud.android.ui.activities.ActivitiesActivity;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithoutServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -52,18 +52,6 @@ public class ActivitiesActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithoutServerTest
@ScreenshotTest
public void open() {
ActivitiesActivity sut = activityRule.launchActivity(null);
shortSleep();
Screenshot.snapActivity(sut).record();
}
@Test
@ScreenshotWithoutServerTest
@ScreenshotTest
public void openDrawer() {
ActivitiesActivity sut = activityRule.launchActivity(null);
@@ -72,7 +60,15 @@ public class ActivitiesActivityIT extends AbstractIT {
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
shortSleep();
sut.runOnUiThread(new Runnable() {
@Override
public void run() {
sut.emptyContentContainer.setVisibility(View.VISIBLE);
sut.recyclerView.setVisibility(View.INVISIBLE);
}
});
waitForIdleSync();
Screenshot.snapActivity(sut).record();
}
@@ -24,7 +24,7 @@ package com.nextcloud.client;
import android.accounts.AccountManager;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.AbstractOnServerIT;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.OCUpload;
@@ -32,10 +32,13 @@ import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation;
import com.owncloud.android.lib.resources.status.OCCapability;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.lib.resources.users.GetPrivateKeyOperation;
import com.owncloud.android.lib.resources.users.GetPublicKeyOperation;
import com.owncloud.android.lib.resources.users.SendCSROperation;
import com.owncloud.android.lib.resources.users.StorePrivateKeyOperation;
import com.owncloud.android.operations.GetCapabilitiesOperation;
import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.utils.CsrHelper;
import com.owncloud.android.utils.EncryptionUtils;
@@ -52,14 +55,16 @@ import java.io.IOException;
import java.security.KeyPair;
import java.security.PrivateKey;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import static com.owncloud.android.lib.resources.status.OwnCloudVersion.nextcloud_19;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assume.assumeTrue;
public class EndToEndRandomIT extends AbstractIT {
public class EndToEndRandomIT extends AbstractOnServerIT {
public enum Action {
CREATE_FOLDER,
GO_INTO_FOLDER,
@@ -80,6 +85,12 @@ public class EndToEndRandomIT extends AbstractIT {
@Before
public void before() {
OCCapability capability = getStorageManager().getCapability(account.name);
if (capability.getVersion().equals(new OwnCloudVersion("0.0.0"))) {
// fetch new one
assertTrue(new GetCapabilitiesOperation().execute(client, getStorageManager()).isSuccess());
}
// tests only for NC19+
assumeTrue(getStorageManager()
.getCapability(account.name)
@@ -282,6 +293,7 @@ public class EndToEndRandomIT extends AbstractIT {
}
OCFile fileToDelete = files.get(new Random().nextInt(files.size()));
assertNotNull(fileToDelete.getRemoteId());
Log_OC.d(this,
"[" + i + "/" + actionCount + "] " +
@@ -395,4 +407,58 @@ public class EndToEndRandomIT extends AbstractIT {
private String generateMnemonicString() {
return "1 2 3 4 5 6";
}
public void after() {
// remove all encrypted files
OCFile root = fileDataStorageManager.getFileByDecryptedRemotePath("/");
removeFolder(root);
// List<OCFile> files = fileDataStorageManager.getFolderContent(root, false);
//
// for (OCFile child : files) {
// removeFolder(child);
// }
assertEquals(0, fileDataStorageManager.getFolderContent(root, false).size());
super.after();
}
private void removeFolder(OCFile folder) {
Log_OC.d(this, "Start removing content of folder: " + folder.getDecryptedRemotePath());
List<OCFile> children = fileDataStorageManager.getFolderContent(folder, false);
// remove children
for (OCFile child : children) {
if (child.isFolder()) {
removeFolder(child);
// remove folder
Log_OC.d(this, "Remove folder: " + child.getDecryptedRemotePath());
if (!folder.isEncrypted() && child.isEncrypted()) {
assertTrue(new ToggleEncryptionRemoteOperation(child.getLocalId(),
child.getRemotePath(),
false)
.execute(client)
.isSuccess());
OCFile f = getStorageManager().getFileByEncryptedRemotePath(child.getRemotePath());
f.setEncrypted(false);
getStorageManager().saveFile(f);
child.setEncrypted(false);
}
} else {
Log_OC.d(this, "Remove file: " + child.getDecryptedRemotePath());
}
assertTrue(new RemoveFileOperation(child, false, account, false, targetContext)
.execute(client, getStorageManager())
.isSuccess()
);
}
Log_OC.d(this, "Finished removing content of folder: " + folder.getDecryptedRemotePath());
}
}
@@ -26,7 +26,7 @@ import android.Manifest;
import android.app.Activity;
import com.facebook.testing.screenshot.Screenshot;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.AbstractOnServerIT;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation;
@@ -38,8 +38,6 @@ 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.events.SearchEvent;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import org.greenrobot.eventbus.EventBus;
import org.junit.Assert;
@@ -57,7 +55,7 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertTrue;
public class FileDisplayActivityIT extends AbstractIT {
public class FileDisplayActivityIT extends AbstractOnServerIT {
@Rule public IntentsTestRule<FileDisplayActivity> activityRule = new IntentsTestRule<>(FileDisplayActivity.class,
true,
false);
@@ -67,34 +65,7 @@ public class FileDisplayActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
shortSleep();
Screenshot.snapActivity(sut).record();
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void drawer() {
FileDisplayActivity sut = activityRule.launchActivity(null);
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
waitForIdleSync();
shortSleep();
sut.getListOfFilesFragment().setFabEnabled(false);
Screenshot.snapActivity(sut).record();
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
// @ScreenshotTest // todo run without real server
public void showShares() {
assertTrue(new ExistenceCheckRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess());
assertTrue(new CreateFolderRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess());
@@ -163,7 +134,7 @@ public class FileDisplayActivityIT extends AbstractIT {
FileDisplayActivity sut = activityRule.launchActivity(null);
// given test folder
assertTrue(new CreateFolderOperation("/test/", account, targetContext)
assertTrue(new CreateFolderOperation("/test/", user, targetContext)
.execute(client, getStorageManager())
.isSuccess());
@@ -0,0 +1,75 @@
/*
*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2019 Tobias Kaminsky
* Copyright (C) 2019 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.nextcloud.client;
import android.Manifest;
import com.facebook.testing.screenshot.Screenshot;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.R;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import androidx.test.rule.GrantPermissionRule;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
public class FileDisplayActivityScreenshotIT extends AbstractIT {
@Rule public IntentsTestRule<FileDisplayActivity> activityRule = new IntentsTestRule<>(FileDisplayActivity.class,
true,
false);
@Rule
public final GrantPermissionRule permissionRule = GrantPermissionRule.grant(
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotTest
public void open() {
FileDisplayActivity sut = activityRule.launchActivity(null);
sut.getListOfFilesFragment().setFabEnabled(false);
sut.getListOfFilesFragment().setEmptyListLoadingMessage();
Screenshot.snapActivity(sut).record();
}
@Test
@ScreenshotTest
public void drawer() {
FileDisplayActivity sut = activityRule.launchActivity(null);
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
sut.getListOfFilesFragment().setFabEnabled(false);
sut.getListOfFilesFragment().setEmptyListLoadingMessage();
Screenshot.snapActivity(sut).record();
}
}
@@ -29,7 +29,6 @@ import com.facebook.testing.screenshot.Screenshot;
import com.nextcloud.client.onboarding.FirstRunActivity;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -48,7 +47,6 @@ public class FirstRunActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
@@ -27,7 +27,6 @@ import android.Manifest;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.ui.activity.NotificationsActivity;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -46,7 +45,6 @@ public class NotificationsActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void openDrawer() {
super.openDrawer(activityRule);
@@ -30,7 +30,7 @@ import org.junit.runners.model.Statement
/**
* C&p from https://stackoverflow.com/questions/45635833/how-can-i-use-flakytest-annotation-now on 18.03.2020
*/
class RetryTestRule(val retryCount: Int = 5) : TestRule {
class RetryTestRule(val retryCount: Int = 1) : TestRule {
companion object {
private val TAG = RetryTestRule::class.java.simpleName
@@ -24,10 +24,11 @@ package com.nextcloud.client;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import com.facebook.testing.screenshot.ScreenshotRunner;
import com.owncloud.android.TestApp;
import com.github.tmurakami.dexopener.DexOpener;
import androidx.test.runner.AndroidJUnitRunner;
@@ -35,10 +36,17 @@ public class ScreenshotTestRunner extends AndroidJUnitRunner {
@Override
public Application newApplication(ClassLoader cl, String className, Context context)
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException {
return super.newApplication(cl, TestApp.class.getName(), context);
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
/*
* Initialize DexOpener only on API below 28 to enable mocking of Kotlin classes.
* On API 28+ the platform supports mocking natively.
*/
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
DexOpener.install(this);
}
return super.newApplication(cl, className, context);
}
@Override
@@ -29,7 +29,6 @@ import com.facebook.testing.screenshot.Screenshot;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.ui.activity.SettingsActivity;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithoutServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -48,7 +47,6 @@ public class SettingsActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithoutServerTest
@ScreenshotTest
public void open() {
Activity test = activityRule.launchActivity(null);
@@ -23,17 +23,26 @@
package com.nextcloud.client;
import android.Manifest;
import android.content.Intent;
import com.facebook.testing.screenshot.Screenshot;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.datamodel.MediaFolderType;
import com.owncloud.android.datamodel.SyncedFolderDisplayItem;
import com.owncloud.android.ui.activity.SyncedFoldersActivity;
import com.owncloud.android.utils.ScreenshotWithServerTest;
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.test.espresso.intent.rule.IntentsTestRule;
import androidx.test.rule.GrantPermissionRule;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
public class SyncedFoldersActivityIT extends AbstractIT {
@Rule public IntentsTestRule<SyncedFoldersActivity> activityRule = new IntentsTestRule<>(SyncedFoldersActivity.class,
@@ -45,9 +54,39 @@ public class SyncedFoldersActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void openDrawer() {
super.openDrawer(activityRule);
}
@Test
@ScreenshotTest
public void testSyncedFolderDialog() {
SyncedFolderDisplayItem item = new SyncedFolderDisplayItem(1,
"/sdcard/DCIM/",
"/InstantUpload/",
true,
false,
false,
true,
"test@https://server.com",
0,
0,
true,
1000,
"Name",
MediaFolderType.IMAGE,
false);
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.snap(Objects.requireNonNull(sut.requireDialog().getWindow()).getDecorView()).record();
}
}
@@ -27,7 +27,6 @@ import android.Manifest;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.ui.activity.UploadListActivity;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -46,7 +45,6 @@ public class UploadListActivityActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void openDrawer() {
super.openDrawer(activityRule);
@@ -0,0 +1,71 @@
/*
* Nextcloud Android client application
*
* @author Chris Narkiewicz <[email protected]>
* Copyright (C) 2020 Chris Narkiewicz
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.account
import android.os.Parcel
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotSame
import org.junit.Assert.assertTrue
import org.junit.Test
class MockUserTest {
private companion object {
const val ACCOUNT_NAME = "test_account_name"
const val ACCOUNT_TYPE = "test_account_type"
}
@Test
fun mock_user_is_parcelable() {
// GIVEN
// mock user instance
val original = MockUser(ACCOUNT_NAME, ACCOUNT_TYPE)
// WHEN
// instance is serialized into Parcel
// instance is retrieved from Parcel
val parcel = Parcel.obtain()
parcel.setDataPosition(0)
parcel.writeParcelable(original, 0)
parcel.setDataPosition(0)
val retrieved = parcel.readParcelable<User>(User::class.java.classLoader)
// THEN
// retrieved instance in distinct
// instances are equal
assertNotSame(original, retrieved)
assertTrue(retrieved is MockUser)
assertEquals(original, retrieved)
}
@Test
fun mock_user_has_platform_account() {
// GIVEN
// mock user instance
val mock = MockUser(ACCOUNT_NAME, ACCOUNT_TYPE)
// THEN
// can convert to platform account
val account = mock.toPlatformAccount()
assertEquals(ACCOUNT_NAME, account.name)
assertEquals(ACCOUNT_TYPE, account.type)
}
}
@@ -34,7 +34,7 @@ import android.accounts.OperationCanceledException;
import android.net.Uri;
import android.os.Bundle;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.AbstractOnServerIT;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManager;
@@ -48,7 +48,7 @@ import androidx.test.platform.app.InstrumentationRegistry;
import static org.junit.Assert.assertEquals;
public class OwnCloudClientManagerTest extends AbstractIT {
public class OwnCloudClientManagerTest extends AbstractOnServerIT {
/**
* Like on files app we create & store an account in Android's account manager.
@@ -6,7 +6,7 @@ import android.os.Bundle;
import com.nextcloud.client.preferences.AppPreferences;
import com.nextcloud.client.preferences.AppPreferencesImpl;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.AbstractOnServerIT;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import org.junit.Before;
@@ -17,7 +17,7 @@ import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertFalse;
public class UserAccountManagerImplTest extends AbstractIT {
public class UserAccountManagerImplTest extends AbstractOnServerIT {
private AccountManager accountManager;
@@ -29,7 +29,6 @@ import com.facebook.testing.screenshot.Screenshot
import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.status.OwnCloudVersion
import com.owncloud.android.utils.ScreenshotTest
import com.owncloud.android.utils.ScreenshotWithServerTest
import org.junit.Assume
import org.junit.Before
import org.junit.Rule
@@ -42,13 +41,14 @@ class EtmActivityTest : AbstractIT() {
@Before
fun before() {
// tests only on NC 18
Assume.assumeTrue(storageManager
.getCapability(account.name)
.version.compareTo(OwnCloudVersion.nextcloud_18) == 0)
Assume.assumeTrue(
storageManager
.getCapability(account.name)
.version.compareTo(OwnCloudVersion.nextcloud_18) == 0
)
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun overview() {
val sut: Activity = activityRule.launchActivity(null)
@@ -59,7 +59,6 @@ class EtmActivityTest : AbstractIT() {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun preferences() {
val sut: EtmActivity = activityRule.launchActivity(null)
@@ -70,7 +69,6 @@ class EtmActivityTest : AbstractIT() {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun accounts() {
val sut: EtmActivity = activityRule.launchActivity(null)
@@ -0,0 +1,235 @@
/**
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* Copyright (C) 2020 Chris Narkiewicz <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.files
import android.net.Uri
import com.nextcloud.client.account.Server
import com.nextcloud.client.account.User
import com.nextcloud.client.account.UserAccountManager
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import com.owncloud.android.lib.resources.status.OwnCloudVersion
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertSame
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.junit.runners.Suite
import org.mockito.Mock
import org.mockito.MockitoAnnotations
import java.net.URI
@RunWith(Suite::class)
@Suite.SuiteClasses(
DeepLinkHandlerTest.DeepLinkPattern::class,
DeepLinkHandlerTest.FileDeepLink::class
)
class DeepLinkHandlerTest {
@RunWith(Parameterized::class)
class DeepLinkPattern {
companion object {
val FILE_ID = 1234
val SERVER_BASE_URLS = listOf(
"http://hostname.net",
"https://hostname.net",
"http://hostname.net/subdir1",
"https://hostname.net/subdir1",
"http://hostname.net/subdir1/subdir2",
"https://hostname.net/subdir1/subdir2",
"http://hostname.net/subdir1/subdir2/subdir3",
"https://hostname.net/subdir1/subdir2/subdir3"
)
val INDEX_PHP_PATH = listOf(
"",
"/index.php"
)
@Parameterized.Parameters
@JvmStatic
fun urls(): Array<Array<Any>> {
val testInput = mutableListOf<Array<Any>>()
SERVER_BASE_URLS.forEach { baseUrl ->
INDEX_PHP_PATH.forEach { indexPath ->
val url = "$baseUrl$indexPath/f/$FILE_ID"
testInput.add(arrayOf(baseUrl, indexPath, "$FILE_ID", url))
}
}
return testInput.toTypedArray()
}
}
@Parameterized.Parameter(0)
lateinit var baseUrl: String
@Parameterized.Parameter(1)
lateinit var indexPath: String
@Parameterized.Parameter(2)
lateinit var fileId: String
@Parameterized.Parameter(3)
lateinit var url: String
@Test
fun matches_deep_link_patterns() {
val match = DeepLinkHandler.DEEP_LINK_PATTERN.matchEntire(url)
assertNotNull("Url [$url] does not match pattern", match)
assertEquals(baseUrl, match?.groupValues?.get(DeepLinkHandler.BASE_URL_GROUP_INDEX))
assertEquals(indexPath, match?.groupValues?.get(DeepLinkHandler.INDEX_PATH_GROUP_INDEX))
assertEquals(fileId, match?.groupValues?.get(DeepLinkHandler.FILE_ID_GROUP_INDEX))
}
@Test
fun no_trailing_path_allowed_after_file_id() {
val invalidUrl = "$url/"
val match = DeepLinkHandler.DEEP_LINK_PATTERN.matchEntire(invalidUrl)
assertNull(match)
}
}
class FileDeepLink {
companion object {
const val OTHER_SERVER_BASE_URL = "https://someotherserver.net"
const val SERVER_BASE_URL = "https://server.net"
const val FILE_ID = "1234567890"
val DEEP_LINK = Uri.parse("$SERVER_BASE_URL/index.php/f/$FILE_ID")
fun createMockUser(serverBaseUrl: String): User {
val user = mock<User>()
val uri = URI.create(serverBaseUrl)
val server = Server(uri = uri, version = OwnCloudVersion.nextcloud_19)
whenever(user.server).thenReturn(server)
return user
}
}
@Mock
lateinit var userAccountManager: UserAccountManager
lateinit var allUsers: List<User>
lateinit var handler: DeepLinkHandler
@Before
fun setUp() {
MockitoAnnotations.initMocks(this)
whenever(userAccountManager.allUsers).thenAnswer { allUsers }
allUsers = emptyList()
handler = DeepLinkHandler(userAccountManager)
}
@Test
fun no_user_can_open_file() {
// GIVEN
// no user capable of opening the file
allUsers = listOf(
createMockUser(OTHER_SERVER_BASE_URL),
createMockUser(OTHER_SERVER_BASE_URL)
)
// WHEN
// deep link is parsed
val match = handler.parseDeepLink(DEEP_LINK)
// THEN
// link is valid
// no user can open the file
assertNotNull(match)
assertEquals(0, match?.users?.size)
}
@Test
fun single_user_can_open_file() {
// GIVEN
// multiple users registered
// one user capable of opening the link
val matchingUser = createMockUser(SERVER_BASE_URL)
allUsers = listOf(
createMockUser(OTHER_SERVER_BASE_URL),
matchingUser,
createMockUser(OTHER_SERVER_BASE_URL)
)
// WHEN
// deep link is parsed
val match = handler.parseDeepLink(DEEP_LINK)
// THEN
// link can be opened by single user
assertNotNull(match)
assertSame(matchingUser, match?.users?.get(0))
}
@Test
fun multiple_users_can_open_file() {
// GIVEN
// mutltiple users registered
// multiple users capable of opening the link
val matchingUsers = setOf(
createMockUser(SERVER_BASE_URL),
createMockUser(SERVER_BASE_URL)
)
val otherUsers = setOf(
createMockUser(OTHER_SERVER_BASE_URL),
createMockUser(OTHER_SERVER_BASE_URL)
)
allUsers = listOf(matchingUsers, otherUsers).flatten()
// WHEN
// deep link is parsed
val match = handler.parseDeepLink(DEEP_LINK)
// THEN
// link can be opened by multiple matching users
assertNotNull(match)
assertEquals(matchingUsers, match?.users?.toSet())
}
@Test
fun match_contains_extracted_file_id() {
// WHEN
// valid deep file link is parsed
val match = handler.parseDeepLink(DEEP_LINK)
// THEN
// file id is returned
assertEquals(FILE_ID, match?.fileId)
}
@Test
fun no_match_for_invalid_link() {
// GIVEN
// invalid deep link
val invalidLink = Uri.parse("http://www.dodgylink.com/index.php")
// WHEN
// deep link is parsed
val match = handler.parseDeepLink(invalidLink)
// THEN
// no match
assertNull(match)
}
}
}
@@ -0,0 +1,240 @@
/**
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* Copyright (C) 2020 Chris Narkiewicz <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.files.downloader
import android.content.ComponentName
import android.content.Context
import com.nextcloud.client.account.MockUser
import com.owncloud.android.datamodel.OCFile
import io.mockk.MockKAnnotations
import io.mockk.every
import io.mockk.impl.annotations.MockK
import io.mockk.mockk
import io.mockk.verify
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
class DownloaderConnectionTest {
lateinit var connection: DownloaderConnection
@MockK
lateinit var context: Context
@MockK
lateinit var firstDownloadListener: (Download) -> Unit
@MockK
lateinit var secondDownloadListener: (Download) -> Unit
@MockK
lateinit var firstStatusListener: (Downloader.Status) -> Unit
@MockK
lateinit var secondStatusListener: (Downloader.Status) -> Unit
@MockK
lateinit var binder: DownloaderService.Binder
val file get() = OCFile("/path")
val componentName = ComponentName("", DownloaderService::class.java.simpleName)
val user = MockUser()
@Before
fun setUp() {
MockKAnnotations.init(this, relaxed = true)
connection = DownloaderConnection(context, user)
}
@Test
fun listeners_are_set_after_connection() {
// GIVEN
// not connected
// listener is added
connection.registerDownloadListener(firstDownloadListener)
connection.registerDownloadListener(secondDownloadListener)
// WHEN
// service is bound
connection.onServiceConnected(componentName, binder)
// THEN
// all listeners are passed to the service
val listeners = mutableListOf<(Download) -> Unit>()
verify { binder.registerDownloadListener(capture(listeners)) }
assertEquals(listOf(firstDownloadListener, secondDownloadListener), listeners)
}
@Test
fun listeners_are_set_immediately_when_connected() {
// GIVEN
// service is bound
connection.onServiceConnected(componentName, binder)
// WHEN
// listeners are added
connection.registerDownloadListener(firstDownloadListener)
// THEN
// listener is forwarded to service
verify { binder.registerDownloadListener(firstDownloadListener) }
}
@Test
fun listeners_are_removed_when_unbinding() {
// GIVEN
// service is bound
// service has some listeners
connection.onServiceConnected(componentName, binder)
connection.registerDownloadListener(firstDownloadListener)
connection.registerDownloadListener(secondDownloadListener)
// WHEN
// service unbound
connection.unbind()
// THEN
// listeners removed from service
verify { binder.removeDownloadListener(firstDownloadListener) }
verify { binder.removeDownloadListener(secondDownloadListener) }
}
@Test
fun missed_updates_are_delivered_on_connection() {
// GIVEN
// not bound
// has listeners
// download is scheduled and is progressing
connection.registerDownloadListener(firstDownloadListener)
connection.registerDownloadListener(secondDownloadListener)
val request1 = Request(user, file)
connection.download(request1)
val download1 = Download(request1.uuid, DownloadState.RUNNING, 50, request1.file, request1)
val request2 = Request(user, file)
connection.download(request2)
val download2 = Download(request2.uuid, DownloadState.RUNNING, 50, request2.file, request1)
every { binder.getDownload(request1.uuid) } returns download1
every { binder.getDownload(request2.uuid) } returns download2
// WHEN
// service is bound
connection.onServiceConnected(componentName, binder)
// THEN
// listeners receive current download state for pending downloads
val firstListenerNotifications = mutableListOf<Download>()
verify { firstDownloadListener(capture(firstListenerNotifications)) }
assertEquals(listOf(download1, download2), firstListenerNotifications)
val secondListenerNotifications = mutableListOf<Download>()
verify { secondDownloadListener(capture(secondListenerNotifications)) }
assertEquals(listOf(download1, download2), secondListenerNotifications)
}
@Test
fun downloader_status_updates_are_delivered_on_connection() {
// GIVEN
// not bound
// has status listeners
val mockStatus: Downloader.Status = mockk()
every { binder.status } returns mockStatus
connection.registerStatusListener(firstStatusListener)
connection.registerStatusListener(secondStatusListener)
// WHEN
// service is bound
connection.onServiceConnected(componentName, binder)
// THEN
// downloader status is delivered
verify { firstStatusListener(mockStatus) }
verify { secondStatusListener(mockStatus) }
}
@Test
fun downloader_status_not_requested_if_no_listeners() {
// GIVEN
// not bound
// no status listeners
// WHEN
// service is bound
connection.onServiceConnected(componentName, binder)
// THEN
// downloader status is not requested
verify(exactly = 0) { binder.status }
}
@Test
fun not_running_if_not_connected() {
// GIVEN
// downloader is running
// connection not bound
every { binder.isRunning } returns true
// THEN
// not running
assertFalse(connection.isRunning)
}
@Test
fun is_running_from_binder_if_connected() {
// GIVEN
// service bound
every { binder.isRunning } returns true
connection.onServiceConnected(componentName, binder)
// WHEN
// is runnign flag accessed
val isRunning = connection.isRunning
// THEN
// call delegated to binder
assertTrue(isRunning)
verify(exactly = 1) { binder.isRunning }
}
@Test
fun missed_updates_not_tracked_before_listeners_registered() {
// GIVEN
// not bound
// some downloads requested without listener
val request = Request(user, file)
connection.download(request)
val download = Download(request.uuid, DownloadState.RUNNING, 50, request.file, request)
connection.registerDownloadListener(firstDownloadListener)
every { binder.getDownload(request.uuid) } returns download
// WHEN
// service is bound
connection.onServiceConnected(componentName, binder)
// THEN
// missed updates not redelivered
verify(exactly = 0) { firstDownloadListener(any()) }
}
}
@@ -0,0 +1,58 @@
/**
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* Copyright (C) 2020 Chris Narkiewicz <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.files.downloader
import androidx.test.core.app.ApplicationProvider.getApplicationContext
import androidx.test.rule.ServiceTestRule
import com.nextcloud.client.account.MockUser
import io.mockk.MockKAnnotations
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException
class DownloaderServiceTest {
@get:Rule
val service = ServiceTestRule.withTimeout(3, TimeUnit.SECONDS)
val user = MockUser()
@Before
fun setUp() {
MockKAnnotations.init(this, relaxed = true)
}
@Test(expected = TimeoutException::class)
fun cannot_bind_to_service_without_user() {
val intent = DownloaderService.createBindIntent(getApplicationContext(), user)
intent.removeExtra(DownloaderService.EXTRA_USER)
service.bindService(intent)
}
@Test
fun bind_with_user() {
val intent = DownloaderService.createBindIntent(getApplicationContext(), user)
val binder = service.bindService(intent)
assertTrue(binder is DownloaderService.Binder)
}
}
@@ -0,0 +1,281 @@
/**
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* Copyright (C) 2020 Chris Narkiewicz <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.files.downloader
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import com.nextcloud.client.account.User
import com.nextcloud.client.core.ManualAsyncRunner
import com.nextcloud.client.core.OnProgressCallback
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.common.OwnCloudClient
import io.mockk.MockKAnnotations
import io.mockk.every
import io.mockk.impl.annotations.MockK
import io.mockk.mockk
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Suite
import org.mockito.MockitoAnnotations
@RunWith(Suite::class)
@Suite.SuiteClasses(
DownloaderTest.Enqueue::class,
DownloaderTest.DownloadStatusUpdates::class
)
class DownloaderTest {
abstract class Base {
companion object {
const val MAX_DOWNLOAD_THREADS = 4
}
@MockK
lateinit var user: User
@MockK
lateinit var client: OwnCloudClient
@MockK
lateinit var mockTaskFactory: DownloadTask.Factory
/**
* All task mock functions created during test run are
* stored here.
*/
lateinit var downloadTaskMocks: MutableList<DownloadTask>
lateinit var runner: ManualAsyncRunner
lateinit var downloader: DownloaderImpl
/**
* Response value for all download tasks
*/
var downloadTaskResult: Boolean = true
/**
* Progress values posted by all download task mocks before
* returning result value
*/
var taskProgress = listOf<Int>()
@Before
fun setUpBase() {
MockKAnnotations.init(this, relaxed = true)
MockitoAnnotations.initMocks(this)
downloadTaskMocks = mutableListOf()
runner = ManualAsyncRunner()
downloader = DownloaderImpl(
runner = runner,
taskFactory = mockTaskFactory,
threads = MAX_DOWNLOAD_THREADS
)
downloadTaskResult = true
every { mockTaskFactory.create() } answers { createMockTask() }
}
private fun createMockTask(): DownloadTask {
val task = mockk<DownloadTask>()
every { task.download(any(), any(), any()) } answers {
taskProgress.forEach {
arg<OnProgressCallback<Int>>(1).invoke(it)
}
val request = arg<Request>(0)
DownloadTask.Result(request.file, downloadTaskResult)
}
downloadTaskMocks.add(task)
return task
}
}
class Enqueue : Base() {
@Test
fun enqueued_download_is_started_immediately() {
// GIVEN
// downloader has no running downloads
// WHEN
// download is enqueued
val file = OCFile("/path")
val request = Request(user, file)
downloader.download(request)
// THEN
// download is started immediately
val download = downloader.getDownload(request.uuid)
assertEquals(DownloadState.RUNNING, download?.state)
}
@Test
fun enqueued_downloads_are_pending_if_running_queue_is_full() {
// GIVEN
// downloader is downloading max simultaneous files
for (i in 0 until MAX_DOWNLOAD_THREADS) {
val file = OCFile("/running/download/path/$i")
val request = Request(user, file)
downloader.download(request)
val runningDownload = downloader.getDownload(request.uuid)
assertEquals(runningDownload?.state, DownloadState.RUNNING)
}
// WHEN
// another download is enqueued
val file = OCFile("/path")
val request = Request(user, file)
downloader.download(request)
// THEN
// download is pending
val download = downloader.getDownload(request.uuid)
assertEquals(DownloadState.PENDING, download?.state)
}
}
class DownloadStatusUpdates : Base() {
@get:Rule
val rule = InstantTaskExecutorRule()
val file = OCFile("/path")
@Test
fun download_task_completes() {
// GIVEN
// download is running
// download is being observed
val downloadUpdates = mutableListOf<Download>()
downloader.registerDownloadListener { downloadUpdates.add(it) }
downloader.download(Request(user, file))
// WHEN
// download task finishes successfully
runner.runOne()
// THEN
// listener is notified about status change
assertEquals(DownloadState.RUNNING, downloadUpdates[0].state)
assertEquals(DownloadState.COMPLETED, downloadUpdates[1].state)
}
@Test
fun download_task_fails() {
// GIVEN
// download is running
// download is being observed
val downloadUpdates = mutableListOf<Download>()
downloader.registerDownloadListener { downloadUpdates.add(it) }
downloader.download(Request(user, file))
// WHEN
// download task fails
downloadTaskResult = false
runner.runOne()
// THEN
// listener is notified about status change
assertEquals(DownloadState.RUNNING, downloadUpdates[0].state)
assertEquals(DownloadState.FAILED, downloadUpdates[1].state)
}
@Test
fun download_progress_is_updated() {
// GIVEN
// download is running
val downloadUpdates = mutableListOf<Download>()
downloader.registerDownloadListener { downloadUpdates.add(it) }
downloader.download(Request(user, file))
// WHEN
// download progress updated 4 times before completion
taskProgress = listOf(25, 50, 75, 100)
runner.runOne()
// THEN
// listener receives 6 status updates
// transition to running
// 4 progress updates
// completion
assertEquals(6, downloadUpdates.size)
if (downloadUpdates.size >= 6) {
assertEquals(DownloadState.RUNNING, downloadUpdates[0].state)
assertEquals(25, downloadUpdates[1].progress)
assertEquals(50, downloadUpdates[2].progress)
assertEquals(75, downloadUpdates[3].progress)
assertEquals(100, downloadUpdates[4].progress)
assertEquals(DownloadState.COMPLETED, downloadUpdates[5].state)
}
}
@Test
fun download_task_is_created_only_for_running_downloads() {
// WHEN
// multiple downloads are enqueued
for (i in 0 until MAX_DOWNLOAD_THREADS * 2) {
downloader.download(Request(user, file))
}
// THEN
// download task is created only for running downloads
assertEquals(MAX_DOWNLOAD_THREADS, downloadTaskMocks.size)
}
}
class RunningStatusUpdates : Base() {
@get:Rule
val rule = InstantTaskExecutorRule()
@Test
fun is_running_flag_on_enqueue() {
// WHEN
// download is enqueued
val file = OCFile("/path/to/file")
val request = Request(user, file)
downloader.download(request)
// THEN
// is running changes
assertTrue(downloader.isRunning)
}
@Test
fun is_running_flag_on_completion() {
// GIVEN
// a download is in progress
val file = OCFile("/path/to/file")
val request = Request(user, file)
downloader.download(request)
assertTrue(downloader.isRunning)
// WHEN
// download is processed
runner.runOne()
// THEN
// downloader is not running
assertFalse(downloader.isRunning)
}
}
}
@@ -0,0 +1,519 @@
/*
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* Copyright (C) 2020 Chris Narkiewicz <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.files.downloader
import com.nextcloud.client.account.User
import com.owncloud.android.datamodel.OCFile
import io.mockk.CapturingSlot
import io.mockk.MockKAnnotations
import io.mockk.clearAllMocks
import io.mockk.every
import io.mockk.impl.annotations.MockK
import io.mockk.verify
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertSame
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Suite
import java.util.UUID
@RunWith(Suite::class)
@Suite.SuiteClasses(
RegistryTest.Pending::class,
RegistryTest.Start::class,
RegistryTest.Progress::class,
RegistryTest.Complete::class,
RegistryTest.GetDownloads::class,
RegistryTest.IsRunning::class
)
class RegistryTest {
abstract class Base {
companion object {
const val MAX_DOWNLOAD_THREADS = 4
const val PROGRESS_FULL = 100
const val PROGRESS_HALF = 50
}
@MockK
lateinit var user: User
lateinit var file: OCFile
@MockK
lateinit var onDownloadStart: (UUID, Request) -> Unit
@MockK
lateinit var onDownloadChanged: (Download) -> Unit
internal lateinit var registry: Registry
@Before
fun setUpBase() {
MockKAnnotations.init(this, relaxed = true)
file = OCFile("/test/path")
registry = Registry(onDownloadStart, onDownloadChanged, MAX_DOWNLOAD_THREADS)
resetMocks()
}
fun resetMocks() {
clearAllMocks()
every { onDownloadStart(any(), any()) } answers {}
every { onDownloadChanged(any()) } answers {}
}
}
class Pending : Base() {
@Test
fun inserting_pending_download() {
// GIVEN
// registry has no pending downloads
assertEquals(0, registry.pending.size)
// WHEN
// new download requests added
val addedDownloadsCount = 10
for (i in 0 until addedDownloadsCount) {
val request = Request(user, file)
registry.add(request)
}
// THEN
// download is added to the pending queue
assertEquals(addedDownloadsCount, registry.pending.size)
}
}
class Start : Base() {
companion object {
const val ENQUEUED_REQUESTS_COUNT = 10
}
@Before
fun setUp() {
for (i in 0 until ENQUEUED_REQUESTS_COUNT) {
registry.add(Request(user, file))
}
assertEquals(ENQUEUED_REQUESTS_COUNT, registry.pending.size)
}
@Test
fun starting_download() {
// WHEN
// started
registry.startNext()
// THEN
// up to max threads requests are started
// start callback is triggered
// update callback is triggered on download transition
// started downloads are in running state
assertEquals(
"Downloads not moved to running queue",
MAX_DOWNLOAD_THREADS,
registry.running.size
)
assertEquals(
"Downloads not moved from pending queue",
ENQUEUED_REQUESTS_COUNT - MAX_DOWNLOAD_THREADS,
registry.pending.size
)
verify(exactly = MAX_DOWNLOAD_THREADS) { onDownloadStart(any(), any()) }
val startedDownloads = mutableListOf<Download>()
verify(exactly = MAX_DOWNLOAD_THREADS) { onDownloadChanged(capture(startedDownloads)) }
assertEquals(
"Callbacks not invoked for running downloads",
MAX_DOWNLOAD_THREADS,
startedDownloads.size
)
startedDownloads.forEach {
assertEquals("Download not placed into running state", DownloadState.RUNNING, it.state)
}
}
@Test
fun start_is_ignored_if_no_more_free_threads() {
// WHEN
// max number of running downloads
registry.startNext()
assertEquals(MAX_DOWNLOAD_THREADS, registry.running.size)
clearAllMocks()
// WHEN
// starting more downloads
registry.startNext()
// THEN
// no more downloads can be started
assertEquals(MAX_DOWNLOAD_THREADS, registry.running.size)
verify(exactly = 0) { onDownloadStart(any(), any()) }
}
}
class Progress : Base() {
var uuid: UUID = UUID.randomUUID()
@Before
fun setUp() {
val request = Request(user, file)
uuid = registry.add(request)
registry.startNext()
assertEquals(uuid, request.uuid)
assertEquals(1, registry.running.size)
resetMocks()
}
@Test
fun download_progress_is_updated() {
// GIVEN
// a download is running
// WHEN
// download progress is updated
val progressHalf = 50
registry.progress(uuid, progressHalf)
// THEN
// progress is updated
// update callback is invoked
val download = mutableListOf<Download>()
verify { onDownloadChanged(capture(download)) }
assertEquals(1, download.size)
assertEquals(progressHalf, download.first().progress)
}
@Test
fun updates_for_non_running_downloads_are_ignored() {
// GIVEN
// download is not running
registry.complete(uuid, true)
assertEquals(0, registry.running.size)
resetMocks()
// WHEN
// progress for a non-running download is updated
registry.progress(uuid, PROGRESS_HALF)
// THEN
// progress update is ignored
verify(exactly = 0) { onDownloadChanged(any()) }
}
@Test
fun updates_for_non_existing_downloads_are_ignored() {
// GIVEN
// some download is running
// WHEN
// progress is updated for non-existing download
val nonExistingDownloadId = UUID.randomUUID()
registry.progress(nonExistingDownloadId, PROGRESS_HALF)
// THEN
// progress uppdate is ignored
verify(exactly = 0) { onDownloadChanged(any()) }
}
}
class Complete : Base() {
lateinit var uuid: UUID
@Before
fun setUp() {
uuid = registry.add(Request(user, file))
registry.startNext()
registry.progress(uuid, PROGRESS_FULL)
resetMocks()
}
@Test
fun complete_successful_download_with_updated_file() {
// GIVEN
// a download is running
// WHEN
// download is completed
// file has been updated
val updatedFile = OCFile("/updated/file")
registry.complete(uuid, true, updatedFile)
// THEN
// download is completed successfully
// status carries updated file
val slot = CapturingSlot<Download>()
verify { onDownloadChanged(capture(slot)) }
assertEquals(DownloadState.COMPLETED, slot.captured.state)
assertSame(slot.captured.file, updatedFile)
}
@Test
fun complete_successful_download() {
// GIVEN
// a download is running
// WHEN
// download is completed
// file is not updated
registry.complete(uuid = uuid, success = true, file = null)
// THEN
// download is completed successfully
// status carries previous file
val slot = CapturingSlot<Download>()
verify { onDownloadChanged(capture(slot)) }
assertEquals(DownloadState.COMPLETED, slot.captured.state)
assertSame(slot.captured.file, file)
}
@Test
fun complete_failed_download() {
// GIVEN
// a download is running
// WHEN
// download is failed
registry.complete(uuid, false)
// THEN
// download is completed successfully
val slot = CapturingSlot<Download>()
verify { onDownloadChanged(capture(slot)) }
assertEquals(DownloadState.FAILED, slot.captured.state)
}
}
class GetDownloads : Base() {
val pendingDownloadFile = OCFile("/pending")
val runningDownloadFile = OCFile("/running")
val completedDownloadFile = OCFile("/completed")
lateinit var pendingDownloadId: UUID
lateinit var runningDownloadId: UUID
lateinit var completedDownloadId: UUID
@Before
fun setUp() {
completedDownloadId = registry.add(Request(user, completedDownloadFile))
registry.startNext()
registry.complete(completedDownloadId, true)
runningDownloadId = registry.add(Request(user, runningDownloadFile))
registry.startNext()
pendingDownloadId = registry.add(Request(user, pendingDownloadFile))
resetMocks()
assertEquals(1, registry.pending.size)
assertEquals(1, registry.running.size)
assertEquals(1, registry.completed.size)
}
@Test
fun get_by_path_searches_pending_queue() {
// GIVEN
// file download is pending
// WHEN
// download status is retrieved
val download = registry.getDownload(pendingDownloadFile)
// THEN
// download from pending queue is returned
assertNotNull(download)
assertEquals(pendingDownloadId, download?.uuid)
}
@Test
fun get_by_id_searches_pending_queue() {
// GIVEN
// file download is pending
// WHEN
// download status is retrieved
val download = registry.getDownload(pendingDownloadId)
// THEN
// download from pending queue is returned
assertNotNull(download)
assertEquals(pendingDownloadId, download?.uuid)
}
@Test
fun get_by_path_searches_running_queue() {
// GIVEN
// file download is running
// WHEN
// download status is retrieved
val download = registry.getDownload(runningDownloadFile)
// THEN
// download from pending queue is returned
assertNotNull(download)
assertEquals(runningDownloadId, download?.uuid)
}
@Test
fun get_by_id_searches_running_queue() {
// GIVEN
// file download is running
// WHEN
// download status is retrieved
val download = registry.getDownload(runningDownloadId)
// THEN
// download from pending queue is returned
assertNotNull(download)
assertEquals(runningDownloadId, download?.uuid)
}
@Test
fun get_by_path_searches_completed_queue() {
// GIVEN
// file download is pending
// WHEN
// download status is retrieved
val download = registry.getDownload(completedDownloadFile)
// THEN
// download from pending queue is returned
assertNotNull(download)
assertEquals(completedDownloadId, download?.uuid)
}
@Test
fun get_by_id_searches_completed_queue() {
// GIVEN
// file download is pending
// WHEN
// download status is retrieved
val download = registry.getDownload(completedDownloadId)
// THEN
// download from pending queue is returned
assertNotNull(download)
assertEquals(completedDownloadId, download?.uuid)
}
@Test
fun not_found_by_path() {
// GIVEN
// no download for a file
val nonExistingDownloadFile = OCFile("/non-nexisting/download")
// WHEN
// download status is retrieved for a file
val download = registry.getDownload(nonExistingDownloadFile)
// THEN
// no download is found
assertNull(download)
}
@Test
fun not_found_by_id() {
// GIVEN
// no download for an id
val nonExistingId = UUID.randomUUID()
// WHEN
// download status is retrieved for a file
val download = registry.getDownload(nonExistingId)
// THEN
// no download is found
assertNull(download)
}
}
class IsRunning : Base() {
@Test
fun no_requests() {
// WHEN
// all queues empty
assertEquals(0, registry.pending.size)
assertEquals(0, registry.running.size)
assertEquals(0, registry.completed.size)
// THEN
// not running
assertFalse(registry.isRunning)
}
@Test
fun request_pending() {
// WHEN
// request is enqueued
registry.add(Request(user, OCFile("/path/alpha/1")))
assertEquals(1, registry.pending.size)
assertEquals(0, registry.running.size)
assertEquals(0, registry.completed.size)
// THEN
// is running
assertTrue(registry.isRunning)
}
@Test
fun request_running() {
// WHEN
// request is running
registry.add(Request(user, OCFile("/path/alpha/1")))
registry.startNext()
assertEquals(0, registry.pending.size)
assertEquals(1, registry.running.size)
assertEquals(0, registry.completed.size)
// THEN
// is running
assertTrue(registry.isRunning)
}
@Test
fun request_completed() {
// WHEN
// request is running
val id = registry.add(Request(user, OCFile("/path/alpha/1")))
registry.startNext()
registry.complete(id, true)
assertEquals(0, registry.pending.size)
assertEquals(0, registry.running.size)
assertEquals(1, registry.completed.size)
// THEN
// is not running
assertFalse(registry.isRunning)
}
}
}
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.integration.deck
package com.nextcloud.client.integrations.deck
import android.content.Context
import android.content.Intent
@@ -243,10 +243,7 @@ class MigrationsManagerTest {
// pending migrations
// mandatory migrations are passing
// one migration is optional and fails
assertEquals("Fixture should provide 1 optional, failing migration",
1,
migrations.count { !it.mandatory }
)
assertEquals("Fixture should provide 1 optional, failing migration", 1, migrations.count { !it.mandatory })
val optionalFailingMigration = migrations.first { !it.mandatory }
whenever(optionalFailingMigration.run()).thenThrow(RuntimeException())
@@ -7,17 +7,16 @@ import android.accounts.OperationCanceledException;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import com.facebook.testing.screenshot.Screenshot;
import com.nextcloud.client.RetryTestRule;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.nextcloud.client.device.BatteryStatus;
import com.nextcloud.client.device.PowerManagementService;
import com.nextcloud.client.network.Connectivity;
import com.nextcloud.client.network.ConnectivityService;
import com.nextcloud.java.util.Optional;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.UploadsStorageManager;
@@ -27,24 +26,14 @@ import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation;
import com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation;
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation;
import com.owncloud.android.lib.resources.files.model.RemoteFile;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import junit.framework.TestCase;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import org.junit.After;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Rule;
import java.io.File;
import java.io.FileWriter;
@@ -52,6 +41,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import androidx.annotation.NonNull;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.espresso.intent.rule.IntentsTestRule;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -69,13 +59,14 @@ import static org.junit.Assert.assertTrue;
*/
public abstract class AbstractIT {
@Rule public RetryTestRule retryTestRule = new RetryTestRule();
//@Rule public RetryTestRule retryTestRule = new RetryTestRule();
protected static OwnCloudClient client;
protected static Account account;
protected static User user;
protected static Context targetContext;
private Activity currentActivity;
protected Activity currentActivity;
protected FileDataStorageManager fileDataStorageManager =
new FileDataStorageManager(account, targetContext.getContentResolver());
@@ -83,39 +74,30 @@ public abstract class AbstractIT {
@BeforeClass
public static void beforeAll() {
try {
// clean up
targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
AccountManager platformAccountManager = AccountManager.get(targetContext);
Uri baseUrl = Uri.parse(arguments.getString("TEST_SERVER_URL"));
String loginName = arguments.getString("TEST_SERVER_USERNAME");
String password = arguments.getString("TEST_SERVER_PASSWORD");
Account temp = new Account(loginName + "@" + baseUrl, MainApp.getAccountType(targetContext));
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
if (!accountManager.exists(temp)) {
AccountManager platformAccountManager = AccountManager.get(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
for (Account account : platformAccountManager.getAccounts()) {
platformAccountManager.removeAccountExplicitly(account);
}
Account temp = new Account("test@https://server.com", MainApp.getAccountType(targetContext));
platformAccountManager.addAccountExplicitly(temp, "password", null);
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL, "https://server.com");
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_USER_ID, "test");
final UserAccountManager userAccountManager = UserAccountManagerImpl.fromContext(targetContext);
account = userAccountManager.getAccountByName(loginName + "@" + baseUrl);
account = userAccountManager.getAccountByName("test@https://server.com");
if (account == null) {
throw new ActivityNotFoundException();
}
Optional<User> optionalUser = userAccountManager.getUser(account.name);
user = optionalUser.orElseThrow(IllegalAccessError::new);
client = OwnCloudClientFactory.createOwnCloudClient(account, targetContext);
createDummyFiles();
waitForServer(client, baseUrl);
deleteAllFiles(); // makes sure that no file/folder is in root
} catch (OperationCanceledException e) {
e.printStackTrace();
} catch (AuthenticatorException e) {
@@ -127,36 +109,6 @@ public abstract class AbstractIT {
}
}
@After
public void after() {
deleteAllFiles();
}
public static void deleteAllFiles() {
RemoteOperationResult result = new ReadFolderRemoteOperation("/").execute(client);
assertTrue(result.getLogMessage(), result.isSuccess());
for (Object object : result.getData()) {
RemoteFile remoteFile = (RemoteFile) object;
if (!remoteFile.getRemotePath().equals("/")) {
if (remoteFile.isEncrypted()) {
assertTrue(new ToggleEncryptionRemoteOperation(remoteFile.getLocalId(),
remoteFile.getRemotePath(),
false)
.execute(client)
.isSuccess());
}
assertTrue(new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess()
);
}
}
}
protected FileDataStorageManager getStorageManager() {
return fileDataStorageManager;
}
@@ -165,14 +117,6 @@ public abstract class AbstractIT {
return AccountManager.get(targetContext).getAccounts();
}
private static void createDummyFiles() throws IOException {
new File(FileStorageUtils.getSavePath(account.name)).mkdirs();
createFile("empty.txt", 0);
createFile("nonEmpty.txt", 100);
createFile("chunkedFile.txt", 500000);
}
public static void createFile(String name, int iteration) throws IOException {
File file = new File(FileStorageUtils.getSavePath(account.name) + File.separator + name);
file.createNewFile();
@@ -186,28 +130,6 @@ public abstract class AbstractIT {
writer.close();
}
private static void waitForServer(OwnCloudClient client, Uri baseUrl) {
GetMethod get = new GetMethod(baseUrl + "/status.php");
try {
int i = 0;
while (client.executeMethod(get) != HttpStatus.SC_OK && i < 3) {
System.out.println("wait…");
Thread.sleep(60 * 1000);
i++;
}
if (i == 3) {
Assert.fail("Server not ready!");
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
protected File getFile(String filename) throws IOException {
InputStream inputStream = getInstrumentation().getContext().getAssets().open(filename);
File temp = File.createTempFile("file", "file");
@@ -263,7 +185,7 @@ public abstract class AbstractIT {
}
public OCFile createFolder(String remotePath) {
TestCase.assertTrue(new CreateFolderOperation(remotePath, account, targetContext)
TestCase.assertTrue(new CreateFolderOperation(remotePath, user, targetContext)
.execute(client, getStorageManager())
.isSuccess());
@@ -284,7 +206,7 @@ public abstract class AbstractIT {
};
PowerManagementService powerManagementServiceMock = new PowerManagementService() {
@NotNull
@NonNull
@Override
public BatteryStatus getBattery() {
return new BatteryStatus();
@@ -309,7 +231,7 @@ public abstract class AbstractIT {
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
@@ -0,0 +1,245 @@
package com.owncloud.android;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.content.ActivityNotFoundException;
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.client.device.BatteryStatus;
import com.nextcloud.client.device.PowerManagementService;
import com.nextcloud.client.network.Connectivity;
import com.nextcloud.client.network.ConnectivityService;
import com.nextcloud.java.util.Optional;
import com.owncloud.android.datamodel.UploadsStorageManager;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.e2ee.ToggleEncryptionRemoteOperation;
import com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation;
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation;
import com.owncloud.android.lib.resources.files.model.RemoteFile;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.junit.After;
import org.junit.Assert;
import org.junit.BeforeClass;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import androidx.annotation.NonNull;
import androidx.test.platform.app.InstrumentationRegistry;
import static org.junit.Assert.assertTrue;
/**
* Common base for all integration tests
*/
public abstract class AbstractOnServerIT extends AbstractIT {
@BeforeClass
public static void beforeAll() {
try {
// clean up
targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
AccountManager platformAccountManager = AccountManager.get(targetContext);
for (Account account : platformAccountManager.getAccounts()) {
platformAccountManager.removeAccountExplicitly(account);
}
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
Uri baseUrl = Uri.parse(arguments.getString("TEST_SERVER_URL"));
String loginName = arguments.getString("TEST_SERVER_USERNAME");
String password = arguments.getString("TEST_SERVER_PASSWORD");
Account temp = new Account(loginName + "@" + baseUrl, MainApp.getAccountType(targetContext));
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
if (!accountManager.exists(temp)) {
platformAccountManager.addAccountExplicitly(temp, password, null);
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(UserAccountManager.ACCOUNT_VERSION));
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_VERSION, "14.0.0.0");
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL, baseUrl.toString());
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_USER_ID, loginName); // same as userId
}
final UserAccountManager userAccountManager = UserAccountManagerImpl.fromContext(targetContext);
account = userAccountManager.getAccountByName(loginName + "@" + baseUrl);
if (account == null) {
throw new ActivityNotFoundException();
}
Optional<User> optionalUser = userAccountManager.getUser(account.name);
user = optionalUser.orElseThrow(IllegalAccessError::new);
client = OwnCloudClientFactory.createOwnCloudClient(account, targetContext);
createDummyFiles();
waitForServer(client, baseUrl);
deleteAllFiles(); // makes sure that no file/folder is in root
} catch (OperationCanceledException e) {
e.printStackTrace();
} catch (AuthenticatorException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (AccountUtils.AccountNotFoundException e) {
e.printStackTrace();
}
}
@After
public void after() {
deleteAllFiles();
}
public static void deleteAllFiles() {
RemoteOperationResult result = new ReadFolderRemoteOperation("/").execute(client);
assertTrue(result.getLogMessage(), result.isSuccess());
for (Object object : result.getData()) {
RemoteFile remoteFile = (RemoteFile) object;
if (!remoteFile.getRemotePath().equals("/")) {
if (remoteFile.isEncrypted()) {
assertTrue(new ToggleEncryptionRemoteOperation(remoteFile.getLocalId(),
remoteFile.getRemotePath(),
false)
.execute(client)
.isSuccess());
}
assertTrue(new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess()
);
}
}
}
private static void createDummyFiles() throws IOException {
new File(FileStorageUtils.getSavePath(account.name)).mkdirs();
createFile("empty.txt", 0);
createFile("nonEmpty.txt", 100);
createFile("chunkedFile.txt", 500000);
}
public static void createFile(String name, int iteration) throws IOException {
File file = new File(FileStorageUtils.getSavePath(account.name) + File.separator + name);
file.createNewFile();
FileWriter writer = new FileWriter(file);
for (int i = 0; i < iteration; i++) {
writer.write("123123123123123123123123123\n");
}
writer.flush();
writer.close();
}
private static void waitForServer(OwnCloudClient client, Uri baseUrl) {
GetMethod get = new GetMethod(baseUrl + "/status.php");
try {
int i = 0;
while (client.executeMethod(get) != HttpStatus.SC_OK && i < 3) {
System.out.println("wait…");
Thread.sleep(60 * 1000);
i++;
}
if (i == 3) {
Assert.fail("Server not ready!");
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public void uploadOCUpload(OCUpload ocUpload) {
ConnectivityService connectivityServiceMock = new ConnectivityService() {
@Override
public boolean isInternetWalled() {
return false;
}
@Override
public Connectivity getConnectivity() {
return Connectivity.CONNECTED_WIFI;
}
};
PowerManagementService powerManagementServiceMock = new PowerManagementService() {
@NonNull
@Override
public BatteryStatus getBattery() {
return new BatteryStatus();
}
@Override
public boolean isPowerSavingEnabled() {
return false;
}
@Override
public boolean isPowerSavingExclusionAvailable() {
return false;
}
};
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
UploadsStorageManager uploadsStorageManager = new UploadsStorageManager(accountManager,
targetContext.getContentResolver());
UploadFileOperation newUpload = new UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
);
newUpload.addRenameUploadListener(() -> {
// dummy
});
newUpload.setRemoteFolderToBeCreated();
RemoteOperationResult result = newUpload.execute(client, getStorageManager());
assertTrue(result.getLogMessage(), result.isSuccess());
//
// shortSleep();
// shortSleep();
//
// assertNotNull(getStorageManager().getFileByDecryptedRemotePath(ocUpload.getRemotePath()).getRemoteId());
}
}
@@ -1,37 +0,0 @@
/*
*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2020 Tobias Kaminsky
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.owncloud.android;
import com.owncloud.android.ui.activities.data.activities.ActivitiesRepository;
import com.owncloud.android.ui.activities.data.activities.ActivitiesServiceApi;
import dagger.Module;
import dagger.Provides;
@Module
public class ActivitiesModuleMock {
@Provides
ActivitiesRepository activitiesRepository(ActivitiesServiceApi api) {
return new LocalActivitiesRepository();
}
}
@@ -18,7 +18,7 @@ import static org.junit.Assert.assertNull;
* Tests related to file operations
*/
@RunWith(AndroidJUnit4.class)
public class FileIT extends AbstractIT {
public class FileIT extends AbstractOnServerIT {
@Test
public void testCreateFolder() {
@@ -27,7 +27,7 @@ public class FileIT extends AbstractIT {
// folder does not exist yet
assertNull(getStorageManager().getFileByPath(path));
SyncOperation syncOp = new CreateFolderOperation(path, account, targetContext);
SyncOperation syncOp = new CreateFolderOperation(path, user, targetContext);
RemoteOperationResult result = syncOp.execute(client, getStorageManager());
assertTrue(result.toString(), result.isSuccess());
@@ -46,7 +46,7 @@ public class FileIT extends AbstractIT {
// folder does not exist yet
assertNull(getStorageManager().getFileByPath(path));
SyncOperation syncOp = new CreateFolderOperation(path, account, targetContext);
SyncOperation syncOp = new CreateFolderOperation(path, user, targetContext);
RemoteOperationResult result = syncOp.execute(client, getStorageManager());
assertTrue(result.toString(), result.isSuccess());
@@ -1,133 +0,0 @@
/*
*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2020 Tobias Kaminsky
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.owncloud.android;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.activities.model.Activity;
import com.owncloud.android.lib.resources.activities.model.RichElement;
import com.owncloud.android.lib.resources.activities.model.RichElementTypeAdapter;
import com.owncloud.android.lib.resources.activities.models.PreviewObject;
import com.owncloud.android.lib.resources.activities.models.PreviewObjectAdapter;
import com.owncloud.android.ui.activities.data.activities.ActivitiesRepository;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import androidx.annotation.NonNull;
import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.TAG;
public class LocalActivitiesRepository implements ActivitiesRepository {
String json = "{\n" +
" \"ocs\": {\n" +
" \"meta\": {\n" +
" \"status\": \"ok\",\n" +
" \"statuscode\": 200,\n" +
" \"message\": \"OK\"\n" +
" },\n" +
" \"data\": [\n" +
" {\n" +
" \"activity_id\": 1114442,\n" +
" \"app\": \"files\",\n" +
" \"type\": \"file_created\",\n" +
" \"user\": \"test\",\n" +
" \"subject\": \"You created IMG_0255.JPG\",\n" +
" \"subject_rich\": [\n" +
" \"You created {file}\",\n" +
" {\n" +
" \"file\": {\n" +
" \"type\": \"file\",\n" +
" \"id\": \"3523820\",\n" +
" \"name\": \"IMG_0255.JPG\",\n" +
" \"path\": \"IMG_0255.JPG\",\n" +
" \"link\": \"https:\\/\\/cloud.server.com\\/f\\/3523820\"\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"message\": \"\",\n" +
" \"message_rich\": [\n" +
" \"\",\n" +
" []\n" +
" ],\n" +
" \"object_type\": \"files\",\n" +
" \"object_id\": 3523820,\n" +
" \"object_name\": \"\\/IMG_0255.JPG\",\n" +
" \"objects\": {\n" +
" \"3523820\": \"\\/IMG_0255.JPG\"\n" +
" },\n" +
" \"link\": \"https:\\/\\/cloud.server.com\\/apps\\/files\\/?dir=\\/\",\n" +
" \"icon\": \"https:\\/\\/cloud.server.com\\/apps\\/files\\/img\\/add-color.svg\",\n" +
" \"datetime\": \"2020-03-19T12:18:25+00:00\",\n" +
" \"previews\": [\n" +
" {\n" +
" \"link\": \"https:\\/\\/cloud.server.com\\/apps\\/files\\/?dir=\\/&scrollto=IMG_0255.JPG\",\n" +
" \"source\": \"https:\\/\\/cloud.server.com\\/core\\/preview.png?file=\\/IMG_0255.JPG&c=b68e0f2668cc89eec0d17e6125ff8ae7&x=150&y=150\",\n" +
" \"mimeType\": \"image\\/jpeg\",\n" +
" \"isMimeTypeIcon\": false,\n" +
" \"fileId\": 3523820,\n" +
" \"view\": \"files\"\n" +
" }\n" +
" ]\n" +
" }]}}";
@Override
public void getActivities(int lastGiven, @NonNull LoadActivitiesCallback callback) {
ArrayList activities = parseResult(json);
callback.onActivitiesLoaded(activities, 1);
}
protected ArrayList<Activity> parseResult(String response) {
if (response == null || response.isEmpty()) {
return new ArrayList<>();
}
try {
JsonParser jsonParser = new JsonParser();
JsonObject jo = (JsonObject) jsonParser.parse(response);
JsonArray jsonDataArray = jo.getAsJsonObject("ocs").getAsJsonArray("data");
Gson gson = new GsonBuilder()
.registerTypeAdapter(RichElement.class, new RichElementTypeAdapter())
.registerTypeAdapter(PreviewObject.class, new PreviewObjectAdapter())
.create();
Type listType = new TypeToken<List<Activity>>() {
}.getType();
return gson.fromJson(jsonDataArray, listType);
} catch (JsonSyntaxException e) {
Log_OC.e(TAG, "Not a valid json: " + response, e);
return new ArrayList<>();
}
}
}
@@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue;
@LargeTest
@RunWith(JUnit4.class)
public class ScreenshotsIT extends AbstractIT {
public class ScreenshotsIT extends AbstractOnServerIT {
@ClassRule
public static final LocaleTestRule localeTestRule = new LocaleTestRule();
@@ -73,7 +73,7 @@ public class ScreenshotsIT extends AbstractIT {
// folder does not exist yet
if (getStorageManager().getFileByPath(path) == null) {
SyncOperation syncOp = new CreateFolderOperation(path, account, targetContext);
SyncOperation syncOp = new CreateFolderOperation(path, user, targetContext);
RemoteOperationResult result = syncOp.execute(client, getStorageManager());
assertTrue(result.isSuccess());
@@ -1,67 +0,0 @@
/*
*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2020 Tobias Kaminsky
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.owncloud.android;
import android.app.Application;
import com.nextcloud.client.appinfo.AppInfoModule;
import com.nextcloud.client.device.DeviceModule;
import com.nextcloud.client.di.AppModule;
import com.nextcloud.client.di.ViewModelModule;
import com.nextcloud.client.jobs.JobsModule;
import com.nextcloud.client.network.NetworkModule;
import com.nextcloud.client.onboarding.OnboardingModule;
import com.nextcloud.client.preferences.PreferencesModule;
import javax.inject.Singleton;
import dagger.BindsInstance;
import dagger.Component;
import dagger.android.support.AndroidSupportInjectionModule;
@Singleton
@Component(modules = {
AndroidSupportInjectionModule.class,
AppModule.class,
PreferencesModule.class,
AppInfoModule.class,
NetworkModule.class,
DeviceModule.class,
OnboardingModule.class,
ViewModelModule.class,
JobsModule.class,
ActivitiesModuleMock.class
})
public interface TestAppComponent {
void inject(TestApp app);
@Component.Builder
interface Builder {
@BindsInstance
Builder application(Application application);
TestAppComponent build();
}
}
@@ -35,12 +35,10 @@ import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import org.jetbrains.annotations.NotNull;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.annotation.NonNull;
import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;
@@ -49,8 +47,7 @@ import static junit.framework.TestCase.assertTrue;
* Tests related to file uploads
*/
@RunWith(AndroidJUnit4.class)
public class UploadIT extends AbstractIT {
public class UploadIT extends AbstractOnServerIT {
private static final String FOLDER = "/testUpload/";
private UploadsStorageManager uploadsStorageManager =
@@ -80,7 +77,7 @@ public class UploadIT extends AbstractIT {
return false;
}
@NotNull
@NonNull
@Override
public BatteryStatus getBattery() {
return new BatteryStatus(false, 0);
@@ -140,7 +137,7 @@ public class UploadIT extends AbstractIT {
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
@@ -175,7 +172,7 @@ public class UploadIT extends AbstractIT {
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
@@ -206,7 +203,7 @@ public class UploadIT extends AbstractIT {
return false;
}
@NotNull
@NonNull
@Override
public BatteryStatus getBattery() {
return new BatteryStatus(true, 100);
@@ -221,7 +218,7 @@ public class UploadIT extends AbstractIT {
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
@@ -260,7 +257,7 @@ public class UploadIT extends AbstractIT {
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
@@ -288,7 +285,7 @@ public class UploadIT extends AbstractIT {
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
@@ -26,5 +26,7 @@ public class FileDataStorageManagerContentResolverTest extends FileDataStorageMa
@Override
public void before() {
sut = new FileDataStorageManager(account, targetContext.getContentResolver());
super.before();
}
}
@@ -24,7 +24,7 @@ package com.owncloud.android.datamodel;
import android.content.ContentValues;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.AbstractOnServerIT;
import com.owncloud.android.db.ProviderMeta;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation;
@@ -50,12 +50,18 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
abstract public class FileDataStorageManagerTest extends AbstractIT {
abstract public class FileDataStorageManagerTest extends AbstractOnServerIT {
protected FileDataStorageManager sut;
@Before
abstract public void before();
public void before() {
// make sure everything is removed
sut.deleteAllFiles();
sut.deleteVirtuals(VirtualFolderType.PHOTOS);
assertEquals(0, sut.getAllFiles().size());
}
@After
public void after() {
@@ -28,7 +28,7 @@ import com.nextcloud.client.device.BatteryStatus
import com.nextcloud.client.device.PowerManagementService
import com.nextcloud.client.network.Connectivity
import com.nextcloud.client.network.ConnectivityService
import com.owncloud.android.AbstractIT
import com.owncloud.android.AbstractOnServerIT
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.datamodel.UploadsStorageManager
import com.owncloud.android.db.OCUpload
@@ -43,7 +43,7 @@ import org.junit.Before
import org.junit.Test
import java.io.File
class FileUploaderIT : AbstractIT() {
class FileUploaderIT : AbstractOnServerIT() {
var uploadsStorageManager: UploadsStorageManager? = null
val connectivityServiceMock: ConnectivityService = object : ConnectivityService {
@@ -77,20 +77,24 @@ class FileUploaderIT : AbstractIT() {
val file = File(getSavePath(account.name) + "/chunkedFile.txt")
val ocUpload = OCUpload(file.absolutePath, "/testFile.txt", account.name)
assertTrue(UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
.setRemoteFolderToBeCreated()
.execute(client, storageManager).isSuccess)
assertTrue(
UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
)
.setRemoteFolderToBeCreated()
.execute(client, storageManager)
.isSuccess
)
val result = ReadFileRemoteOperation("/testFile.txt").execute(client)
assertTrue(result.isSuccess)
@@ -99,19 +103,23 @@ class FileUploaderIT : AbstractIT() {
val ocUpload2 = OCUpload(getSavePath(account.name) + "/empty.txt", "/testFile.txt", account.name)
assertTrue(UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
null,
ocUpload2,
FileUploader.NameCollisionPolicy.OVERWRITE,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
.execute(client, storageManager).isSuccess)
assertTrue(
UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload2,
FileUploader.NameCollisionPolicy.OVERWRITE,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
)
.execute(client, storageManager)
.isSuccess
)
val result2 = ReadFileRemoteOperation("/testFile.txt").execute(client)
assertTrue(result2.isSuccess)
@@ -137,7 +145,8 @@ class FileUploaderIT : AbstractIT() {
UploadFileOperation.CREATED_BY_USER,
false,
false,
FileUploader.NameCollisionPolicy.DEFAULT)
FileUploader.NameCollisionPolicy.DEFAULT
)
longSleep()
@@ -154,7 +163,8 @@ class FileUploaderIT : AbstractIT() {
account,
ocFile2,
FileUploader.LOCAL_BEHAVIOUR_COPY,
FileUploader.NameCollisionPolicy.OVERWRITE)
FileUploader.NameCollisionPolicy.OVERWRITE
)
shortSleep()
@@ -174,20 +184,24 @@ class FileUploaderIT : AbstractIT() {
val file = File(getSavePath(account.name) + "/chunkedFile.txt")
val ocUpload = OCUpload(file.absolutePath, "/testFile.txt", account.name)
assertTrue(UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
.setRemoteFolderToBeCreated()
.execute(client, storageManager).isSuccess)
assertTrue(
UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
)
.setRemoteFolderToBeCreated()
.execute(client, storageManager)
.isSuccess
)
val result = ReadFileRemoteOperation("/testFile.txt").execute(client)
assertTrue(result.isSuccess)
@@ -197,22 +211,26 @@ class FileUploaderIT : AbstractIT() {
val file2 = File(getSavePath(account.name) + "/empty.txt")
val ocUpload2 = OCUpload(file2.absolutePath, "/testFile.txt", account.name)
assertTrue(UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
null,
ocUpload2,
FileUploader.NameCollisionPolicy.RENAME,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
.addRenameUploadListener {
renameListenerWasTriggered = true
}
.execute(client, storageManager).isSuccess)
assertTrue(
UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload2,
FileUploader.NameCollisionPolicy.RENAME,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
)
.addRenameUploadListener {
renameListenerWasTriggered = true
}
.execute(client, storageManager)
.isSuccess
)
val result2 = ReadFileRemoteOperation("/testFile.txt").execute(client)
assertTrue(result2.isSuccess)
@@ -244,7 +262,8 @@ class FileUploaderIT : AbstractIT() {
UploadFileOperation.CREATED_BY_USER,
false,
false,
FileUploader.NameCollisionPolicy.DEFAULT)
FileUploader.NameCollisionPolicy.DEFAULT
)
longSleep()
@@ -261,7 +280,8 @@ class FileUploaderIT : AbstractIT() {
account,
ocFile2,
FileUploader.LOCAL_BEHAVIOUR_COPY,
FileUploader.NameCollisionPolicy.RENAME)
FileUploader.NameCollisionPolicy.RENAME
)
shortSleep()
@@ -284,20 +304,24 @@ class FileUploaderIT : AbstractIT() {
val file = File(getSavePath(account.name) + "/chunkedFile.txt")
val ocUpload = OCUpload(file.absolutePath, "/testFile.txt", account.name)
assertTrue(UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
.setRemoteFolderToBeCreated()
.execute(client, storageManager).isSuccess)
assertTrue(
UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload,
FileUploader.NameCollisionPolicy.DEFAULT,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
)
.setRemoteFolderToBeCreated()
.execute(client, storageManager)
.isSuccess
)
val result = ReadFileRemoteOperation("/testFile.txt").execute(client)
assertTrue(result.isSuccess)
@@ -306,19 +330,22 @@ class FileUploaderIT : AbstractIT() {
val ocUpload2 = OCUpload(getSavePath(account.name) + "/empty.txt", "/testFile.txt", account.name)
assertFalse(UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
account,
null,
ocUpload2,
FileUploader.NameCollisionPolicy.CANCEL,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
.execute(client, storageManager).isSuccess)
assertFalse(
UploadFileOperation(
uploadsStorageManager,
connectivityServiceMock,
powerManagementServiceMock,
user,
null,
ocUpload2,
FileUploader.NameCollisionPolicy.CANCEL,
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false
)
.execute(client, storageManager).isSuccess
)
val result2 = ReadFileRemoteOperation("/testFile.txt").execute(client)
assertTrue(result2.isSuccess)
@@ -344,7 +371,8 @@ class FileUploaderIT : AbstractIT() {
UploadFileOperation.CREATED_BY_USER,
false,
false,
FileUploader.NameCollisionPolicy.DEFAULT)
FileUploader.NameCollisionPolicy.DEFAULT
)
longSleep()
@@ -361,7 +389,8 @@ class FileUploaderIT : AbstractIT() {
account,
ocFile2,
FileUploader.LOCAL_BEHAVIOUR_COPY,
FileUploader.NameCollisionPolicy.CANCEL)
FileUploader.NameCollisionPolicy.CANCEL
)
shortSleep()
@@ -0,0 +1,98 @@
/*
*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2020 Tobias Kaminsky
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.owncloud.android.operations;
import com.owncloud.android.AbstractOnServerIT;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.utils.FileStorageUtils;
import org.junit.Test;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
public class RemoveFileOperationIT extends AbstractOnServerIT {
@Test
public void deleteFolder() {
String parent = "/test/";
String path = parent + "folder1/";
assertTrue(new CreateFolderOperation(path, user, targetContext).execute(client, getStorageManager())
.isSuccess());
OCFile folder = getStorageManager().getFileByPath(path);
assertNotNull(folder);
assertTrue(new RemoveFileOperation(folder,
false,
account,
false,
targetContext)
.execute(client, getStorageManager())
.isSuccess());
OCFile parentFolder = getStorageManager().getFileByPath(parent);
assertNotNull(parentFolder);
assertTrue(new RemoveFileOperation(parentFolder,
false,
account,
false,
targetContext)
.execute(client, getStorageManager())
.isSuccess());
}
@Test
public void deleteFile() {
String parent = "/test/";
String path = parent + "empty.txt";
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/empty.txt", path, account.name);
uploadOCUpload(ocUpload);
OCFile file = getStorageManager().getFileByPath(path);
assertNotNull(file);
assertTrue(new RemoveFileOperation(file,
false,
account,
false,
targetContext)
.execute(client, getStorageManager())
.isSuccess());
OCFile parentFolder = getStorageManager().getFileByPath(parent);
assertNotNull(parentFolder);
assertTrue(new RemoveFileOperation(parentFolder,
false,
account,
false,
targetContext)
.execute(client, getStorageManager())
.isSuccess());
}
}
@@ -0,0 +1,135 @@
/*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2020 Tobias Kaminsky
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui;
import android.Manifest;
import android.accounts.Account;
import android.content.Context;
import android.os.Bundle;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.account.UserAccountManagerImpl;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AuthenticatorActivity;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import androidx.test.core.app.ActivityScenario;
import androidx.test.espresso.web.webdriver.DriverAtoms;
import androidx.test.espresso.web.webdriver.Locator;
import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.GrantPermissionRule;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.web.sugar.Web.onWebView;
import static androidx.test.espresso.web.webdriver.DriverAtoms.findElement;
import static androidx.test.espresso.web.webdriver.DriverAtoms.webClick;
import static org.junit.Assert.assertEquals;
@LargeTest
public class LoginIT {
@Rule
public GrantPermissionRule permissionRule = GrantPermissionRule.grant(Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Before
public void setUp() {
tearDown();
ActivityScenario.launch(AuthenticatorActivity.class);
}
@AfterClass
public static void tearDown() {
Context targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
if (accountManager.getAccounts().length > 0) {
accountManager.removeAllAccounts();
}
}
@Test
public void login() throws InterruptedException {
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
String baseUrl = arguments.getString("TEST_SERVER_URL");
String loginName = arguments.getString("TEST_SERVER_USERNAME");
String password = arguments.getString("TEST_SERVER_PASSWORD");
onView(withId(R.id.login)).perform(click());
onView(withId(R.id.host_url_input)).perform(typeText(baseUrl));
onView(withId(R.id.test_server_button)).perform(click());
Thread.sleep(3000);
onWebView().forceJavascriptEnabled();
// click on login
onWebView()
.withElement(findElement(Locator.XPATH, "//p[@id='redirect-link']/a"))
.perform(webClick());
// username
onWebView()
.withElement(findElement(Locator.XPATH, "//input[@id='user']"))
.perform(DriverAtoms.webKeys(loginName));
// password
onWebView()
.withElement(findElement(Locator.XPATH, "//input[@id='password']"))
.perform(DriverAtoms.webKeys(password));
// click login
onWebView()
.withElement(findElement(Locator.XPATH, "//input[@id='submit-form']"))
.perform(webClick());
Thread.sleep(2000);
// grant access
onWebView()
.withElement(findElement(Locator.XPATH, "//input[@type='submit']"))
.perform(webClick());
Thread.sleep(5 * 1000);
// check for account
Context targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
assertEquals(1, accountManager.getAccounts().length);
Account account = accountManager.getAccounts()[0];
// account.name is loginName@baseUrl (without protocol)
assertEquals(loginName, account.name.split("@")[0]);
assertEquals(baseUrl.split("//")[1], account.name.split("@")[1]);
}
}
@@ -31,17 +31,13 @@ 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.lib.resources.files.UploadFileRemoteOperation;
import com.owncloud.android.operations.RefreshFolderOperation;
import com.owncloud.android.ui.dialog.ConflictsResolveDialog;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import androidx.fragment.app.DialogFragment;
import androidx.test.espresso.intent.rule.IntentsTestRule;
@@ -59,6 +55,7 @@ public class ConflictsResolveActivityIT extends AbstractIT {
private boolean returnCode;
@Test
@ScreenshotTest
public void screenshotTextFiles() {
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
@@ -93,58 +90,59 @@ public class ConflictsResolveActivityIT extends AbstractIT {
Screenshot.snap(dialog.getDialog().getWindow().getDecorView()).record();
}
@Test
public void screenshotImages() throws IOException {
FileDataStorageManager storageManager = new FileDataStorageManager(account,
targetContext.getContentResolver());
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(account.name) + "/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,
account,
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.snap(dialog.getDialog().getWindow().getDecorView()).record();
}
// @Test
// @ScreenshotTest // todo run without real server
// public void screenshotImages() throws IOException {
// FileDataStorageManager storageManager = new FileDataStorageManager(account,
// targetContext.getContentResolver());
//
// OCFile newFile = new OCFile("/newFile.txt");
// newFile.setFileLength(56000);
// newFile.setModificationTimestamp(1522019340);
// newFile.setStoragePath(FileStorageUtils.getSavePath(account.name) + "/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,
// account,
// 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.snap(dialog.getDialog().getWindow().getDecorView()).record();
// }
@Test
public void cancel() {
@@ -187,6 +185,7 @@ public class ConflictsResolveActivityIT extends AbstractIT {
}
@Test
@ScreenshotTest
public void keepExisting() {
returnCode = false;
@@ -231,6 +230,7 @@ public class ConflictsResolveActivityIT extends AbstractIT {
}
@Test
@ScreenshotTest
public void keepNew() {
returnCode = false;
@@ -275,6 +275,7 @@ public class ConflictsResolveActivityIT extends AbstractIT {
}
@Test
@ScreenshotTest
public void keepBoth() {
returnCode = false;
@@ -28,6 +28,7 @@ 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.owncloud.android.AbstractIT;
@@ -57,6 +58,8 @@ public class DrawerActivityIT extends AbstractIT {
@Rule
public final GrantPermissionRule permissionRule = GrantPermissionRule.grant(
Manifest.permission.WRITE_EXTERNAL_STORAGE);
private static Account account1;
private static User user1;
private static Account account2;
private static String account2Name;
private static String account2DisplayName;
@@ -65,32 +68,51 @@ public class DrawerActivityIT extends AbstractIT {
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));
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);
if (!accountManager.exists(temp)) {
AccountManager platformAccountManager = AccountManager.get(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
}
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
final UserAccountManager userAccountManager = UserAccountManagerImpl.fromContext(targetContext);
account2 = userAccountManager.getAccountByName(loginName + "@" + baseUrl);
account2Name = loginName + "@" + baseUrl;
account2DisplayName = "User One@" + baseUrl;
account2DisplayName = "User Two@" + baseUrl;
}
@Test
public void switchAccountViaAccountList() {
FileDisplayActivity sut = activityRule.launchActivity(null);
assertEquals(account, sut.getUser().get().toPlatformAccount());
sut.setUser(user1);
assertEquals(account1, sut.getUser().get().toPlatformAccount());
onView(withId(R.id.switch_account_button)).perform(click());
@@ -101,6 +123,6 @@ public class DrawerActivityIT extends AbstractIT {
assertEquals(account2, sut.getUser().get().toPlatformAccount());
onView(withId(R.id.switch_account_button)).perform(click());
onView(withText(account.name)).perform(click());
onView(withText(account1.name)).perform(click());
}
}
@@ -28,7 +28,6 @@ import com.facebook.testing.screenshot.Screenshot;
import com.nextcloud.client.account.User;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -42,7 +41,6 @@ public class ManageAccountsActivityIT extends AbstractIT {
false);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
@@ -53,7 +51,6 @@ public class ManageAccountsActivityIT extends AbstractIT {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void userInfoDetail() {
ManageAccountsActivity sut = activityRule.launchActivity(null);
Loaded 100 of 515 files, more files were not shown because too many files have changed in this diff. Show more