Compare commits

..
Author SHA1 Message Date
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
328 changed files with 4501 additions and 6989 deletions

No files matched your search

+7 -7
View File
@@ -25,10 +25,10 @@ steps:
- ./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
@@ -104,10 +104,10 @@ steps:
- ./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
@@ -187,7 +187,7 @@ steps:
- 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:
@@ -262,7 +262,7 @@ steps:
- 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
- ./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:
@@ -388,7 +388,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
+37 -47
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.0'
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.1"
markwonVersion = "4.4.0"
prismVersion = "2.0.0"
androidLibraryVersion = "master-SNAPSHOT"
androidLibraryVersion ="f37013d222bc868514fa74a94fa9efd8fd2db8bc"
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 20200701
versionName "20200701"
}
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
}
}
@@ -306,6 +295,7 @@ dependencies {
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.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
@@ -368,8 +358,6 @@ dependencies {
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"
// dependencies for instrumented tests
// JUnit4 Rules
@@ -402,7 +390,11 @@ dependencies {
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'
androidTestImplementation 'net.bytebuddy:byte-buddy:1.10.13'
}
spotbugs {
toolVersion = '3.1.12'
}
configurations.all {
@@ -425,17 +417,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'
])
}
+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.3.4/**/lint.jar" />
<ignore path="**/jetified-butterknife-runtime-10.2.1/**/lint.jar" />
<ignore path="**/jetified-dagger-lint-aar-2.28.1/**/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: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 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: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

+1 -1
View File
@@ -1 +1 @@
373
335
+1 -1
View File
@@ -56,7 +56,7 @@ if result != 0
exit 1
end
system './gradlew spotbugsGplayDebug'
system './gradlew spotbugsGplayDebugReport'
# 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>
+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();
}
@@ -39,7 +39,6 @@ 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;
@@ -67,7 +66,6 @@ public class FileDisplayActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
@@ -78,7 +76,6 @@ public class FileDisplayActivityIT extends AbstractIT {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void drawer() {
FileDisplayActivity sut = activityRule.launchActivity(null);
@@ -93,7 +90,6 @@ public class FileDisplayActivityIT extends AbstractIT {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void showShares() {
assertTrue(new ExistenceCheckRemoteOperation("/shareToAdmin/", true).execute(client).isSuccess());
@@ -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);
@@ -22,25 +22,14 @@
package com.nextcloud.client;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import com.facebook.testing.screenshot.ScreenshotRunner;
import com.owncloud.android.TestApp;
import androidx.test.runner.AndroidJUnitRunner;
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);
}
@Override
public void onCreate(Bundle args) {
super.onCreate(args);
@@ -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);
@@ -26,7 +26,7 @@ import android.Manifest;
import com.owncloud.android.AbstractIT;
import com.owncloud.android.ui.activity.SyncedFoldersActivity;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import com.owncloud.android.utils.ScreenshotTest;
import org.junit.Rule;
import org.junit.Test;
@@ -45,7 +45,6 @@ public class SyncedFoldersActivityIT extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void openDrawer() {
super.openDrawer(activityRule);
@@ -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);
@@ -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)
}
}
}
@@ -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())
@@ -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();
}
}
@@ -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<>();
}
}
}
@@ -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();
}
}
@@ -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,
account,
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,
account,
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,
account,
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,
account,
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,
account,
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,
account,
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()
@@ -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);
@@ -50,7 +50,6 @@ import com.owncloud.android.operations.UploadFileOperation
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.utils.FileStorageUtils
import com.owncloud.android.utils.ScreenshotTest
import com.owncloud.android.utils.ScreenshotWithServerTest
import junit.framework.TestCase
import org.junit.Assert.assertTrue
import org.junit.Rule
@@ -90,14 +89,15 @@ class OCFileListFragmentIT : AbstractIT() {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun showRichWorkspace() {
assertTrue(CreateFolderOperation("/test/", account, targetContext).execute(client, storageManager).isSuccess)
val ocUpload = OCUpload(FileStorageUtils.getSavePath(account.name) + "/nonEmpty.txt",
val ocUpload = OCUpload(
FileStorageUtils.getSavePath(account.name) + "/nonEmpty.txt",
"/test/Readme.md",
account.name)
account.name
)
val newUpload = UploadFileOperation(
UploadsStorageManager(UserAccountManagerImpl.fromContext(targetContext), targetContext.contentResolver),
connectivityServiceMock,
@@ -109,20 +109,27 @@ class OCFileListFragmentIT : AbstractIT() {
FileUploader.LOCAL_BEHAVIOUR_COPY,
targetContext,
false,
false)
false
)
newUpload.addRenameUploadListener {}
newUpload.setRemoteFolderToBeCreated()
assertTrue(newUpload.execute(client, storageManager).isSuccess)
assertTrue(RefreshFolderOperation(storageManager.getFileByPath("/test/"),
System.currentTimeMillis() / SECOND_IN_MILLIS,
false,
true,
storageManager,
account,
targetContext).execute(client).isSuccess)
assertTrue(
RefreshFolderOperation(
storageManager.getFileByPath("/test/"),
System.currentTimeMillis() / SECOND_IN_MILLIS,
false,
true,
storageManager,
account,
targetContext
)
.execute(client)
.isSuccess
)
val sut = ActivityScenario.launch(FileDisplayActivity::class.java)
shortSleep()
@@ -169,22 +176,27 @@ class OCFileListFragmentIT : AbstractIT() {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun createAndShowShareToUser() {
val path = "/shareToAdmin/"
TestCase.assertTrue(CreateFolderOperation(path, account, targetContext)
.execute(client, storageManager)
.isSuccess)
TestCase.assertTrue(
CreateFolderOperation(path, account, targetContext)
.execute(client, storageManager)
.isSuccess
)
// share folder to user "admin"
TestCase.assertTrue(CreateShareRemoteOperation(path,
ShareType.USER,
"admin",
false,
"",
OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER)
.execute(client).isSuccess)
TestCase.assertTrue(
CreateShareRemoteOperation(
path,
ShareType.USER,
"admin",
false,
"",
OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER
)
.execute(client).isSuccess
)
val sut: FileDisplayActivity = activityRule.launchActivity(null)
sut.startSyncFolderOperation(storageManager.getFileByPath("/"), true)
@@ -195,22 +207,28 @@ class OCFileListFragmentIT : AbstractIT() {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun createAndShowShareToGroup() {
val path = "/shareToGroup/"
TestCase.assertTrue(CreateFolderOperation(path, account, targetContext)
.execute(client, storageManager)
.isSuccess)
TestCase.assertTrue(
CreateFolderOperation(path, account, targetContext)
.execute(client, storageManager)
.isSuccess
)
// share folder to group
assertTrue(CreateShareRemoteOperation("/shareToGroup/",
ShareType.GROUP,
"users",
false,
"",
OCShare.DEFAULT_PERMISSION)
.execute(client).isSuccess)
assertTrue(
CreateShareRemoteOperation(
"/shareToGroup/",
ShareType.GROUP,
"users",
false,
"",
OCShare.DEFAULT_PERMISSION
)
.execute(client)
.isSuccess
)
val sut: FileDisplayActivity = activityRule.launchActivity(null)
sut.startSyncFolderOperation(storageManager.getFileByPath("/"), true)
@@ -253,22 +271,28 @@ class OCFileListFragmentIT : AbstractIT() {
// }
@Test
@ScreenshotWithServerTest
@ScreenshotTest
fun createAndShowShareViaLink() {
val path = "/shareViaLink/"
TestCase.assertTrue(CreateFolderOperation(path, account, targetContext)
.execute(client, storageManager)
.isSuccess)
TestCase.assertTrue(
CreateFolderOperation(path, account, targetContext)
.execute(client, storageManager)
.isSuccess
)
// share folder via public link
TestCase.assertTrue(CreateShareRemoteOperation("/shareViaLink/",
ShareType.PUBLIC_LINK,
"",
true,
"",
OCShare.READ_PERMISSION_FLAG)
.execute(client).isSuccess)
TestCase.assertTrue(
CreateShareRemoteOperation(
"/shareViaLink/",
ShareType.PUBLIC_LINK,
"",
true,
"",
OCShare.READ_PERMISSION_FLAG
)
.execute(client)
.isSuccess
)
val sut: FileDisplayActivity = activityRule.launchActivity(null)
sut.startSyncFolderOperation(storageManager.getFileByPath("/"), true)
@@ -31,7 +31,6 @@ import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.utils.ScreenshotTest;
import com.owncloud.android.utils.ScreenshotWithServerTest;
import org.junit.Rule;
import org.junit.Test;
@@ -52,7 +51,6 @@ public class PreviewTextFileFragmentTest extends AbstractIT {
Manifest.permission.WRITE_EXTERNAL_STORAGE);
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void displaySimpleTextFile() {
FileDisplayActivity sut = activityRule.launchActivity(null);
@@ -71,7 +69,6 @@ public class PreviewTextFileFragmentTest extends AbstractIT {
}
@Test
@ScreenshotWithServerTest
@ScreenshotTest
public void displayJavaSnippetFile() throws IOException {
FileDisplayActivity sut = activityRule.launchActivity(null);
@@ -0,0 +1,18 @@
Savarankiška produktyvumo platforma, leidžianti Jums išlaikyti kontrolę.
Savybės:
* Paprasta, moderni sąsaja, tinkanti Jūsų serveriui.
* Įkelti failai į „Nextcloud“ serverį
* Failų bendrinimas su kitais naudotojais
* Mėgstamų failų ir aplankų sinchronizacija.
* Galima paieška visuose serverio aplankuose.
* Automatinis Jūsų įrenginio darytų nuotraukų ir vaizdo įrašų įkėlimas
* Pranešimai apie atnaujinimus
* Kelių paskyrų palaikymas
* Saugi prieiga prie savo duomenų naudojant pirštų atspaudus arba PIN kodą
* Integracija su „DAVx5“ (anksčiau vadintu „DAVdroid“), kad būtų galima lengvai nustatyti kalendoriaus & kontaktų sinchronizavimą
. Prašome praneškite apie visas kilusias problemas puslapyje https://github.com/nextcloud/android/issues arba https://help.nextcloud.com/c/clients/android
Naujai prisijungėte Nextcloud? „Nextcloud“ yra privatus failų sinchronizavimo & ir ryšių serveris. Tai nemokama programinė įranga, kurią galite admnistruoti patys arba naudotis mokamais kitų įmonių pasiūlymais. Nextcloud Jūs kontroliuoti savo nuotraukas, kalendorių ar kontaktinius duomenis, dokumentus ir visa kita.
Išbandykite „Nextcloud“ https://nextcloud.com.
@@ -1 +1 @@
Nextcloud Android programėlė suteikia jums mobiliąją prieigą prie jūsų visų Next
Savarankiška platforma, leidžianti Jums išlaikyti kontrolę
-6
View File
@@ -66,12 +66,6 @@
</intent-filter>
</service>
<service
android:name="com.evernote.android.job.gcm.PlatformGcmService"
android:enabled="true"
tools:node="remove">
</service>
</application>
</manifest>
+8 -9
View File
@@ -121,14 +121,13 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="*"
android:pathPattern="/.*index.php/f/.*"
/>
<data android:scheme="https"
android:host="*"
android:pathPattern="/.*index.php/f/.*"
/>
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="*" />
<data android:pathPattern="/f/..*" />
<data android:pathPattern="/..*/f/..*" />
<data android:pathPattern="/..*/..*/f/..*" />
<data android:pathPattern="/..*/..*/..*/f/..*" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/users_and_groups_searchable"/>
@@ -251,7 +250,7 @@
android:authorities="@string/users_and_groups_search_authority"
android:enabled="true"
android:exported="false"
android:label="@string/search_users_and_groups_hint" />
android:label="@string/share_search" />
<provider
android:name=".providers.DocumentsStorageProvider"
@@ -137,8 +137,18 @@ public interface UserAccountManager extends CurrentAccountProvider {
* @param account account to compare
* @return false if ownerId is not set or owner is a different account
*/
@Deprecated
boolean accountOwnsFile(OCFile file, Account account);
/**
* Checks if an account owns the file (file's ownerId is the same as account name)
*
* @param file File to check
* @param user user to check against
* @return false if ownerId is not set or owner is a different account
*/
boolean userOwnsFile(OCFile file, User user);
/**
* Extract username from account.
*
@@ -340,6 +340,11 @@ public class UserAccountManagerImpl implements UserAccountManager {
return TextUtils.isEmpty(ownerId) || account.name.split("@")[0].equals(ownerId);
}
@Override
public boolean userOwnsFile(OCFile file, User user) {
return accountOwnsFile(file, user.toPlatformAccount());
}
public boolean migrateUserId() {
Account[] ocAccounts = accountManager.getAccountsByType(MainApp.getAccountType(context));
String userId;
@@ -40,9 +40,11 @@ internal class Task<T>(
try {
val result = taskBody.invoke()
if (!cancelled.get()) {
postResult.invoke(Runnable {
onSuccess?.invoke(result)
})
postResult.invoke(
Runnable {
onSuccess?.invoke(result)
}
)
}
} catch (t: Throwable) {
if (!cancelled.get()) {
@@ -1,38 +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.nextcloud.client.di;
import com.owncloud.android.ui.activities.data.activities.ActivitiesRepository;
import com.owncloud.android.ui.activities.data.activities.ActivitiesServiceApi;
import com.owncloud.android.ui.activities.data.activities.RemoteActivitiesRepository;
import dagger.Module;
import dagger.Provides;
@Module
public class ActivitiesModule {
@Provides
ActivitiesRepository activitiesRepository(ActivitiesServiceApi api) {
return new RemoteActivitiesRepository(api);
}
}
@@ -24,6 +24,7 @@ import android.app.Application;
import com.nextcloud.client.appinfo.AppInfoModule;
import com.nextcloud.client.device.DeviceModule;
import com.nextcloud.client.integrations.IntegrationsModule;
import com.nextcloud.client.jobs.JobsModule;
import com.nextcloud.client.network.NetworkModule;
import com.nextcloud.client.onboarding.OnboardingModule;
@@ -46,7 +47,7 @@ import dagger.android.support.AndroidSupportInjectionModule;
OnboardingModule.class,
ViewModelModule.class,
JobsModule.class,
ActivitiesModule.class
IntegrationsModule.class
})
@Singleton
public interface AppComponent {
@@ -26,6 +26,7 @@ import android.app.NotificationManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.media.AudioManager;
import android.os.Handler;
@@ -50,8 +51,10 @@ import com.nextcloud.client.migrations.MigrationsManagerImpl;
import com.nextcloud.client.network.ClientFactory;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.UploadsStorageManager;
import com.owncloud.android.ui.activities.data.activities.ActivitiesRepository;
import com.owncloud.android.ui.activities.data.activities.ActivitiesServiceApi;
import com.owncloud.android.ui.activities.data.activities.ActivitiesServiceApiImpl;
import com.owncloud.android.ui.activities.data.activities.RemoteActivitiesRepository;
import com.owncloud.android.ui.activities.data.files.FilesRepository;
import com.owncloud.android.ui.activities.data.files.FilesServiceApiImpl;
import com.owncloud.android.ui.activities.data.files.RemoteFilesRepository;
@@ -66,7 +69,7 @@ import dagger.Module;
import dagger.Provides;
@Module(includes = {ComponentsModule.class, VariantComponentsModule.class})
public class AppModule {
class AppModule {
@Provides
AccountManager accountManager(Application application) {
@@ -78,6 +81,11 @@ public class AppModule {
return application;
}
@Provides
PackageManager packageManager(Application application) {
return application.getPackageManager();
}
@Provides
ContentResolver contentResolver(Context context) {
return context.getContentResolver();
@@ -107,6 +115,10 @@ public class AppModule {
return new ActivitiesServiceApiImpl(accountManager);
}
@Provides
ActivitiesRepository activitiesRepository(ActivitiesServiceApi api) {
return new RemoteActivitiesRepository(api);
}
@Provides
FilesRepository filesRepository(UserAccountManager accountManager, ClientFactory clientFactory) {
@@ -49,7 +49,8 @@ class ShowErrorActivity : AppCompatActivity() {
val snackbar = DisplayUtils.createSnackbar(
error_page_container,
R.string.error_report_issue_text, Snackbar.LENGTH_INDEFINITE)
R.string.error_report_issue_text, Snackbar.LENGTH_INDEFINITE
)
.setAction(R.string.error_report_issue_action) { reportIssue() }
snackbar.show()
@@ -51,9 +51,12 @@ class EtmActivity : ToolbarActivity(), Injectable {
setupToolbar()
updateActionBarTitleAndHomeButtonByString(getString(R.string.etm_title))
vm = ViewModelProvider(this, viewModelFactory).get(EtmViewModel::class.java)
vm.currentPage.observe(this, Observer {
onPageChanged(it)
})
vm.currentPage.observe(
this,
Observer {
onPageChanged(it)
}
)
}
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
@@ -33,11 +33,11 @@ class EtmMenuFragment : EtmBaseFragment() {
private lateinit var list: RecyclerView
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
adapter = EtmMenuAdapter(context!!, this::onClickedItem)
adapter = EtmMenuAdapter(requireContext(), this::onClickedItem)
adapter.pages = vm.pages
val view = inflater.inflate(R.layout.fragment_etm_menu, container, false)
list = view.findViewById(R.id.etm_menu_list)
list.layoutManager = LinearLayoutManager(context!!)
list.layoutManager = LinearLayoutManager(requireContext())
list.adapter = adapter
return view
}
@@ -67,10 +67,10 @@ class EtmBackgroundJobsFragment : EtmBaseFragment() {
private val dateFormat = SimpleDateFormat("YYYY-MM-dd HH:MM:ssZ", Locale.getDefault())
var backgroundJobs: List<JobInfo> = emptyList()
set(value) {
field = value
notifyDataSetChanged()
}
set(value) {
field = value
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = inflater.inflate(R.layout.etm_background_job_list_item, parent, false)
@@ -112,7 +112,7 @@ class EtmBackgroundJobsFragment : EtmBaseFragment() {
list.layoutManager = LinearLayoutManager(context)
list.addItemDecoration(DividerItemDecoration(context, DividerItemDecoration.VERTICAL))
list.adapter = adapter
vm.backgroundJobs.observe(this, Observer { onBackgroundJobsUpdated(it) })
vm.backgroundJobs.observe(viewLifecycleOwner, Observer { onBackgroundJobsUpdated(it) })
return view
}
@@ -0,0 +1,71 @@
/**
* 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.User
import com.nextcloud.client.account.UserAccountManager
/**
* This component parses and matches deep links.
* Result is returned to the UI for further processing.
*
* TODO: This is intermediate refactring step; this component should be moved into
* [com.nextcloud.client.mixins.ActivityMixin] and handle UI callbacks as well
*/
class DeepLinkHandler(
private val userAccountManager: UserAccountManager
) {
/**
* Provide parsed link arguments and context information required
* to launch it.
*/
data class Match(val users: List<User>, val fileId: String)
companion object {
val DEEP_LINK_PATTERN = Regex("""(.*?)(/index\.php)?/f/([0-9]+)$""")
val BASE_URL_GROUP_INDEX = 1
val INDEX_PATH_GROUP_INDEX = 2
val FILE_ID_GROUP_INDEX = 3
}
/**
* Parse deep link and return a match result.
* Matching result may depend on environmental factors, such
* as app version or registered users.
*
* @param uri Deep link as arrived in incoming [android.content.Intent]
* @return deep link match result with all context data required for further processing; null if link does not match
*/
fun parseDeepLink(uri: Uri): Match? {
val match = DEEP_LINK_PATTERN.matchEntire(uri.toString())
if (match != null) {
val baseServerUrl = match.groupValues[BASE_URL_GROUP_INDEX]
val fileId = match.groupValues[FILE_ID_GROUP_INDEX]
return Match(users = getMatchingUsers(baseServerUrl), fileId = fileId)
} else {
return null
}
}
private fun getMatchingUsers(serverBaseUrl: String): List<User> =
userAccountManager.allUsers.filter { it.server.uri.toString() == serverBaseUrl }
}
@@ -0,0 +1,16 @@
package com.nextcloud.client.integrations
import android.content.Context
import android.content.pm.PackageManager
import com.nextcloud.client.integrations.deck.DeckApi
import com.nextcloud.client.integrations.deck.DeckApiImpl
import dagger.Module
import dagger.Provides
@Module
class IntegrationsModule {
@Provides
fun deckApi(context: Context, packageManager: PackageManager): DeckApi {
return DeckApiImpl(context, packageManager)
}
}
@@ -0,0 +1,4 @@
# Package com.nextcloud.client.integrations
This package provides utilities and interfaces to integrate
Files application with 3rd party apps.
@@ -18,7 +18,7 @@
* 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.app.PendingIntent;
@@ -18,7 +18,7 @@
* 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.app.PendingIntent;
import android.content.Context;
@@ -140,24 +140,29 @@ class AccountRemovalWork(
user: User,
arbitraryDataProvider: ArbitraryDataProvider
) {
val arbitraryDataPushString = arbitraryDataProvider.getValue(user.toPlatformAccount(),
PushUtils.KEY_PUSH)
val arbitraryDataPushString = arbitraryDataProvider.getValue(user.toPlatformAccount(), PushUtils.KEY_PUSH)
val pushServerUrl = context.resources.getString(R.string.push_server_url)
if (!TextUtils.isEmpty(arbitraryDataPushString) && !TextUtils.isEmpty(pushServerUrl)) {
val gson = Gson()
val pushArbitraryData = gson.fromJson(arbitraryDataPushString,
PushConfigurationState::class.java)
val pushArbitraryData = gson.fromJson(
arbitraryDataPushString,
PushConfigurationState::class.java
)
pushArbitraryData.isShouldBeDeleted = true
arbitraryDataProvider.storeOrUpdateKeyValue(user.accountName, PushUtils.KEY_PUSH,
gson.toJson(pushArbitraryData))
arbitraryDataProvider.storeOrUpdateKeyValue(
user.accountName, PushUtils.KEY_PUSH,
gson.toJson(pushArbitraryData)
)
PushUtils.pushRegistrationToServer(userAccountManager, pushArbitraryData.getPushToken())
}
}
private fun remoceSyncedFolders(context: Context, account: Account, clock: Clock) {
val syncedFolderProvider = SyncedFolderProvider(context.contentResolver,
val syncedFolderProvider = SyncedFolderProvider(
context.contentResolver,
AppPreferencesImpl.fromContext(context),
clock)
clock
)
val syncedFolders = syncedFolderProvider.syncedFolders
val syncedFolderIds: MutableList<Long> = ArrayList()
for (syncedFolder in syncedFolders) {
@@ -32,6 +32,7 @@ import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.core.Clock
import com.nextcloud.client.device.DeviceInfo
import com.nextcloud.client.device.PowerManagementService
import com.nextcloud.client.integrations.deck.DeckApi
import com.nextcloud.client.logger.Logger
import com.nextcloud.client.network.ConnectivityService
import com.nextcloud.client.preferences.AppPreferences
@@ -60,7 +61,8 @@ class BackgroundJobFactory @Inject constructor(
private val uploadsStorageManager: UploadsStorageManager,
private val connectivityService: ConnectivityService,
private val notificationManager: NotificationManager,
private val eventBus: EventBus
private val eventBus: EventBus,
private val deckApi: DeckApi
) : WorkerFactory() {
@Suppress("ComplexMethod") // it's just a trivial dispatch
@@ -173,7 +175,8 @@ class BackgroundJobFactory @Inject constructor(
context,
params,
notificationManager,
accountManager
accountManager,
deckApi
)
}
@@ -285,7 +285,8 @@ internal class BackgroundJobManagerImpl(
val request = periodicRequestBuilder(
jobClass = FilesSyncWork::class,
jobName = JOB_PERIODIC_FILES_SYNC,
intervalMins = DEFAULT_PERIODIC_JOB_INTERVAL_MINUTES).build()
intervalMins = DEFAULT_PERIODIC_JOB_INTERVAL_MINUTES
).build()
workManager.enqueueUniquePeriodicWork(JOB_PERIODIC_FILES_SYNC, ExistingPeriodicWorkPolicy.REPLACE, request)
}
@@ -297,7 +298,8 @@ internal class BackgroundJobManagerImpl(
val request = oneTimeRequestBuilder(
jobClass = FilesSyncWork::class,
jobName = JOB_IMMEDIATE_FILES_SYNC)
jobName = JOB_IMMEDIATE_FILES_SYNC
)
.setInputData(arguments)
.build()
@@ -87,8 +87,10 @@ class ContactsBackupWork(
return Result.failure()
}
val user = optionalUser.get()
val lastExecution = arbitraryDataProvider.getLongValue(user.toPlatformAccount(),
ContactsPreferenceActivity.PREFERENCE_CONTACTS_LAST_BACKUP)
val lastExecution = arbitraryDataProvider.getLongValue(
user.toPlatformAccount(),
ContactsPreferenceActivity.PREFERENCE_CONTACTS_LAST_BACKUP
)
val force = inputData.getBoolean(FORCE, false)
if (force || lastExecution + JOB_INTERVAL_MS < Calendar.getInstance().timeInMillis) {
Log_OC.d(TAG, "start contacts backup job")
@@ -121,8 +123,10 @@ class ContactsBackupWork(
private fun backupContact(user: User, backupFolder: String) {
val vCard = ArrayList<String>()
val cursor = contentResolver.query(ContactsContract.Contacts.CONTENT_URI, null,
null, null, null)
val cursor = contentResolver.query(
ContactsContract.Contacts.CONTENT_URI, null,
null, null, null
)
if (cursor != null && cursor.count > 0) {
cursor.moveToFirst()
for (i in 0 until cursor.count) {
@@ -168,8 +172,10 @@ class ContactsBackupWork(
private fun expireFiles(daysToExpire: Int, backupFolderString: String, user: User) { // -1 disables expiration
if (daysToExpire > -1) {
val storageManager = FileDataStorageManager(user.toPlatformAccount(),
applicationContext.getContentResolver())
val storageManager = FileDataStorageManager(
user.toPlatformAccount(),
applicationContext.getContentResolver()
)
val backupFolder: OCFile = storageManager.getFileByPath(backupFolderString)
val cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_YEAR, -daysToExpire)
@@ -86,8 +86,11 @@ class FilesSyncWork(
var wakeLock: WakeLock? = null
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MainApp.getAuthority() +
WAKELOCK_TAG_SEPARATION + TAG)
wakeLock = powerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK,
MainApp.getAuthority() +
WAKELOCK_TAG_SEPARATION + TAG
)
wakeLock.acquire(WAKELOCK_ACQUIRE_TIMEOUT_MS)
}
val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false)
@@ -99,10 +102,12 @@ class FilesSyncWork(
val resources = context.resources
val lightVersion = resources.getBoolean(R.bool.syncedFolder_light)
val skipCustom = inputData.getBoolean(SKIP_CUSTOM, false)
FilesSyncHelper.restartJobsIfNeeded(uploadsStorageManager,
FilesSyncHelper.restartJobsIfNeeded(
uploadsStorageManager,
userAccountManager,
connectivityService,
powerManagementService)
powerManagementService
)
FilesSyncHelper.insertAllDBEntries(preferences, clock, skipCustom)
// Create all the providers we'll needq
val filesystemDataProvider = FilesystemDataProvider(contentResolver)
@@ -112,8 +117,10 @@ class FilesSyncWork(
dateFormat.timeZone = TimeZone.getTimeZone(TimeZone.getDefault().id)
for (syncedFolder in syncedFolderProvider.syncedFolders) {
if (syncedFolder.isEnabled && (!skipCustom || MediaFolderType.CUSTOM != syncedFolder.type)) {
syncFolder(context, resources, lightVersion, filesystemDataProvider, currentLocale, dateFormat,
syncedFolder)
syncFolder(
context, resources, lightVersion, filesystemDataProvider, currentLocale, dateFormat,
syncedFolder
)
}
}
wakeLock?.release()
@@ -157,8 +164,10 @@ class FilesSyncWork(
val mimeType = MimeTypeUtil.getBestMimeTypeByFilename(file.absolutePath)
if (lightVersion) {
needsCharging = resources.getBoolean(R.bool.syncedFolder_light_on_charging)
needsWifi = arbitraryDataProvider!!.getBooleanValue(accountName,
SettingsActivity.SYNCED_FOLDER_LIGHT_UPLOAD_ON_WIFI)
needsWifi = arbitraryDataProvider!!.getBooleanValue(
accountName,
SettingsActivity.SYNCED_FOLDER_LIGHT_UPLOAD_ON_WIFI
)
val uploadActionString = resources.getString(R.string.syncedFolder_light_upload_behaviour)
uploadAction = getUploadAction(uploadActionString)
subfolderByDate = resources.getBoolean(R.bool.syncedFolder_light_use_subfolders)
@@ -190,8 +199,10 @@ class FilesSyncWork(
needsCharging,
FileUploader.NameCollisionPolicy.ASK_USER
)
filesystemDataProvider.updateFilesystemFileAsSentForUpload(path,
java.lang.Long.toString(syncedFolder.id))
filesystemDataProvider.updateFilesystemFileAsSentForUpload(
path,
java.lang.Long.toString(syncedFolder.id)
)
}
}
@@ -123,38 +123,51 @@ class MediaFoldersDetectionWork constructor(
val allUsers = userAccountManager.allUsers
val activeUsers: MutableList<User> = ArrayList()
for (account in allUsers) {
if (!arbitraryDataProvider.getBooleanValue(account.toPlatformAccount(),
ManageAccountsActivity.PENDING_FOR_REMOVAL)) {
if (!arbitraryDataProvider.getBooleanValue(
account.toPlatformAccount(),
ManageAccountsActivity.PENDING_FOR_REMOVAL
)
) {
activeUsers.add(account)
}
}
for (user in activeUsers) {
for (imageMediaFolder in imageMediaFolderPaths) {
val folder = syncedFolderProvider.findByLocalPathAndAccount(imageMediaFolder,
user.toPlatformAccount())
val folder = syncedFolderProvider.findByLocalPathAndAccount(
imageMediaFolder,
user.toPlatformAccount()
)
if (folder == null) {
val contentTitle = String.format(
resources.getString(R.string.new_media_folder_detected),
resources.getString(R.string.new_media_folder_photos)
)
sendNotification(contentTitle,
sendNotification(
contentTitle,
imageMediaFolder.substring(imageMediaFolder.lastIndexOf('/') + 1),
user,
imageMediaFolder,
1)
1
)
}
}
for (videoMediaFolder in videoMediaFolderPaths) {
val folder = syncedFolderProvider.findByLocalPathAndAccount(videoMediaFolder,
user.toPlatformAccount())
val folder = syncedFolderProvider.findByLocalPathAndAccount(
videoMediaFolder,
user.toPlatformAccount()
)
if (folder == null) {
val contentTitle = String.format(context.getString(R.string.new_media_folder_detected),
context.getString(R.string.new_media_folder_videos))
sendNotification(contentTitle,
val contentTitle = String.format(
context.getString(R.string.new_media_folder_detected),
context.getString(R.string.new_media_folder_videos)
)
sendNotification(
contentTitle,
videoMediaFolder.substring(videoMediaFolder.lastIndexOf('/') + 1),
user,
videoMediaFolder,
2)
2
)
}
}
}
@@ -162,8 +175,10 @@ class MediaFoldersDetectionWork constructor(
}
} else {
mediaFoldersModel = MediaFoldersModel(imageMediaFolderPaths, videoMediaFolderPaths)
arbitraryDataProvider.storeOrUpdateKeyValue(ACCOUNT_NAME_GLOBAL, KEY_MEDIA_FOLDERS,
gson.toJson(mediaFoldersModel))
arbitraryDataProvider.storeOrUpdateKeyValue(
ACCOUNT_NAME_GLOBAL, KEY_MEDIA_FOLDERS,
gson.toJson(mediaFoldersModel)
)
}
return Result.success()
}
@@ -180,7 +195,8 @@ class MediaFoldersDetectionWork constructor(
intent.putExtra(SyncedFoldersActivity.EXTRA_SHOW_SIDEBAR, true)
val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
val notificationBuilder = NotificationCompat.Builder(
context, NotificationUtils.NOTIFICATION_CHANNEL_GENERAL)
context, NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
)
.setSmallIcon(R.drawable.notification_icon)
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.notification_icon))
.setColor(ThemeUtils.primaryColor(context))
@@ -42,7 +42,7 @@ import androidx.work.WorkerParameters
import com.google.gson.Gson
import com.nextcloud.client.account.User
import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.integration.deck.DeckApiImpl
import com.nextcloud.client.integrations.deck.DeckApi
import com.owncloud.android.R
import com.owncloud.android.datamodel.DecryptedPushMessage
import com.owncloud.android.lib.common.OwnCloudClient
@@ -75,7 +75,8 @@ class NotificationWork constructor(
private val context: Context,
params: WorkerParameters,
private val notificationManager: NotificationManager,
private val accountManager: UserAccountManager
private val accountManager: UserAccountManager,
private val deckApi: DeckApi
) : Worker(context, params) {
companion object {
@@ -99,17 +100,21 @@ class NotificationWork constructor(
val base64DecodedSignature = Base64.decode(signature, Base64.DEFAULT)
val privateKey = PushUtils.readKeyFromFile(false) as PrivateKey
try {
val signatureVerification = PushUtils.verifySignature(context,
val signatureVerification = PushUtils.verifySignature(
context,
accountManager,
base64DecodedSignature,
base64DecodedSubject)
base64DecodedSubject
)
if (signatureVerification != null && signatureVerification.isSignatureValid) {
val cipher = Cipher.getInstance("RSA/None/PKCS1Padding")
cipher.init(Cipher.DECRYPT_MODE, privateKey)
val decryptedSubject = cipher.doFinal(base64DecodedSubject)
val gson = Gson()
val decryptedPushMessage = gson.fromJson(String(decryptedSubject),
DecryptedPushMessage::class.java)
val decryptedPushMessage = gson.fromJson(
String(decryptedSubject),
DecryptedPushMessage::class.java
)
if (decryptedPushMessage.delete) {
notificationManager.cancel(decryptedPushMessage.nid)
} else if (decryptedPushMessage.deleteAll) {
@@ -135,7 +140,6 @@ class NotificationWork constructor(
val randomId = SecureRandom()
val file = notification.subjectRichParameters["file"]
val deckApi = DeckApiImpl(context, context.packageManager)
val deckActionOverrideIntent = deckApi.createForwardToDeckActionIntent(notification, user)
val pendingIntent: PendingIntent
@@ -174,10 +178,16 @@ class NotificationWork constructor(
disableDetection.putExtra(NUMERIC_NOTIFICATION_ID, notification.getNotificationId())
disableDetection.putExtra(PUSH_NOTIFICATION_ID, pushNotificationId)
disableDetection.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
val disableIntent = PendingIntent.getBroadcast(context, pushNotificationId, disableDetection,
PendingIntent.FLAG_CANCEL_CURRENT)
notificationBuilder.addAction(NotificationCompat.Action(R.drawable.ic_close,
context.getString(R.string.remove_push_notification), disableIntent))
val disableIntent = PendingIntent.getBroadcast(
context, pushNotificationId, disableDetection,
PendingIntent.FLAG_CANCEL_CURRENT
)
notificationBuilder.addAction(
NotificationCompat.Action(
R.drawable.ic_close,
context.getString(R.string.remove_push_notification), disableIntent
)
)
} else { // Actions
for (action in notification.getActions()) {
val actionIntent = Intent(context, NotificationReceiver::class.java)
@@ -186,9 +196,11 @@ class NotificationWork constructor(
actionIntent.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_LINK, action.link)
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_TYPE, action.type)
val actionPendingIntent = PendingIntent.getBroadcast(context, randomId.nextInt(),
val actionPendingIntent = PendingIntent.getBroadcast(
context, randomId.nextInt(),
actionIntent,
PendingIntent.FLAG_CANCEL_CURRENT)
PendingIntent.FLAG_CANCEL_CURRENT
)
var icon: Int
icon = if (action.primary) {
R.drawable.ic_check_circle
@@ -209,7 +221,8 @@ class NotificationWork constructor(
.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
.setAutoCancel(true)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentIntent(pendingIntent).build())
.setContentIntent(pendingIntent).build()
)
val notificationManager = NotificationManagerCompat.from(context)
notificationManager.notify(notification.getNotificationId(), notificationBuilder.build())
}
@@ -255,51 +268,54 @@ class NotificationWork constructor(
val numericNotificationId = intent.getIntExtra(NUMERIC_NOTIFICATION_ID, 0)
val accountName = intent.getStringExtra(KEY_NOTIFICATION_ACCOUNT)
if (numericNotificationId != 0) {
Thread(Runnable {
val notificationManager = context.getSystemService(
Activity.NOTIFICATION_SERVICE) as NotificationManager
var oldNotification: android.app.Notification? = null
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && notificationManager != null) {
for (statusBarNotification in notificationManager.activeNotifications) {
if (numericNotificationId == statusBarNotification.id) {
oldNotification = statusBarNotification.notification
break
}
}
cancel(context, numericNotificationId)
}
try {
val optionalUser = accountManager.getUser(accountName)
if (optionalUser.isPresent) {
val user = optionalUser.get()
val client = OwnCloudClientManagerFactory.getDefaultSingleton()
.getClientFor(user.toOwnCloudAccount(), context)
val actionType = intent.getStringExtra(KEY_NOTIFICATION_ACTION_TYPE)
val actionLink = intent.getStringExtra(KEY_NOTIFICATION_ACTION_LINK)
val success: Boolean
success = if (!TextUtils.isEmpty(actionType) && !TextUtils.isEmpty(actionLink)) {
val resultCode = executeAction(actionType, actionLink, client)
resultCode == HttpStatus.SC_OK || resultCode == HttpStatus.SC_ACCEPTED
} else {
DeleteNotificationRemoteOperation(numericNotificationId)
.execute(client).isSuccess
}
if (success) {
if (oldNotification == null) {
cancel(context, numericNotificationId)
Thread(
Runnable {
val notificationManager = context.getSystemService(
Activity.NOTIFICATION_SERVICE
) as NotificationManager
var oldNotification: android.app.Notification? = null
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && notificationManager != null) {
for (statusBarNotification in notificationManager.activeNotifications) {
if (numericNotificationId == statusBarNotification.id) {
oldNotification = statusBarNotification.notification
break
}
} else {
notificationManager.notify(numericNotificationId, oldNotification)
}
cancel(context, numericNotificationId)
}
try {
val optionalUser = accountManager.getUser(accountName)
if (optionalUser.isPresent) {
val user = optionalUser.get()
val client = OwnCloudClientManagerFactory.getDefaultSingleton()
.getClientFor(user.toOwnCloudAccount(), context)
val actionType = intent.getStringExtra(KEY_NOTIFICATION_ACTION_TYPE)
val actionLink = intent.getStringExtra(KEY_NOTIFICATION_ACTION_LINK)
val success: Boolean
success = if (!TextUtils.isEmpty(actionType) && !TextUtils.isEmpty(actionLink)) {
val resultCode = executeAction(actionType, actionLink, client)
resultCode == HttpStatus.SC_OK || resultCode == HttpStatus.SC_ACCEPTED
} else {
DeleteNotificationRemoteOperation(numericNotificationId)
.execute(client).isSuccess
}
if (success) {
if (oldNotification == null) {
cancel(context, numericNotificationId)
}
} else {
notificationManager.notify(numericNotificationId, oldNotification)
}
}
} catch (e: IOException) {
Log_OC.e(TAG, "Error initializing client", e)
} catch (e: OperationCanceledException) {
Log_OC.e(TAG, "Error initializing client", e)
} catch (e: AuthenticatorException) {
Log_OC.e(TAG, "Error initializing client", e)
}
} catch (e: IOException) {
Log_OC.e(TAG, "Error initializing client", e)
} catch (e: OperationCanceledException) {
Log_OC.e(TAG, "Error initializing client", e)
} catch (e: AuthenticatorException) {
Log_OC.e(TAG, "Error initializing client", e)
}
}).start()
).start()
}
}
@@ -93,8 +93,10 @@ class OfflineSyncWork constructor(
val ocFolder = storageManager.getFileByPath(folderName)
Log_OC.d(TAG, folderName + ": currentEtag: " + ocFolder.etag)
// check for etag change, if false, skip
val checkEtagOperation = CheckEtagRemoteOperation(ocFolder.encryptedFileName,
ocFolder.etagOnServer)
val checkEtagOperation = CheckEtagRemoteOperation(
ocFolder.remotePath,
ocFolder.etagOnServer
)
val result = checkEtagOperation.execute(user.toPlatformAccount(), context)
when (result.code) {
ResultCode.ETAG_UNCHANGED -> {
@@ -116,10 +118,12 @@ class OfflineSyncWork constructor(
if (files != null) {
for (file in files) {
val ocFile = storageManager.getFileByLocalPath(file.path)
val synchronizeFileOperation = SynchronizeFileOperation(ocFile.remotePath,
val synchronizeFileOperation = SynchronizeFileOperation(
ocFile.remotePath,
user,
true,
context)
context
)
synchronizeFileOperation.execute(storageManager, context)
}
}
@@ -41,7 +41,8 @@ data class LogEntry(val timestamp: Date, val level: Level, val tag: String, val
* 1970-01-01T00:00:00.000Z;D;tag;some message
*/
private val ENTRY_PARSE_REGEXP = Regex(
pattern = """(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z);([ADEIVW]);([^;]+);(.*)"""
pattern =
"""(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z);([ADEIVW]);([^;]+);(.*)"""
)
@JvmStatic
@@ -114,11 +114,13 @@ class LogsViewModel @Inject constructor(
val sizeKb = logsSize / KILOBYTE
return when {
isLoading.value == true -> context.getString(R.string.logs_status_loading)
isFiltered -> context.getString(R.string.logs_status_filtered,
isFiltered -> context.getString(
R.string.logs_status_filtered,
sizeKb,
displayedEntries,
allEntries.size,
filterDurationMs)
filterDurationMs
)
!isFiltered -> context.getString(R.string.logs_status_not_filtered, sizeKb)
else -> ""
}
@@ -104,8 +104,10 @@ class Migrations @Inject constructor(
logger.i(TAG, "$description: no users to migrate")
} else {
users.forEach {
val backupEnabled = arbitraryDataProvider.getBooleanValue(it.accountName,
ContactsPreferenceActivity.PREFERENCE_CONTACTS_AUTOMATIC_BACKUP)
val backupEnabled = arbitraryDataProvider.getBooleanValue(
it.accountName,
ContactsPreferenceActivity.PREFERENCE_CONTACTS_AUTOMATIC_BACKUP
)
if (backupEnabled) {
jobManager.schedulePeriodicContactsBackup(it)
}
@@ -138,10 +138,10 @@ public interface AppPreferences {
/**
* Set preferred folder display type.
*
* @param folder Folder
* @param layout_name preference value
* @param folder Folder which layout is being set or null for root folder
* @param layoutName preference value
*/
void setFolderLayout(OCFile folder, String layout_name);
void setFolderLayout(@Nullable OCFile folder, String layoutName);
/**
* Saves the path where the user selected to do the last upload of a file shared from other app.
@@ -213,16 +213,18 @@ public interface AppPreferences {
/**
* Get preferred folder sort order.
*
* @param folder Folder whoch order is being retrieved or null for root folder
* @return sort order the sort order, default is {@link FileSortOrder#sort_a_to_z} (sort by name)
*/
FileSortOrder getSortOrderByFolder(OCFile folder);
FileSortOrder getSortOrderByFolder(@Nullable OCFile folder);
/**
* Set preferred folder sort order.
*
* @param sortOrder the sort order
* @param folder Folder which sort order is changed; if null, root folder is assumed
* @param sortOrder the sort order of a folder
*/
void setSortOrder(OCFile folder, FileSortOrder sortOrder);
void setSortOrder(@Nullable OCFile folder, FileSortOrder sortOrder);
/**
* Set preferred folder sort order.
@@ -289,12 +289,12 @@ public final class AppPreferencesImpl implements AppPreferences {
}
@Override
public void setFolderLayout(OCFile folder, String layout_name) {
public void setFolderLayout(@Nullable OCFile folder, String layoutName) {
setFolderPreference(context,
currentAccountProvider.getUser(),
PREF__FOLDER_LAYOUT,
folder,
layout_name);
layoutName);
}
@Override
@@ -307,7 +307,7 @@ public final class AppPreferencesImpl implements AppPreferences {
}
@Override
public void setSortOrder(OCFile folder, FileSortOrder sortOrder) {
public void setSortOrder(@Nullable OCFile folder, FileSortOrder sortOrder) {
setFolderPreference(context,
currentAccountProvider.getUser(),
PREF__FOLDER_SORT_ORDER,
@@ -607,13 +607,13 @@ public final class AppPreferencesImpl implements AppPreferences {
private static void setFolderPreference(final Context context,
final User user,
final String preferenceName,
final OCFile folder,
@Nullable final OCFile folder,
final String value) {
ArbitraryDataProvider dataProvider = new ArbitraryDataProvider(context.getContentResolver());
dataProvider.storeOrUpdateKeyValue(user.getAccountName(), getKeyFromFolder(preferenceName, folder), value);
}
private static String getKeyFromFolder(String preferenceName, OCFile folder) {
private static String getKeyFromFolder(String preferenceName, @Nullable OCFile folder) {
final String folderIdString = String.valueOf(folder != null ? folder.getFileId() :
FileDataStorageManager.ROOT_PARENT_ID);
@@ -31,6 +31,7 @@ import java.util.NoSuchElementException;
import androidx.core.util.Consumer;
import androidx.core.util.ObjectsCompat;
import androidx.core.util.Supplier;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import kotlin.jvm.functions.Function1;
/**
@@ -84,6 +85,7 @@ public final class Optional<T> {
*/
public static<T> Optional<T> empty() {
@SuppressWarnings("unchecked")
@SuppressFBWarnings("USBR_UNNECESSARY_STORE_BEFORE_RETURN")
Optional<T> t = (Optional<T>) EMPTY;
return t;
}
@@ -80,7 +80,8 @@ class ChooseAccountDialogFragment : DialogFragment(), AvatarGenerationListener,
resources.getDimension(R.dimen.list_item_avatar_icon_radius),
resources,
user_icon,
context)
context
)
// Defining user texts, accounts, etc.
user_name.text = user.toOwnCloudAccount().displayName
@@ -88,17 +89,21 @@ class ChooseAccountDialogFragment : DialogFragment(), AvatarGenerationListener,
account.text = user.accountName
// Defining user right indicator
val icon = ThemeUtils.tintDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.ic_check_circle),
ThemeUtils.primaryColor(requireContext(), true))
val icon = ThemeUtils.tintDrawable(
ContextCompat.getDrawable(requireContext(), R.drawable.ic_check_circle),
ThemeUtils.primaryColor(requireContext(), true)
)
account_menu.setImageDrawable(icon)
// Creating adapter for accounts list
val adapter = UserListAdapter(activity as BaseActivity,
val adapter = UserListAdapter(
activity as BaseActivity,
accountManager,
getAccountListItems(),
this,
false,
false)
false
)
accounts_list.adapter = adapter
// Creating listeners for quick-actions
@@ -98,7 +98,6 @@ import javax.net.ssl.SSLEngine;
import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import androidx.annotation.VisibleForTesting;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.util.Pair;
@@ -223,7 +222,10 @@ public class MainApp extends MultiDexApplication implements HasAndroidInjector {
super.attachBaseContext(base);
initGlobalContext(this);
setupDagger();
DaggerAppComponent.builder()
.application(this)
.build()
.inject(this);
// we don't want to handle crashes occurring inside crash reporter activity/process;
// let the platform deal with those
@@ -238,14 +240,6 @@ public class MainApp extends MultiDexApplication implements HasAndroidInjector {
}
}
@VisibleForTesting
public void setupDagger() {
DaggerAppComponent.builder()
.application(this)
.build()
.inject(this);
}
@SuppressFBWarnings("ST")
@Override
public void onCreate() {
@@ -479,12 +473,10 @@ public class MainApp extends MultiDexApplication implements HasAndroidInjector {
connectivityService,
powerManagementService);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
ReceiversHelper.registerPowerChangeReceiver(uploadsStorageManager,
accountManager,
connectivityService,
powerManagementService);
}
ReceiversHelper.registerPowerChangeReceiver(uploadsStorageManager,
accountManager,
connectivityService,
powerManagementService);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ReceiversHelper.registerPowerSaveReceiver(uploadsStorageManager,
File diff suppressed because it is too large. Load diff
@@ -1195,9 +1195,9 @@ public class FileDataStorageManager {
* @param path Path of the file.
* @param type Type of the share to get
* @param shareWith Target of the share. Ignored in type is {@link ShareType#PUBLIC_LINK}
* @return First {@link OCShare} instance found in DB bound to the file in 'path'
* @return All {@link OCShare} instance found in DB bound to the file in 'path'
*/
public OCShare getFirstShareByPathAndType(String path, ShareType type, String shareWith) {
public List<OCShare> getSharesByPathAndType(String path, ShareType type, String shareWith) {
Cursor cursor;
if (shareWith == null) {
shareWith = "";
@@ -1246,14 +1246,18 @@ public class FileDataStorageManager {
}
}
OCShare share = null;
List<OCShare> shares = new ArrayList<>();
OCShare share;
if (cursor != null) {
if (cursor.moveToFirst()) {
share = createShareInstance(cursor);
do {
share = createShareInstance(cursor);
shares.add(share);
} while (cursor.moveToNext());
}
cursor.close();
}
return share;
return shares;
}
// test with null cursor?
@@ -1274,6 +1278,7 @@ public class FileDataStorageManager {
share.setPasswordProtected(getInt(cursor, ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED) == 1);
share.setNote(getString(cursor, ProviderTableMeta.OCSHARES_NOTE));
share.setHideFileDownload(getInt(cursor, ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD) == 1);
share.setShareLink(getString(cursor, ProviderTableMeta.OCSHARES_SHARE_LINK));
return share;
}
@@ -1603,7 +1608,7 @@ public class FileDataStorageManager {
* @return
*/
private ArrayList<ContentProviderOperation> prepareInsertShares(
List<OCShare> shares, ArrayList<ContentProviderOperation> operations) {
Iterable<OCShare> shares, ArrayList<ContentProviderOperation> operations) {
ContentValues contentValues;
// prepare operations to insert or update files to save in the given folder
@@ -1626,6 +1631,7 @@ public class FileDataStorageManager {
contentValues.put(ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED, share.isPasswordProtected() ? 1 : 0);
contentValues.put(ProviderTableMeta.OCSHARES_NOTE, share.getNote());
contentValues.put(ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD, share.isHideFileDownload());
contentValues.put(ProviderTableMeta.OCSHARES_SHARE_LINK, share.getShareLink());
// adding a new share resource
operations.add(ContentProviderOperation
@@ -76,6 +76,7 @@ import java.util.List;
import java.util.Locale;
import androidx.annotation.NonNull;
import androidx.core.content.res.ResourcesCompat;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
@@ -888,7 +889,7 @@ public final class ThumbnailsCacheManager {
Log_OC.e(TAG, "Out of memory");
} catch (Throwable t) {
// the app should never break due to a problem with avatars
thumbnail = mResources.getDrawable(R.drawable.account_circle_white);
thumbnail = ResourcesCompat.getDrawable(mResources, R.drawable.account_circle_white, null);
Log_OC.e(TAG, "Generation of avatar for " + mUserId + " failed", t);
}
@@ -1011,7 +1012,7 @@ public final class ThumbnailsCacheManager {
try {
return TextDrawable.createAvatar(mAccount, mAvatarRadius);
} catch (Exception e1) {
return mResources.getDrawable(R.drawable.ic_user);
return ResourcesCompat.getDrawable(mResources, R.drawable.ic_user, null);
}
} else {
return BitmapUtils.bitmapToCircularBitmapDrawable(mResources, avatar);
@@ -1060,17 +1061,19 @@ public final class ThumbnailsCacheManager {
return null;
}
public static Bitmap addVideoOverlay(Bitmap thumbnail){
Drawable playButtonDrawable = MainApp.getAppContext().getResources().getDrawable(R.drawable.view_play);
public static Bitmap addVideoOverlay(Bitmap thumbnail) {
Drawable playButtonDrawable = ResourcesCompat.getDrawable(MainApp.getAppContext().getResources(),
R.drawable.view_play,
null);
Bitmap playButton = BitmapUtils.drawableToBitmap(playButtonDrawable);
Bitmap resizedPlayButton = Bitmap.createScaledBitmap(playButton,
(int) (thumbnail.getWidth() * 0.3),
(int) (thumbnail.getHeight() * 0.3), true);
(int) (thumbnail.getWidth() * 0.3),
(int) (thumbnail.getHeight() * 0.3), true);
Bitmap resultBitmap = Bitmap.createBitmap(thumbnail.getWidth(),
thumbnail.getHeight(),
Bitmap.Config.ARGB_8888);
thumbnail.getHeight(),
Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(resultBitmap);
@@ -24,14 +24,13 @@ package com.owncloud.android.datastorage.providers;
import com.owncloud.android.datastorage.StoragePoint;
import java.io.File;
import java.util.List;
/**
* @author Bartosz Przybylski
*/
abstract class AbstractStoragePointProvider implements IStoragePointProvider {
boolean canBeAddedToAvailableList(List<StoragePoint> currentList, String path) {
boolean canBeAddedToAvailableList(Iterable<StoragePoint> currentList, String path) {
if (path == null) {
return false;
}
@@ -31,7 +31,7 @@ import com.owncloud.android.MainApp;
*/
public class ProviderMeta {
public static final String DB_NAME = "filelist";
public static final int DB_VERSION = 57;
public static final int DB_VERSION = 58;
private ProviderMeta() {
// No instance
@@ -145,6 +145,7 @@ public class ProviderMeta {
public static final String OCSHARES_IS_PASSWORD_PROTECTED = "is_password_protected";
public static final String OCSHARES_NOTE = "note";
public static final String OCSHARES_HIDE_DOWNLOAD = "hide_download";
public static final String OCSHARES_SHARE_LINK = "share_link";
public static final String OCSHARES_DEFAULT_SORT_ORDER = OCSHARES_FILE_SOURCE
+ " collate nocase asc";
@@ -226,7 +226,7 @@ public class FileMenuFilter {
}
}
private void filterDetails(List<Integer> toShow, List<Integer> toHide) {
private void filterDetails(Collection<Integer> toShow, Collection<Integer> toHide) {
if (isSingleSelection()) {
toShow.add(R.id.action_see_details);
} else {
@@ -353,7 +353,7 @@ public class FileMenuFilter {
}
}
private void filterOpenWith(List<Integer> toShow, List<Integer> toHide, boolean synchronizing) {
private void filterOpenWith(Collection<Integer> toShow, Collection<Integer> toHide, boolean synchronizing) {
if (!isSingleFile() || !anyFileDown() || synchronizing) {
toHide.add(R.id.action_open_file_with);
} else {
@@ -407,7 +407,7 @@ public class FileMenuFilter {
}
}
private void filterRename(List<Integer> toShow, List<Integer> toHide, boolean synchronizing) {
private void filterRename(Collection<Integer> toShow, Collection<Integer> toHide, boolean synchronizing) {
if (!isSingleSelection() || synchronizing || containsEncryptedFile() || containsEncryptedFolder()) {
toHide.add(R.id.action_rename_file);
} else {
@@ -71,7 +71,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCo
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.files.FileUtils;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.ConflictsResolveActivity;
import com.owncloud.android.ui.activity.UploadListActivity;
import com.owncloud.android.ui.notifications.NotificationUtils;
import com.owncloud.android.utils.ErrorMessageAdapter;
@@ -671,12 +671,15 @@ public class FileUploader extends Service
}
/// includes a pending intent in the notification showing the details
Intent showUploadListIntent = new Intent(this, UploadListActivity.class);
showUploadListIntent.putExtra(FileActivity.EXTRA_FILE, upload.getFile());
showUploadListIntent.putExtra(FileActivity.EXTRA_ACCOUNT, upload.getAccount());
showUploadListIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(this, (int) System.currentTimeMillis(),
showUploadListIntent, 0));
Intent intent = UploadListActivity.createIntent(upload.getFile(),
upload.getAccount(),
Intent.FLAG_ACTIVITY_CLEAR_TOP,
this);
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(this,
(int) System.currentTimeMillis(),
intent,
0)
);
if (!upload.isInstantPicture() && !upload.isInstantVideo()) {
if (mNotificationManager == null) {
@@ -776,14 +779,24 @@ public class FileUploader extends Service
PendingIntent.FLAG_ONE_SHOT
));
} else {
//in case of failure, do not show details file view (because there is no file!)
Intent showUploadListIntent = new Intent(this, UploadListActivity.class);
showUploadListIntent.putExtra(FileActivity.EXTRA_FILE, upload.getFile());
showUploadListIntent.putExtra(FileActivity.EXTRA_ACCOUNT, upload.getAccount());
showUploadListIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(
this, (int) System.currentTimeMillis(), showUploadListIntent, 0
));
Intent intent;
if (uploadResult.getCode().equals(ResultCode.SYNC_CONFLICT)) {
intent = ConflictsResolveActivity.createIntent(upload.getFile(),
upload.getAccount(),
Intent.FLAG_ACTIVITY_CLEAR_TOP,
this);
} else {
intent = UploadListActivity.createIntent(upload.getFile(),
upload.getAccount(),
Intent.FLAG_ACTIVITY_CLEAR_TOP,
this);
}
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(this,
(int) System.currentTimeMillis(),
intent,
0)
);
}
mNotificationBuilder.setContentText(content);
@@ -47,10 +47,10 @@ import java.util.Locale;
/**
* View containing controls for a {@link MediaPlayer}.
*
* Holds buttons "play / pause", "rewind", "fast forward" and a progress slider.
*
* View containing controls for a {@link MediaPlayer}.
* <p>
* Holds buttons "play / pause", "rewind", "fast forward" and a progress slider.
* <p>
* It synchronizes itself with the state of the {@link MediaPlayer}.
*/
public class MediaControlView extends FrameLayout implements OnClickListener, OnSeekBarChangeListener {
@@ -313,7 +313,6 @@ public class MediaControlView extends FrameLayout implements OnClickListener, On
int pos;
boolean playing = playerControl.isPlaying();
switch (v.getId()) {
case R.id.playBtn:
doPauseResume();
break;
@@ -337,6 +336,10 @@ public class MediaControlView extends FrameLayout implements OnClickListener, On
}
setProgress();
break;
default:
// do nothing
break;
}
}
@@ -23,11 +23,9 @@ package com.owncloud.android.operations;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.operations.RemoteOperation;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.files.FileUtils;
import com.owncloud.android.lib.resources.shares.CreateShareRemoteOperation;
import com.owncloud.android.lib.resources.shares.GetSharesForFileRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.operations.common.SyncOperation;
@@ -49,45 +47,23 @@ public class CreateShareViaLinkOperation extends SyncOperation {
@Override
protected RemoteOperationResult run(OwnCloudClient client) {
// Check if the share link already exists
RemoteOperation operation = new GetSharesForFileRemoteOperation(path, false, false);
RemoteOperationResult result = operation.execute(client);
// Create public link if doesn't exist yet
boolean publicShareExists = false;
if (result.isSuccess()) {
OCShare share;
for (int i=0 ; i<result.getData().size(); i++) {
share = (OCShare) result.getData().get(i);
if (ShareType.PUBLIC_LINK.equals(share.getShareType())) {
publicShareExists = true;
break;
}
}
}
if (!publicShareExists) {
CreateShareRemoteOperation createOp = new CreateShareRemoteOperation(
path,
ShareType.PUBLIC_LINK,
"",
false,
password,
OCShare.DEFAULT_PERMISSION
);
createOp.setGetShareDetails(true);
result = createOp.execute(client);
}
CreateShareRemoteOperation createOp = new CreateShareRemoteOperation(path,
ShareType.PUBLIC_LINK,
"",
false,
password,
OCShare.DEFAULT_PERMISSION);
createOp.setGetShareDetails(true);
RemoteOperationResult result = createOp.execute(client);
if (result.isSuccess()) {
if (result.getData().size() > 0) {
Object item = result.getData().get(0);
if (item instanceof OCShare) {
if (item instanceof OCShare) {
updateData((OCShare) item);
} else {
ArrayList<Object> data = result.getData();
result = new RemoteOperationResult(
RemoteOperationResult.ResultCode.SHARE_NOT_FOUND
);
result = new RemoteOperationResult(RemoteOperationResult.ResultCode.SHARE_NOT_FOUND);
result.setData(data);
}
} else {
@@ -110,8 +86,8 @@ public class CreateShareViaLinkOperation extends SyncOperation {
getStorageManager().saveShare(share);
// Update OCFile with data from share: ShareByLink and publicLink
OCFile file = getStorageManager().getFileByPath(path);
if (file!=null) {
OCFile file = getStorageManager().getFileByEncryptedRemotePath(path);
if (file != null) {
file.setPublicLink(share.getShareLink());
file.setSharedViaLink(true);
getStorageManager().saveFile(file);
@@ -21,8 +21,6 @@
package com.owncloud.android.operations;
import android.content.Context;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
@@ -46,44 +44,37 @@ public class UnshareOperation extends SyncOperation {
private static final int SINGLY_SHARED = 1;
private String mRemotePath;
private ShareType mShareType;
private String mShareWith;
private Context mContext;
private long shareId;
public UnshareOperation(String remotePath, ShareType shareType, String shareWith,
Context context) {
public UnshareOperation(String remotePath, long shareId) {
mRemotePath = remotePath;
mShareType = shareType;
mShareWith = shareWith;
mContext = context;
this.shareId = shareId;
}
@Override
protected RemoteOperationResult run(OwnCloudClient client) {
RemoteOperationResult result = null;
RemoteOperationResult result;
// Get Share for a file
OCShare share = getStorageManager().getFirstShareByPathAndType(mRemotePath,
mShareType, mShareWith);
OCShare share = getStorageManager().getShareById(shareId);
if (share != null) {
OCFile file = getStorageManager().getFileByPath(mRemotePath);
RemoveShareRemoteOperation operation =
new RemoveShareRemoteOperation((int) share.getRemoteId());
OCFile file = getStorageManager().getFileByEncryptedRemotePath(mRemotePath);
RemoveShareRemoteOperation operation = new RemoveShareRemoteOperation(share.getRemoteId());
result = operation.execute(client);
if (result.isSuccess()) {
Log_OC.d(TAG, "Share id = " + share.getRemoteId() + " deleted");
if (ShareType.PUBLIC_LINK.equals(mShareType)) {
if (ShareType.PUBLIC_LINK.equals(share.getShareType())) {
file.setSharedViaLink(false);
file.setPublicLink("");
} else if (ShareType.USER.equals(mShareType) || ShareType.GROUP.equals(mShareType)
|| ShareType.FEDERATED.equals(mShareType)){
} else if (ShareType.USER.equals(share.getShareType()) || ShareType.GROUP.equals(share.getShareType())
|| ShareType.FEDERATED.equals(share.getShareType())) {
// Check if it is the last share
List <OCShare> sharesWith = getStorageManager().
getSharesWithForAFile(mRemotePath,
getStorageManager().getAccount().name);
List<OCShare> sharesWith = getStorageManager().
getSharesWithForAFile(mRemotePath,
getStorageManager().getAccount().name);
if (sharesWith.size() == SINGLY_SHARED) {
file.setSharedWithSharee(false);
}
@@ -104,15 +95,7 @@ public class UnshareOperation extends SyncOperation {
return result;
}
private boolean existsFile(OwnCloudClient client, String remotePath){
ExistenceCheckRemoteOperation existsOperation =
new ExistenceCheckRemoteOperation(remotePath, mContext, false);
RemoteOperationResult result = existsOperation.execute(client);
return result.isSuccess();
private boolean existsFile(OwnCloudClient client, String remotePath) {
return new ExistenceCheckRemoteOperation(remotePath, false).execute(client).isSuccess();
}
public ShareType getShareType() {
return mShareType;
}
}
@@ -27,7 +27,6 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.resources.files.FileUtils;
import com.owncloud.android.lib.resources.shares.GetShareRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.shares.UpdateShareRemoteOperation;
import com.owncloud.android.operations.common.SyncOperation;
@@ -44,25 +43,22 @@ public class UpdateShareViaLinkOperation extends SyncOperation {
private Boolean publicUploadOnFile;
private Boolean hideFileDownload;
private long expirationDateInMillis;
private long shareId;
/**
* Constructor
*
* @param path Full path of the file/folder being shared. Mandatory argument
* @param path Full path of the file/folder being shared. Mandatory argument
*/
public UpdateShareViaLinkOperation(String path) {
public UpdateShareViaLinkOperation(String path, long shareId) {
this.path = path;
expirationDateInMillis = 0;
this.shareId = shareId;
}
@Override
protected RemoteOperationResult run(OwnCloudClient client) {
OCShare publicShare = getStorageManager().getFirstShareByPathAndType(path, ShareType.PUBLIC_LINK, "");
if (publicShare == null) {
// TODO try to get remote share before failing?
return new RemoteOperationResult(RemoteOperationResult.ResultCode.SHARE_NOT_FOUND);
}
OCShare publicShare = getStorageManager().getShareById(shareId);
UpdateShareRemoteOperation updateOp = new UpdateShareRemoteOperation(publicShare.getRemoteId());
updateOp.setPassword(password);
@@ -233,11 +233,11 @@ public class DocumentsStorageProvider extends DocumentsProvider {
if (result.getCode() == RemoteOperationResult.ResultCode.SYNC_CONFLICT) {
// ISSUE 5: if the user is not running the app (this is a service!),
// this can be very intrusive; a notification should be preferred
Intent i = new Intent(context, ConflictsResolveActivity.class);
i.setFlags(i.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
i.putExtra(ConflictsResolveActivity.EXTRA_FILE, finalFile);
i.putExtra(ConflictsResolveActivity.EXTRA_ACCOUNT, user.toPlatformAccount());
context.startActivity(i);
Intent intent = ConflictsResolveActivity.createIntent(finalFile,
user.toPlatformAccount(),
Intent.FLAG_ACTIVITY_NEW_TASK,
context);
context.startActivity(intent);
} else {
FileStorageUtils.checkIfFileFinishedSaving(finalFile);
if (!result.isSuccess()) {
@@ -747,7 +747,8 @@ public class FileContentProvider extends ContentProvider {
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + TEXT
+ ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED + INTEGER
+ ProviderTableMeta.OCSHARES_NOTE + TEXT
+ ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD + " INTEGER );");
+ ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD + INTEGER
+ ProviderTableMeta.OCSHARES_SHARE_LINK + " TEXT );");
}
private void createCapabilitiesTable(SQLiteDatabase db) {
@@ -2234,6 +2235,24 @@ public class FileContentProvider extends ContentProvider {
if (!upgraded) {
Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
}
if (oldVersion < 58 && newVersion >= 58) {
Log_OC.i(SQL, "Entering in the #58 add public link to share table");
db.beginTransaction();
try {
db.execSQL(ALTER_TABLE + ProviderTableMeta.OCSHARES_TABLE_NAME +
ADD_COLUMN + ProviderTableMeta.OCSHARES_SHARE_LINK + " TEXT ");
upgraded = true;
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
if (!upgraded) {
Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
}
}
}
}
@@ -108,8 +108,6 @@ public class OperationsService extends Service {
public static final String EXTRA_SHARE_NOTE = "SHARE_NOTE";
public static final String EXTRA_IN_BACKGROUND = "IN_BACKGROUND";
public static final String EXTRA_COOKIE = "COOKIE";
public static final String ACTION_CREATE_SHARE_VIA_LINK = "CREATE_SHARE_VIA_LINK";
public static final String ACTION_CREATE_SHARE_WITH_SHAREE = "CREATE_SHARE_WITH_SHAREE";
public static final String ACTION_UNSHARE = "UNSHARE";
@@ -127,9 +125,6 @@ public class OperationsService extends Service {
public static final String ACTION_CHECK_CURRENT_CREDENTIALS = "CHECK_CURRENT_CREDENTIALS";
public static final String ACTION_RESTORE_VERSION = "RESTORE_VERSION";
public static final String ACTION_OPERATION_ADDED = OperationsService.class.getName() + ".OPERATION_ADDED";
public static final String ACTION_OPERATION_FINISHED = OperationsService.class.getName() + ".OPERATION_FINISHED";
private ServiceHandler mOperationsHandler;
private OperationsServiceBinder mOperationsBinder;
@@ -143,12 +138,10 @@ public class OperationsService extends Service {
private static class Target {
public Uri mServerUrl;
public Account mAccount;
public String mCookie;
public Target(Account account, Uri serverUrl, String cookie) {
public Target(Account account, Uri serverUrl) {
mAccount = account;
mServerUrl = serverUrl;
mCookie = cookie;
}
}
@@ -522,12 +515,7 @@ public class OperationsService extends Service {
} else {
Account account = operationIntent.getParcelableExtra(EXTRA_ACCOUNT);
String serverUrl = operationIntent.getStringExtra(EXTRA_SERVER_URL);
String cookie = operationIntent.getStringExtra(EXTRA_COOKIE);
target = new Target(
account,
(serverUrl == null) ? null : Uri.parse(serverUrl),
cookie
);
target = new Target(account, (serverUrl == null) ? null : Uri.parse(serverUrl));
String action = operationIntent.getAction();
String remotePath;
@@ -550,7 +538,8 @@ public class OperationsService extends Service {
shareId = operationIntent.getLongExtra(EXTRA_SHARE_ID, -1);
if (!TextUtils.isEmpty(remotePath)) {
UpdateShareViaLinkOperation updateLinkOperation = new UpdateShareViaLinkOperation(remotePath);
UpdateShareViaLinkOperation updateLinkOperation =
new UpdateShareViaLinkOperation(remotePath, shareId);
password = operationIntent.getStringExtra(EXTRA_SHARE_PASSWORD);
updateLinkOperation.setPassword(password);
@@ -559,7 +548,7 @@ public class OperationsService extends Service {
updateLinkOperation.setExpirationDateInMillis(expirationDate);
boolean hideFileDownload = operationIntent.getBooleanExtra(EXTRA_SHARE_HIDE_FILE_DOWNLOAD,
false);
false);
updateLinkOperation.setHideFileDownload(hideFileDownload);
if (operationIntent.hasExtra(EXTRA_SHARE_PUBLIC_UPLOAD)) {
@@ -605,17 +594,16 @@ public class OperationsService extends Service {
int permissions = operationIntent.getIntExtra(EXTRA_SHARE_PERMISSIONS, -1);
if (!TextUtils.isEmpty(remotePath)) {
operation = new CreateShareWithShareeOperation(remotePath, shareeName, shareType,
permissions);
permissions);
}
break;
case ACTION_UNSHARE:
remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
shareType = (ShareType) operationIntent.getSerializableExtra(EXTRA_SHARE_TYPE);
String shareWith = operationIntent.getStringExtra(EXTRA_SHARE_WITH);
shareId = operationIntent.getLongExtra(EXTRA_SHARE_ID, -1);
if (!TextUtils.isEmpty(remotePath)) {
operation = new UnshareOperation(remotePath, shareType, shareWith, this);
if (shareId > 0) {
operation = new UnshareOperation(remotePath, shareId);
}
break;
@@ -29,6 +29,7 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import com.nextcloud.client.network.ClientFactory;
import com.nextcloud.common.NextcloudClient;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
@@ -51,6 +52,7 @@ import java.util.List;
import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
@@ -231,12 +233,12 @@ public class ActivitiesActivity extends FileActivity implements ActivityListInte
}
@Override
public void showActivities(List<Object> activities, int lastGiven) {
public void showActivities(List<Object> activities, NextcloudClient client, int lastGiven) {
boolean clear = false;
if (this.lastGiven == UNDEFINED) {
clear = true;
}
adapter.setActivityItems(activities, clear);
adapter.setActivityItems(activities, client, clear);
this.lastGiven = lastGiven;
// Hide the recyclerView if list is empty
@@ -18,6 +18,7 @@
*/
package com.owncloud.android.ui.activities;
import com.nextcloud.common.NextcloudClient;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.ui.activity.BaseActivity;
@@ -26,7 +27,7 @@ import java.util.List;
public interface ActivitiesContract {
interface View {
void showActivities(List<Object> activities, int lastGiven);
void showActivities(List<Object> activities, NextcloudClient client, int lastGiven);
void showActivitiesLoadError(String error);
void showActivityDetailUI(OCFile ocFile);
void showActivityDetailUIIsNull();
@@ -19,6 +19,7 @@
package com.owncloud.android.ui.activities;
import com.nextcloud.common.NextcloudClient;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.ui.activities.data.activities.ActivitiesRepository;
import com.owncloud.android.ui.activities.data.files.FilesRepository;
@@ -50,11 +51,11 @@ public class ActivitiesPresenter implements ActivitiesContract.ActionListener {
activitiesView.setProgressIndicatorState(true);
activitiesRepository.getActivities(lastGiven, new ActivitiesRepository.LoadActivitiesCallback() {
@Override
public void onActivitiesLoaded(List<Object> activities, int lastGiven) {
public void onActivitiesLoaded(List<Object> activities, NextcloudClient client, int lastGiven) {
if (!activityStopped) {
activitiesView.setProgressIndicatorState(false);
activitiesView.showActivities(activities, lastGiven);
activitiesView.showActivities(activities, client, lastGiven);
}
}
@@ -18,6 +18,8 @@
*/
package com.owncloud.android.ui.activities.data.activities;
import com.nextcloud.common.NextcloudClient;
import java.util.List;
import androidx.annotation.NonNull;
@@ -27,7 +29,7 @@ import androidx.annotation.NonNull;
*/
public interface ActivitiesRepository {
interface LoadActivitiesCallback {
void onActivitiesLoaded(List<Object> activities, int lastGiven);
void onActivitiesLoaded(List<Object> activities, NextcloudClient client, int lastGiven);
void onActivitiesLoadedError(String error);
}
@@ -18,6 +18,7 @@
*/
package com.owncloud.android.ui.activities.data.activities;
import com.nextcloud.common.NextcloudClient;
import com.owncloud.android.lib.resources.activities.model.Activity;
import java.util.List;
@@ -30,9 +31,10 @@ import java.util.List;
public interface ActivitiesServiceApi {
interface ActivitiesServiceCallback<T> {
void onLoaded(T activities, int lastGiven);
void onLoaded(T activities, NextcloudClient client, int lastGiven);
void onError (String error);
}
void getAllActivities(int lastGiven, ActivitiesServiceApi.ActivitiesServiceCallback<List<Object>> callback);
}
@@ -71,6 +71,7 @@ public class ActivitiesServiceApiImpl implements ActivitiesServiceApi {
private Account account;
private int lastGiven;
private String errorMessage;
private NextcloudClient client;
private GetActivityListTask(Account account,
int lastGiven,
@@ -88,7 +89,7 @@ public class ActivitiesServiceApiImpl implements ActivitiesServiceApi {
OwnCloudAccount ocAccount;
try {
ocAccount = new OwnCloudAccount(account, context);
NextcloudClient client = OwnCloudClientManagerFactory.getDefaultSingleton().
client = OwnCloudClientManagerFactory.getDefaultSingleton().
getNextcloudClientFor(ocAccount, MainApp.getAppContext());
GetActivitiesRemoteOperation getRemoteActivitiesOperation;
@@ -137,7 +138,7 @@ public class ActivitiesServiceApiImpl implements ActivitiesServiceApi {
protected void onPostExecute(Boolean success) {
super.onPostExecute(success);
if (success) {
callback.onLoaded(activities, lastGiven);
callback.onLoaded(activities, client, lastGiven);
} else {
callback.onError(errorMessage);
}
@@ -18,6 +18,8 @@
*/
package com.owncloud.android.ui.activities.data.activities;
import com.nextcloud.common.NextcloudClient;
import java.util.List;
import androidx.annotation.NonNull;
@@ -36,8 +38,8 @@ public class RemoteActivitiesRepository implements ActivitiesRepository {
activitiesServiceApi.getAllActivities(lastGiven,
new ActivitiesServiceApi.ActivitiesServiceCallback<List<Object>>() {
@Override
public void onLoaded(List<Object> activities, int lastGiven) {
callback.onActivitiesLoaded(activities, lastGiven);
public void onLoaded(List<Object> activities, NextcloudClient client, int lastGiven) {
callback.onActivitiesLoaded(activities, client, lastGiven);
}
@Override
@@ -92,8 +92,7 @@ public class CommunityActivity extends FileActivity {
getString(R.string.contributing_link)))));
MaterialButton reportButton = findViewById(R.id.community_testing_report);
reportButton.setBackgroundColor(ThemeUtils.primaryColor(this,true));
reportButton.setTextColor(ThemeUtils.fontColor(this, false));
ThemeUtils.colorPrimaryButton(reportButton, this);
reportButton.setOnClickListener(v -> DisplayUtils.startLinkIntent(this, R.string.report_issue_link));
}
@@ -17,6 +17,8 @@
package com.owncloud.android.ui.activity;
import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
@@ -69,6 +71,17 @@ public class ConflictsResolveActivity extends FileActivity implements OnConflict
private int localBehaviour = FileUploader.LOCAL_BEHAVIOUR_FORGET;
protected OnConflictDecisionMadeListener listener;
public static Intent createIntent(OCFile file, Account account, Integer flag, Context context) {
Intent intent = new Intent(context, ConflictsResolveActivity.class);
if (flag != null) {
intent.setFlags(intent.getFlags() | flag);
}
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, file);
intent.putExtra(ConflictsResolveActivity.EXTRA_ACCOUNT, account);
return intent;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -22,6 +22,7 @@
*/
package com.owncloud.android.ui.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
@@ -33,8 +34,6 @@ import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.ui.fragment.contactsbackup.ContactListFragment;
import com.owncloud.android.ui.fragment.contactsbackup.ContactsBackupFragment;
import org.parceler.Parcels;
import javax.inject.Inject;
import androidx.drawerlayout.widget.DrawerLayout;
@@ -46,12 +45,33 @@ import androidx.fragment.app.FragmentTransaction;
*/
public class ContactsPreferenceActivity extends FileActivity implements FileFragment.ContainerActivity {
public static final String TAG = ContactsPreferenceActivity.class.getSimpleName();
private static final String EXTRA_FILE = "FILE";
private static final String EXTRA_USER = "USER";
/**
* Warning: default for this extra is different between this activity and {@link ContactsBackupFragment}
*/
public static final String EXTRA_SHOW_SIDEBAR = "SHOW_SIDEBAR";
public static final String PREFERENCE_CONTACTS_AUTOMATIC_BACKUP = "PREFERENCE_CONTACTS_AUTOMATIC_BACKUP";
public static final String PREFERENCE_CONTACTS_LAST_BACKUP = "PREFERENCE_CONTACTS_LAST_BACKUP";
public static final String BACKUP_TO_LIST = "BACKUP_TO_LIST";
public static final String EXTRA_SHOW_SIDEBAR = "SHOW_SIDEBAR";
public static void startActivity(Context context) {
Intent intent = new Intent(context, ContactsPreferenceActivity.class);
context.startActivity(intent);
}
public static void startActivityWithContactsFile(Context context, User user, OCFile file) {
Intent intent = new Intent(context, ContactsPreferenceActivity.class);
intent.putExtra(EXTRA_FILE, file);
intent.putExtra(EXTRA_USER, user);
context.startActivity(intent);
}
public static void startActivityWithoutSidebar(Context context) {
Intent intent = new Intent(context, ContactsPreferenceActivity.class);
intent.putExtra(EXTRA_SHOW_SIDEBAR, false);
context.startActivity(intent);
}
@Inject BackgroundJobManager backgroundJobManager;
@@ -86,14 +106,11 @@ public class ContactsPreferenceActivity extends FileActivity implements FileFrag
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
if (intent == null || intent.getParcelableExtra(ContactListFragment.FILE_NAME) == null ||
intent.getParcelableExtra(ContactListFragment.USER) == null) {
ContactsBackupFragment fragment = new ContactsBackupFragment();
Bundle bundle = new Bundle();
bundle.putBoolean(EXTRA_SHOW_SIDEBAR, showSidebar);
fragment.setArguments(bundle);
ContactsBackupFragment fragment = ContactsBackupFragment.create(showSidebar);
transaction.add(R.id.frame_container, fragment);
} else {
OCFile file = Parcels.unwrap(intent.getParcelableExtra(ContactListFragment.FILE_NAME));
User user = Parcels.unwrap(intent.getParcelableExtra(ContactListFragment.USER));
OCFile file = intent.getParcelableExtra(ContactListFragment.FILE_NAME);
User user = intent.getParcelableExtra(ContactListFragment.USER);
ContactListFragment contactListFragment = ContactListFragment.newInstance(file, user);
transaction.add(R.id.frame_container, contactListFragment);
}
@@ -55,7 +55,6 @@ import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.network.ClientFactory;
import com.nextcloud.client.onboarding.FirstRunActivity;
import com.nextcloud.client.preferences.AppPreferences;
import com.nextcloud.client.preferences.DarkMode;
import com.nextcloud.java.util.Optional;
import com.nextcloud.ui.ChooseAccountDialogFragment;
import com.owncloud.android.MainApp;
@@ -103,8 +102,8 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
@@ -251,7 +250,9 @@ public abstract class DrawerActivity extends ToolbarActivity
mDrawerLayout.addDrawerListener(mDrawerToggle);
mDrawerToggle.setDrawerIndicatorEnabled(true);
mDrawerToggle.setDrawerSlideAnimationEnabled(true);
Drawable backArrow = getResources().getDrawable(R.drawable.ic_arrow_back);
Drawable backArrow = ResourcesCompat.getDrawable(getResources(),
R.drawable.ic_arrow_back,
null);
mDrawerToggle.setHomeAsUpIndicator(ThemeUtils.tintDrawable(backArrow, ThemeUtils.appBarPrimaryFontColor(this)));
mDrawerToggle.getDrawerArrowDrawable().setColor(ThemeUtils.appBarPrimaryFontColor(this));
}
@@ -368,7 +369,7 @@ public abstract class DrawerActivity extends ToolbarActivity
startActivity(SyncedFoldersActivity.class);
break;
case R.id.nav_contacts:
startActivity(ContactsPreferenceActivity.class);
ContactsPreferenceActivity.startActivity(this);
break;
case R.id.nav_settings:
startActivity(SettingsActivity.class);
@@ -439,6 +440,7 @@ public abstract class DrawerActivity extends ToolbarActivity
private void startPhotoSearch(MenuItem menuItem) {
SearchEvent searchEvent = new SearchEvent("image/%", SearchRemoteOperation.SearchType.PHOTO_SEARCH);
MainApp.showOnlyFilesOnDevice(false);
Intent intent = new Intent(getApplicationContext(), FileDisplayActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
@@ -701,7 +703,7 @@ public abstract class DrawerActivity extends ToolbarActivity
mCheckedMenuItem = menuItemId;
MenuItem currentItem = mNavigationView.getMenu().findItem(menuItemId);
int drawerColor = getResources().getColor(R.color.drawer_text_color);
int activeColor = ThemeUtils.elementColor(this);
int activeColor = ThemeUtils.primaryColor(null, true, true, this);
currentItem.setChecked(true);
@@ -895,12 +897,6 @@ public abstract class DrawerActivity extends ToolbarActivity
@Override
protected void onResume() {
super.onResume();
if (AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) {
getDelegate().setLocalNightMode(DarkMode.DARK == preferences.getDarkThemeMode() ?
AppCompatDelegate.MODE_NIGHT_YES : AppCompatDelegate.MODE_NIGHT_NO);
getDelegate().applyDayNight();
}
setDrawerMenuItemChecked(mCheckedMenuItem);
}
Loaded 100 of 328 files, more files were not shown because too many files have changed in this diff. Show more