Compare commits

...
Author SHA1 Message Date
Tobias Kaminsky bde010b84b daily dev 20190309 2019-03-09 03:34:19 +01:00
Nextcloud bot 86eeff2843 [tx-robot] updated from transifex 2019-03-09 01:44:42 +00:00
Andy Scherzinger d850108f6c Merge pull request #3716 from nextcloud/ezaquarii/refactor-last-seen-preference
Move last seen version preference to AppPreferences interface
2019-03-08 21:08:34 +01:00
Chris Narkiewicz f5b356cdf6 Move last seen version preference to AppPreferences interface
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-08 16:11:37 +00:00
Andy Scherzinger 62534afba7 Merge pull request #3725 from nextcloud/ssoDialog
make SSO dialog nicer
2019-03-08 13:24:21 +01:00
tobiasKaminsky 9667eb61a2 make SSO dialog nicer
Signed-off-by: tobiasKaminsky <[email protected]>
2019-03-08 11:16:39 +01:00
Tobias Kaminsky 5582a51520 Merge pull request #3719 from nextcloud/ezaquarii/refactor-auto-upload-preferences
Moved auto upload preferences to AppPreferences
2019-03-08 09:16:52 +01:00
Tobias Kaminsky 558fa2273a Merge pull request #3717 from nextcloud/ezaquarii/refactor-lock-timestamp-preference
Move lock timestamp pref to AppPreferences
2019-03-08 09:14:32 +01:00
Tobias Kaminsky 6e9702ab1f daily dev 20190308 2019-03-08 03:34:16 +01:00
Nextcloud bot 4a7071562b [tx-robot] updated from transifex 2019-03-08 01:46:36 +00:00
Chris Narkiewicz 44625a08e4 Move lock timestamp pref to AppPreferences
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-07 19:39:38 +00:00
Chris Narkiewicz 5a8f0f64a0 Moved auto upload preferences to AppPreferences
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-07 18:16:44 +00:00
Andy Scherzinger 63b057d7de Merge pull request #3718 from nextcloud/ezaquarii/refactor-uploader-behavior-preference
Move uploader behavior pref to AppPreferences
2019-03-07 08:48:07 +01:00
Tobias Kaminsky aef131e98c daily dev 20190307 2019-03-07 03:34:10 +01:00
Nextcloud bot 3b403fc094 [tx-robot] updated from transifex 2019-03-07 01:46:42 +00:00
Chris Narkiewicz 78833ef911 Move uploader behavior pref to AppPreferences
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-06 22:45:46 +00:00
Andy Scherzinger 599566363e Merge pull request #3711 from nextcloud/ezaquarii/refactor-upload-preferences
Move upload preferences to AppPreferences interface
2019-03-06 22:15:32 +01:00
Chris Narkiewicz 5dabec67bf Move upload preferences to AppPreferences interface
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-06 16:10:08 +00:00
Nextcloud bot f2f5e64eba [tx-robot] updated from transifex 2019-03-06 12:05:14 +00:00
Andy Scherzinger bd3e065730 Merge pull request #3712 from nextcloud/dependabot/gradle/org.mockito-mockito-core-2.25.0
Bump mockito-core from 2.24.5 to 2.25.0
2019-03-06 08:20:42 +01:00
Tobias Kaminsky 7e1424a88c daily dev 20190306 2019-03-06 03:35:36 +01:00
dependabot[bot] a623fc5094 Bump mockito-core from 2.24.5 to 2.25.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.24.5 to 2.25.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.24.5...v2.25.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-03-06 02:16:27 +00:00
Andy Scherzinger f8bc2a7a31 Merge pull request #3706 from nextcloud/fileDeleteWhileOffline
abort sync if reading remote file fails
2019-03-05 23:07:35 +01:00
Andy Scherzinger 0cdcf970c6 Merge pull request #3699 from nextcloud/ezaquarii/refactor-grid-columns-preference
Move grid columns to AppPreferences interface
2019-03-05 22:36:28 +01:00
Andy Scherzinger 41b365234a improve findbugs score
Signed-off-by: Andy Scherzinger <[email protected]>
2019-03-05 17:04:46 +01:00
Chris Narkiewicz 087ed97e1a Move grid columns to AppPreferences interface
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-05 17:04:41 +01:00
Andy Scherzinger b16d996c87 Merge pull request #3707 from nextcloud/waitForServer
wait for server to get ready
2019-03-05 17:04:04 +01:00
tobiasKaminsky 711508ec29 wait for server to get ready
Signed-off-by: tobiasKaminsky <[email protected]>
2019-03-05 14:55:19 +01:00
Andy Scherzinger 2b169ef74b Merge pull request #3697 from nextcloud/ezaquarii/refactor-show-media-scan-notifications-preference
Move show media scan notifications to AppPreferences interface
2019-03-05 14:16:07 +01:00
tobiasKaminsky 6542334c4e abort sync if reading remote file fails
Signed-off-by: tobiasKaminsky <[email protected]>
2019-03-05 13:48:48 +01:00
Chris Narkiewicz b5f357819f Move show media scan notifications to AppPreferences interface
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-05 13:15:26 +01:00
Andy Scherzinger ce14d3116c Merge pull request #3705 from nextcloud/preferences
change Preferences to SettingsActivity
2019-03-05 12:38:55 +01:00
Tobias Kaminsky f8601fc9db Merge pull request #3704 from nextcloud/verboseError
Integration Tests: Show log in case of error
2019-03-05 12:01:44 +01:00
tobiasKaminsky eb727d4f12 change Preferences to SettingsActivity
Signed-off-by: tobiasKaminsky <[email protected]>
2019-03-05 11:34:50 +01:00
tobiasKaminsky 6ecc023708 show info in case of error
Signed-off-by: tobiasKaminsky <[email protected]>
2019-03-05 11:18:18 +01:00
Andy Scherzinger b784d84121 Merge pull request #3698 from nextcloud/ezaquarii/refactor-show-detailed-timestamp-preference
Move showDetailedTimestampPreference to AppPreferences interface
2019-03-05 10:25:13 +01:00
Chris Narkiewicz 79da94ad62 Move showDetailedTimestampPreference to AppPreferences interface
Signed-off-by: Chris Narkiewicz <[email protected]>
2019-03-05 08:49:05 +00:00
Andy Scherzinger 19761b2474 Merge pull request #3700 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-3.3.2
Bump gradle from 3.3.1 to 3.3.2
2019-03-05 09:07:09 +01:00
Tobias Kaminsky 090cfb5087 Merge pull request #3695 from nextcloud/menuHeader
Improve Navigation Header Layout
2019-03-05 08:48:02 +01:00
Tobias Kaminsky 00c2702e77 daily dev 20190305 2019-03-05 03:33:18 +01:00
dependabot[bot] 9c439e8f87 Bump gradle from 3.3.1 to 3.3.2
Bumps gradle from 3.3.1 to 3.3.2.

Signed-off-by: dependabot[bot] <[email protected]>
2019-03-05 02:15:41 +00:00
nextcloud-android-bot 1f97a53caa Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-03-04 19:47:02 +00:00
Andy Scherzinger c28ee84781 Merge pull request #3668 from ezaquarii/refactor-legacy-instant-upload-prefs-removal
Refactor legacy instant upload prefs removal
2019-03-04 20:42:48 +01:00
Andy Scherzinger 3a1339ece4 Merge pull request #3688 from nextcloud/fixFederatedSharing
Fix federated sharing
2019-03-04 17:09:42 +01:00
Chris Narkiewicz a003c4b953 Refactor legacy instant upload prefs removal
Signed-off-by: Chris Narkiewicz <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
2019-03-04 15:47:21 +00:00
nextcloud-android-bot 9dd7b5fef9 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-03-04 14:17:24 +00:00
Tobias Kaminsky 6681f447db Merge 8c9af3ca91 into ef8789d2a7 2019-03-04 13:26:59 +00:00
tobiasKaminsky 8c9af3ca91 fix federated sharing
Signed-off-by: tobiasKaminsky <[email protected]>
2019-03-04 14:26:44 +01:00
Andy Scherzinger d572179d74 Resolves #3689
Signed-off-by: Andy Scherzinger <[email protected]>
2019-03-04 14:00:47 +01:00
Nextcloud bot ef8789d2a7 [tx-robot] updated from transifex 2019-03-04 01:44:33 +00:00
Nextcloud bot 8f49110b1a [tx-robot] updated from transifex 2019-03-03 01:45:24 +00:00
Nextcloud bot 2340870c30 [tx-robot] updated from transifex 2019-03-02 01:45:24 +00:00
Tobias Kaminsky d8128d82c4 daily dev 20190301 2019-03-01 03:33:17 +01:00
Nextcloud bot 13523a0ed3 [tx-robot] updated from transifex 2019-03-01 01:52:05 +00:00
Andy Scherzinger a2f16a6b94 Merge pull request #3684 from nextcloud/codacy
Improve Codacy score
2019-02-28 15:18:40 +01:00
nextcloud-android-bot a7130d2515 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-28 08:16:56 +00:00
Andy Scherzinger 9a71255e68 Merge 5c56014f89 into bc80cac6b8 2019-02-28 08:03:57 +00:00
Andy Scherzinger 5c56014f89 codacy: Avoid instantiating new objects inside loops
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:23 +01:00
Andy Scherzinger 5676e0435b codacy: No need to call String.valueOf to append to a string.
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:22 +01:00
Andy Scherzinger 233b4a0e63 codacy: Avoid declaring a variable if it is unreferenced before a possible exit point.
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:21 +01:00
Andy Scherzinger 4af1a57723 codacy: Avoid unused private fields
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:21 +01:00
Andy Scherzinger f21f4eff22 codacy: This for loop can be replaced by a foreach loop
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:20 +01:00
Andy Scherzinger 1ea191fc59 codacy: Useless parentheses
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:20 +01:00
Andy Scherzinger f9d9a18b87 codacy: Avoid using redundant field initializer
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:19 +01:00
Andy Scherzinger 07cc2fc7e7 codacy: Avoid using Literals in Conditional Statements
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-28 09:03:12 +01:00
nextcloud-android-bot bc80cac6b8 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-28 07:32:04 +00:00
Tobias Kaminsky c4c6b8d2c6 Merge pull request #3662 from dan0xii/themeing.1
Fine tuned themeing
2019-02-28 08:28:50 +01:00
Nextcloud bot ae71d59b7f [tx-robot] updated from transifex 2019-02-28 01:53:11 +00:00
Tobias Kaminsky 7ae10a4e66 daily dev 20190228 2019-02-28 00:33:59 +01:00
Daniel Bailey a038c2c837 Code clean-up.
* Misc. clean-up.
* API 23 and newer will set the statusbar icons to "dark" if a light
nextcloud server theme is defined via ThemeUtils.lightTheme().

Signed-off-by: Daniel Bailey <[email protected]>
2019-02-27 17:04:34 +00:00
Andy Scherzinger 2e4a43eecd Merge pull request #3682 from nextcloud/deleteFilesAfterTest
Enhance integration tests
2019-02-27 12:57:04 +01:00
Andy Scherzinger 5b0a35204f Merge pull request #3320 from nextcloud/showSharedUser
Show shared user
2019-02-27 11:59:55 +01:00
tobiasKaminsky b584ab79d2 - remove files after test
- use new AndroidJunit4

Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-27 11:43:47 +01:00
tobiasKaminsky bf86cf6a41 Show shared user
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-27 11:10:14 +01:00
Nextcloud bot 5b64410074 [tx-robot] updated from transifex 2019-02-27 01:51:26 +00:00
Tobias Kaminsky ff116e9527 daily dev 20190227 2019-02-27 00:34:45 +01:00
Andy Scherzinger f4dec19e28 Merge pull request #3680 from nextcloud/activityLocale
Enhance activities activity
2019-02-26 22:39:55 +01:00
nextcloud-android-bot 023bd57f8a Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-26 17:58:50 +01:00
tobiasKaminsky 1f9c49bb70 - use localized date pattern
- use translated strings

Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-26 17:58:44 +01:00
Andy Scherzinger 38b0a91a00 Merge pull request #3678 from nextcloud/formatFileContentProvider
reformat so that all indention are correct
2019-02-26 17:05:47 +01:00
Tobias Kaminsky c6de05dcb2 Merge pull request #3675 from nextcloud/dependabot/gradle/com.dicedmelon.gradle-jacoco-android-0.1.4
Bump jacoco-android from 0.1.3 to 0.1.4
2019-02-26 11:58:43 +01:00
Tobias Kaminsky bf6e11f55c Merge pull request #3674 from nextcloud/dependabot/gradle/androidx.annotation-annotation-1.0.2
Bump annotation from 1.0.1 to 1.0.2
2019-02-26 11:58:20 +01:00
tobiasKaminsky f4f53cf254 reformat so that all indention are correct
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-26 11:40:43 +01:00
Tobias Kaminsky aac5514c03 Merge pull request #3653 from nextcloud/storages
Add storage path chooser for local file picker
2019-02-26 07:33:59 +01:00
tobiasKaminsky 6d92a87a50 add break to switch statement
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-26 07:25:22 +01:00
dependabot[bot] 414b31c507 Bump jacoco-android from 0.1.3 to 0.1.4
Bumps jacoco-android from 0.1.3 to 0.1.4.

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-26 02:16:44 +00:00
dependabot[bot] 54bf33423a Bump annotation from 1.0.1 to 1.0.2
Bumps annotation from 1.0.1 to 1.0.2.

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-26 02:16:43 +00:00
Nextcloud bot ffe3ca5a55 [tx-robot] updated from transifex 2019-02-26 01:50:19 +00:00
Tobias Kaminsky 838c266502 daily dev 20190226 2019-02-26 00:33:14 +01:00
tobiasKaminsky 860e8e7ff4 WIP storage picker
improved icons/layout for storage path chooser
use dir name for external sdcard, add only if exists
ignore findbugs regarding hardcoded storage path and use better var names
improve codacy sccore, make interla storage paths a set
setup path chooser in picker action bar when storage location has been chosen
add missing licenses header, set correct year
show local storage path picker dialog if folder to navigate into is not readable
fix crashing app due to open dialog

Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-25 16:38:41 +01:00
Andy Scherzinger 904d89712f implement code review changes
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-25 13:12:33 +01:00
Daniel Bailey 3dea959d5e Attempt to deal with server set themes of either all white or all black.
Signed-off-by: Daniel Bailey <[email protected]>
2019-02-25 12:55:04 +01:00
Daniel Bailey 7df8f8ba45 Fine tuned themeing
The main activity's search view and various edittext views now show the
server set theme colour for highlighted text, highlighted text selector
handles and focus underline.

Signed-off-by: Daniel Bailey <[email protected]>
2019-02-25 12:54:56 +01:00
Andy Scherzinger 3e6d01965b Merge pull request #3663 from nextcloud/useLocalCredentials
Use test credentials from ~/.gradle/gradle.properties
2019-02-25 09:50:04 +01:00
Nextcloud bot c408370deb [tx-robot] updated from transifex 2019-02-25 01:50:42 +00:00
Nextcloud bot 136c7d8aa3 [tx-robot] updated from transifex 2019-02-24 01:54:12 +00:00
Nextcloud bot fff0ca1be1 [tx-robot] updated from transifex 2019-02-23 01:51:11 +00:00
Nextcloud bot d266c209a6 [tx-robot] updated from transifex 2019-02-22 01:51:52 +00:00
Nextcloud bot 246a0bd3b2 [tx-robot] updated from transifex 2019-02-21 01:51:01 +00:00
Tobias Kaminsky bf99c2d929 daily dev 20190221 2019-02-21 00:33:16 +01:00
tobiasKaminsky f2a1608883 use test credentials from ~/.gradle/gradle.properties
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-21 00:15:12 +01:00
Tobias Kaminsky cd0b0fb552 Merge pull request #3608 from nextcloud/actionsInNotifications
Actions in notifications
2019-02-20 14:33:16 +01:00
Nextcloud bot e496f6379b [tx-robot] updated from transifex 2019-02-20 13:15:56 +00:00
Tobias Kaminsky c37a933a19 Merge pull request #3659 from nextcloud/formatString
Codestyle strings
2019-02-20 14:13:11 +01:00
tobiasKaminsky 4474f8a9bf codestyle strings
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-20 14:10:33 +01:00
Tobias Kaminsky 67239482ec Merge pull request #3658 from nextcloud/fix-l10n-file
Fix l10n base file due to checked in source from transifex bot
2019-02-20 14:04:07 +01:00
Morris Jobke 8bb292a3a9 Fix l10n base file due to checked in source from transifex bot
Signed-off-by: Morris Jobke <[email protected]>
2019-02-20 13:41:21 +01:00
tobiasKaminsky 220bcfdb0a - add put for action
- change icons for primary/other actions

Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-20 12:31:33 +01:00
Nextcloud bot d1053ac37f [tx-robot] updated from transifex 2019-02-20 10:36:49 +00:00
Tobias Kaminsky 358f8bc6bc Merge pull request #3656 from nextcloud/removeStableValues
Remove stable values
2019-02-20 10:53:46 +01:00
tobiasKaminsky 005beb1e81 remove stable values
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-20 10:51:56 +01:00
Tobias Kaminsky 74b2287e34 Merge pull request #3655 from nextcloud/revertStrings
Revert strings.xml
2019-02-20 10:37:45 +01:00
tobiasKaminsky 3ba52bec36 revert strings.xml
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-20 10:16:46 +01:00
Nextcloud bot 656653fffa [tx-robot] updated from transifex 2019-02-20 08:31:55 +00:00
Tobias Kaminsky 5561ab8e92 daily dev 20190220 2019-02-20 00:34:10 +01:00
tobiasKaminsky 5f7b25f8a1 extract string
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-19 14:15:34 +01:00
Tobias Kaminsky b8d6cb0657 Merge pull request #3654 from nextcloud/sslMail
skip ssl check on mail
2019-02-19 14:02:47 +01:00
tobiasKaminsky 11007b50ab skip ssl check on mail
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-19 13:53:11 +01:00
Andy Scherzinger 217afa5bb0 Merge pull request #3652 from nextcloud/dependabot/gradle/org.mockito-mockito-core-2.24.5
Bump mockito-core from 2.24.0 to 2.24.5
2019-02-19 11:41:32 +01:00
dependabot[bot] da862a2c59 Bump mockito-core from 2.24.0 to 2.24.5
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.24.0 to 2.24.5.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.24.0...v2.24.5)

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-19 10:04:28 +00:00
Andy Scherzinger e3b1487ce5 Merge pull request #3637 from joelselvaraj/Fix-3111
Fix #3111 - Remove upload success notification
2019-02-19 10:59:58 +01:00
tobiasKaminsky 5afa099d3b suppress findbugs
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-19 10:01:44 +01:00
Nextcloud bot f8561d883f [tx-robot] updated from transifex 2019-02-19 08:36:52 +00:00
tobiasKaminsky b34c0d1c98 change icon for <Android 7
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-19 08:35:46 +01:00
Tobias Kaminsky 0fe1cb0e58 daily dev 20190219 2019-02-19 00:33:10 +01:00
Joel 91e152c7fb Remove upload success notification
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-18 16:29:22 +01:00
tobiasKaminsky ed5d969c6e actions in notifications
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-18 15:18:09 +01:00
Tobias Kaminsky 0d78339bb5 Merge pull request #3643 from nextcloud/firebase-analytics-disable
Disable firebase
2019-02-18 10:28:42 +01:00
Andy Scherzinger 7440ab8d2c Merge pull request #3645 from nextcloud/changelog-3.5
Add 3.5.0 to Changelog
2019-02-18 09:03:06 +01:00
tobiasKaminsky 6be9c49c8b add 3.5.0 to Changelog
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-18 07:48:16 +01:00
Nextcloud bot 91fa1397f5 [tx-robot] updated from transifex 2019-02-18 01:50:35 +00:00
Mario Đanić 8554770ad0 Disable firebase 2019-02-17 13:29:27 +01:00
Nextcloud bot 6a34cf4d2c [tx-robot] updated from transifex 2019-02-17 01:53:00 +00:00
Nextcloud bot cdf6757f11 [tx-robot] updated from transifex 2019-02-16 01:50:16 +00:00
Tobias Kaminsky 1ce6a61e99 daily dev 20190216 2019-02-16 00:33:09 +01:00
Andy Scherzinger 0fce9555fe Merge pull request #3625 from nextcloud/timeoutCool
Show snackbar after 10s when cool is loading to slow
2019-02-15 18:12:42 +01:00
tobiasKaminsky c35b5723c4 set action text to white
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-15 12:06:45 +01:00
Andy Scherzinger f3a5860d59 Merge pull request #3627 from nextcloud/dependabot/gradle/com.jakewharton-butterknife-compiler-10.1.0
Bump butterknife-compiler from 10.0.0 to 10.1.0
2019-02-15 09:33:54 +01:00
Andy Scherzinger 1ecb52bcf2 Merge branch 'master' into dependabot/gradle/com.jakewharton-butterknife-compiler-10.1.0 2019-02-15 09:33:11 +01:00
Andy Scherzinger 005be93ccb Merge pull request #3628 from nextcloud/dependabot/gradle/com.jakewharton-butterknife-10.1.0
Bump butterknife from 10.0.0 to 10.1.0
2019-02-15 09:32:10 +01:00
dependabot[bot] 01d05861d9 Bump butterknife from 10.0.0 to 10.1.0
Bumps [butterknife](https://github.com/JakeWharton/butterknife) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/JakeWharton/butterknife/releases)
- [Changelog](https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JakeWharton/butterknife/compare/10.0.0...10.1.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-15 02:15:32 +00:00
dependabot[bot] 1a4384deba Bump butterknife-compiler from 10.0.0 to 10.1.0
Bumps [butterknife-compiler](https://github.com/JakeWharton/butterknife) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/JakeWharton/butterknife/releases)
- [Changelog](https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JakeWharton/butterknife/compare/10.0.0...10.1.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-15 02:15:23 +00:00
Nextcloud bot a3dc394c79 [tx-robot] updated from transifex 2019-02-15 01:52:06 +00:00
Tobias Kaminsky d00a496be4 daily dev 20190215 2019-02-15 00:33:56 +01:00
tobiasKaminsky f208e3d4e9 show snackbar after 10s when cool is loading to slow
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-14 15:21:00 +01:00
Andy Scherzinger 88abcc07d0 Merge pull request #3606 from nextcloud/deleteNotification
Allow to remove notifications, will also be deleted on server
2019-02-14 11:40:56 +01:00
tobiasKaminsky 5a19c3f321 suppress lint warning for random generator on older android -> no need to have this secure
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-14 08:30:23 +01:00
nextcloud-android-bot 4fb4ff4280 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-14 08:25:57 +01:00
tobiasKaminsky 213f2c597e use SecureRandom instead of Random
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-14 08:25:56 +01:00
tobiasKaminsky 03c33a9207 allow to remove notifications, will also be deleted on server
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-14 08:25:56 +01:00
Tobias Kaminsky 918895a70d Merge pull request #3580 from nextcloud/lombokLib
use lombok in library
2019-02-14 08:25:28 +01:00
tobiasKaminsky 7518450626 revert lib to master
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-14 08:01:09 +01:00
Nextcloud bot a7576c42cf [tx-robot] updated from transifex 2019-02-14 01:50:21 +00:00
Tobias Kaminsky cfddd6b856 daily dev 20190214 2019-02-14 00:34:19 +01:00
Andy Scherzinger 4b4d76eb19 adapt to getter/setter changes due to use of lombok in libary
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-13 15:09:48 +01:00
Andy Scherzinger b4e9ecbf49 use lombok lib branch for testing the lib branch and fixing compile issues due to changed method signatures
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-13 15:09:47 +01:00
Andy Scherzinger 77947fb6bd Merge pull request #3607 from nextcloud/notificationList
Delete notification in notification list
2019-02-13 15:03:25 +01:00
Andy Scherzinger 94f9f65a7d revert back to master lib
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-13 14:36:03 +01:00
Andy Scherzinger 941239c19a work with a single task object
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-13 09:36:20 +01:00
tobiasKaminsky 6ca671ad85 also extract execute action task
ignore compound warning
renamed RemoteOperation

Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-13 09:06:02 +01:00
Tobias Kaminsky 4c6d9738b0 Merge pull request #3571 from nextcloud/linkOnFolder
Overflow menu on sharing of folders
2019-02-13 07:37:59 +01:00
Nextcloud bot 95b788a772 [tx-robot] updated from transifex 2019-02-13 01:51:22 +00:00
Tobias Kaminsky 120d8887d6 daily dev 20190213 2019-02-13 00:34:07 +01:00
Andy Scherzinger db96ceec25 Merge pull request #3574 from nextcloud/serverUnavailable
Server unavailable
2019-02-12 21:23:49 +01:00
Andy Scherzinger 1dcff6b609 Merge branch 'master' into serverUnavailable 2019-02-12 21:11:06 +01:00
Andy Scherzinger a06d9ee94b Merge pull request #3598 from ezaquarii/show-hidden-files-in-footer-files-counter
Count hidden files in footer files counter
2019-02-12 14:15:25 +01:00
Tobias Kaminsky 51bec2f7b9 Merge pull request #3609 from nextcloud/dependabot/gradle/org.projectlombok-lombok-1.18.6
Bump lombok from 1.18.4 to 1.18.6
2019-02-12 08:29:49 +01:00
Tobias Kaminsky 5b558b13fa Merge pull request #3588 from nextcloud/cleanup
Housekeeping: fix findbugs warnings
2019-02-12 08:28:51 +01:00
Chris Narkiewicz 8671252285 Count hidden files in footer files counter
When "show hidden files" option is enabled, count hidden files
in footer counter the same way folders are counted.

fixes #3597

Signed-off-by: Chris Narkiewicz <[email protected]>
2019-02-12 07:12:25 +00:00
tobiasKaminsky 083b19a96e also bump annotationProcessor
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-12 07:40:39 +01:00
dependabot[bot] 485ec04094 Bump lombok from 1.18.4 to 1.18.6
Bumps [lombok](https://github.com/rzwitserloot/lombok) from 1.18.4 to 1.18.6.
- [Release notes](https://github.com/rzwitserloot/lombok/releases)
- [Changelog](https://github.com/rzwitserloot/lombok/blob/master/doc/changelog.markdown)
- [Commits](https://github.com/rzwitserloot/lombok/compare/v1.18.4...v1.18.6)

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-12 02:18:38 +00:00
Nextcloud bot 8f1955b38e [tx-robot] updated from transifex 2019-02-12 01:50:10 +00:00
Tobias Kaminsky dc91c94c07 daily dev 20190212 2019-02-12 00:33:07 +01:00
Andy Scherzinger 55ddb391f0 Merge pull request #3587 from nextcloud/deletedMediaFolders
Show only media folders that exist
2019-02-11 22:44:59 +01:00
Nextcloud bot 24204d50d1 [tx-robot] updated from transifex 2019-02-11 01:51:25 +00:00
Nextcloud bot da1587ae7d [tx-robot] updated from transifex 2019-02-10 01:53:14 +00:00
Nextcloud bot 0f2ffd5a9d [tx-robot] updated from transifex 2019-02-09 01:51:52 +00:00
Tobias Kaminsky e4e1fe76c5 daily dev 20190209 2019-02-09 00:34:48 +01:00
Tobias Kaminsky 4737ee286c Merge pull request #3584 from nextcloud/illegalState
AuthenticatorActivity: show dialog only if not suspended
2019-02-08 17:04:40 +01:00
tobiasKaminsky d396bbf772 dialog committed with allow state loss
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-08 13:16:03 +01:00
Tobias Kaminsky 0b96ae76f4 Merge pull request #3592 from nextcloud/fixGCM
fix crash on evernote
2019-02-08 12:22:33 +01:00
Tobias Kaminsky 8f3d37364f Merge pull request #3591 from nextcloud/fixCodacy
fix some codacy issues
2019-02-08 11:45:36 +01:00
tobiasKaminsky 7c7447d989 fix crash on evernote
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-08 11:20:43 +01:00
tobiasKaminsky 9b8cd0bca4 fix some codacy issues
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-08 09:57:01 +01:00
tobiasKaminsky 44712da72f delete non-existing & disabled synced folders
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-08 09:52:54 +01:00
Andy Scherzinger 869c4a91e7 Merge pull request #3472 from nextcloud/revertExpertMode
Upload list activity: integrated overflow menu
2019-02-08 09:17:49 +01:00
tobiasKaminsky 79caeb24e7 remove m prefix
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-08 08:01:46 +01:00
Nextcloud bot 6624f2fb6e [tx-robot] updated from transifex 2019-02-08 01:52:13 +00:00
Tobias Kaminsky 40bf0911c6 daily dev 20190208 2019-02-08 00:35:05 +01:00
nextcloud-android-bot 4b81e6a1b3 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-07 18:27:18 +00:00
nextcloud-android-bot 3bf5eaf35f Drone: update Lint results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-07 18:26:28 +00:00
Andy Scherzinger 9de8f71fa1 Merge 20790bc22e into cb090dd2f1 2019-02-07 18:23:36 +00:00
Andy Scherzinger 20790bc22e findbug: MS_MUTABLE_COLLECTION_PKGPROTECT: Field is a mutable collection which should be package protected
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 19:23:16 +01:00
Andy Scherzinger eaebc1235e findbugs: MS_PKGPROTECT: Field should be package protected
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 19:21:22 +01:00
Andy Scherzinger 5b6ad9add1 findbug: SUI_CONTAINS_BEFORE_REMOVE: Method checks for an item in a set with contains, before using remove()
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 19:17:19 +01:00
Andy Scherzinger e1feb49fe1 findbugs: SPP_EQUALS_ON_ENUM
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 19:14:53 +01:00
Andy Scherzinger 411bbd02cf improve findbugs scoring
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 18:36:45 +01:00
Andy Scherzinger 2860d4cbed remove unused class
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 18:20:58 +01:00
tobiasKaminsky 750bfbc3c4 show only media folders that exist
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 16:56:52 +01:00
Andy Scherzinger 60fe6fd04a prevent overlapping of elements due to translations
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 15:28:42 +01:00
Andy Scherzinger 6a2193de8d add disctinct actions to the upload list categories + clear menu action via toolbar (for now)
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 15:28:41 +01:00
Andy Scherzinger 8a36f720e5 rename variable after rebase
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-07 15:28:41 +01:00
tobiasKaminsky 1e63423397 fix findbugs
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 15:28:40 +01:00
tobiasKaminsky 7532bced49 swipe to refresh for force re-scan & retry upload
trash bin icon to delete all entries
click on title toggles collapse
used butterknife

Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 15:28:40 +01:00
Andy Scherzinger cb090dd2f1 Merge pull request #3583 from nextcloud/preventNPE
PreviewImageFragment: prevent NPE if activity is null
2019-02-07 14:25:39 +01:00
Andy Scherzinger 43323e1669 Merge pull request #3582 from nextcloud/showITurlOnError
Show IT Url on Error
2019-02-07 08:51:09 +01:00
tobiasKaminsky 50c951cbe7 prevent NPE if activity is null
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 08:25:54 +01:00
tobiasKaminsky be71ee0ea1 add default for switch
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 08:21:43 +01:00
tobiasKaminsky 072480b58d on connection exception use host not available
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 08:19:49 +01:00
tobiasKaminsky 93f52c463d Show failing test url as comment in github
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-07 08:10:56 +01:00
Andy Scherzinger d9e3a83446 Merge pull request #3581 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-3.3.1
Bump gradle from 3.3.0 to 3.3.1
2019-02-07 07:47:31 +01:00
dependabot[bot] 89e92e276c Bump gradle from 3.3.0 to 3.3.1
Bumps gradle from 3.3.0 to 3.3.1.

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-07 02:19:09 +00:00
Nextcloud bot 17cfcefae5 [tx-robot] updated from transifex 2019-02-07 01:54:17 +00:00
Tobias Kaminsky 97ec3464fe daily dev 20190207 2019-02-07 00:34:27 +01:00
Andy Scherzinger 3e79e4f026 Merge pull request #3578 from nextcloud/cleanupActivity
Use getter instead of direct access of Activity
2019-02-06 18:50:35 +01:00
Andy Scherzinger a5af94d986 set lib to master
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-06 17:53:53 +01:00
tobiasKaminsky 2394230a7b use getter instead of direct access of Activity
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-06 17:53:18 +01:00
Andy Scherzinger ac4bcc7a72 Merge pull request #3573 from nextcloud/crashOnLoginURL
Remove exception
2019-02-06 14:19:03 +01:00
tobiasKaminsky f92c6b9170 fix tests
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-06 12:39:11 +01:00
tobiasKaminsky ca362c250d remove exception
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-06 09:50:52 +01:00
Andy Scherzinger 8475a041fb Merge pull request #3572 from nextcloud/smallThumbnails
Local file list: make image/videos properly sized again
2019-02-06 09:47:32 +01:00
Nextcloud bot 26e3c606b5 [tx-robot] updated from transifex 2019-02-06 08:18:27 +00:00
tobiasKaminsky fe794f5a40 make image/videos great again
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-06 09:06:43 +01:00
tobiasKaminsky 2a2380c4dd overflow menu on sharing of folders
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-06 07:55:50 +01:00
Tobias Kaminsky 5584ae8bd7 daily dev 20190206 2019-02-06 00:33:09 +01:00
Andy Scherzinger fbdc024092 Merge pull request #3564 from nextcloud/moveThumbnailCache
Migrate thumbnail cache from external to internal cache location
2019-02-05 17:56:15 +01:00
nextcloud-android-bot d0e9a86ca0 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-05 16:29:20 +00:00
Tobias Kaminsky c5f0174016 Merge a90f71e600 into ee1886cc96 2019-02-05 16:25:49 +00:00
Andy Scherzinger a90f71e600 improve findbugs score bug making literals the left part of string comparisons
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-05 17:25:33 +01:00
tobiasKaminsky 3527b2b7f7 migrate thumbnail cache from external to internal cache location
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-05 16:40:23 +01:00
Andy Scherzinger ee1886cc96 Merge pull request #3568 from nextcloud/exitOnFirstRun
back press on first run activity closes app
2019-02-05 16:35:48 +01:00
tobiasKaminsky b7089df901 back press on first run activity closes app
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-05 16:15:51 +01:00
Andy Scherzinger db8940f6f7 Merge pull request #3570 from nextcloud/shareLinkOnPreview
Copy link action on image/video preview
2019-02-05 16:08:35 +01:00
tobiasKaminsky cc4d340bd5 copy link action on image/video preview
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-05 14:01:46 +01:00
Tobias Kaminsky aae0eac155 Merge pull request #3567 from nextcloud/sortFavorites
sort files after set/unset favorite
2019-02-05 12:48:59 +01:00
tobiasKaminsky c74130b89b sort files after set/unset favorite
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-05 11:46:55 +01:00
Tobias Kaminsky df847a3f38 daily dev 20190205 2019-02-05 00:34:03 +01:00
nextcloud-android-bot 6e91162494 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-02-04 15:55:45 +00:00
Andy Scherzinger 73411d5f09 remove unused classes 2019-02-04 16:52:54 +01:00
Andy Scherzinger 5fb2f37170 rename variable for actual naming pattern
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-04 14:17:45 +01:00
Andy Scherzinger d29e120f31 use lombok for constructors and getter/setter methods
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-04 14:15:15 +01:00
Andy Scherzinger 6188e7e05d remove unused class
Signed-off-by: Andy Scherzinger <[email protected]>
2019-02-04 14:15:14 +01:00
Andy Scherzinger 29478a394b Merge pull request #3558 from nextcloud/dependabot/gradle/org.mockito-mockito-core-2.24.0
Bump mockito-core from 2.23.4 to 2.24.0
2019-02-04 07:01:26 +01:00
dependabot[bot] 79fb99febc Bump mockito-core from 2.23.4 to 2.24.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.23.4 to 2.24.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.23.4...v2.24.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-02-04 02:15:36 +00:00
Tobias Kaminsky 41e20972e2 daily dev 20190202 2019-02-02 00:33:06 +01:00
Tobias Kaminsky 023cd0a549 Merge pull request #3537 from nextcloud/notificationButtonColor
enhance notification buttons
2019-02-01 13:19:01 +01:00
tobiasKaminsky dc41a2f7f0 wip
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-01 10:57:12 +01:00
tobiasKaminsky a127eac5e6 changed grey
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-01 10:32:19 +01:00
Andy Scherzinger 454fb0a547 Merge pull request #3538 from nextcloud/abortSyncIfNoInternet
if no internet connection, abort sync
2019-02-01 10:18:48 +01:00
Andy Scherzinger 492d70345e Merge pull request #3541 from nextcloud/crashOnLocalFolder
Fix crash when selecting local folder
2019-02-01 10:17:25 +01:00
tobiasKaminsky 0a27760872 fix crash when selecting local folder
Signed-off-by: tobiasKaminsky <[email protected]>
2019-02-01 08:39:24 +01:00
Tobias Kaminsky 55ea5b43bf daily dev 20190201 2019-02-01 00:33:08 +01:00
tobiasKaminsky 70c5da0b96 if no internet connection, abort sync
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-31 15:08:34 +01:00
tobiasKaminsky 84392c8b04 increase lint
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-31 14:53:51 +01:00
tobiasKaminsky 6354538bd4 enhance notification buttons
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-31 14:40:48 +01:00
Andy Scherzinger 8966afd43a Merge pull request #3532 from nextcloud/emailIntent
Fix feedback link
2019-01-31 08:37:44 +01:00
tobiasKaminsky 3022591419 fix codacy
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-31 07:39:00 +01:00
Tobias Kaminsky 2393e38542 daily dev 20190131 2019-01-31 00:33:03 +01:00
Andy Scherzinger 53b4df7bf8 Resolves: #3531 changing the email intent
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-30 17:56:08 +01:00
Tobias Kaminsky 839a61e08f Merge pull request #3527 from nextcloud/returnToActivity
Fix no showing activities on resume
2019-01-30 16:15:29 +01:00
Tobias Kaminsky 6149835cbb Merge pull request #3524 from nextcloud/fixNPEonShareError
Share Error: fix npe if data is null
2019-01-30 14:18:33 +01:00
tobiasKaminsky b5ab5402d6 fix no showing activities on resume
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-30 11:57:54 +01:00
Andy Scherzinger 9ea1393008 Merge pull request #3526 from nextcloud/updateContributing
update issue reporting template link
2019-01-30 11:55:18 +01:00
tobiasKaminsky 114bc67dec update issue reporting template link
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-30 11:26:59 +01:00
Andy Scherzinger 64113cf6a1 Merge pull request #3521 from nextcloud/permissionCheckOnDirectUpload
Direct upload fix
2019-01-30 10:56:31 +01:00
Tobias Kaminsky 5ebfa13be5 fix npe if data is null
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-30 10:10:48 +01:00
tobiasKaminsky 5d641b4e32 add permission check for direct upload
use yyyy instead of Y for date building

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-30 09:32:41 +01:00
Nextcloud bot 7af48266bc [tx-robot] updated from transifex 2019-01-30 01:46:41 +00:00
Tobias Kaminsky e851ef5044 daily dev 20190130 2019-01-30 00:33:08 +01:00
Andy Scherzinger 939877252d Merge pull request #3512 from nextcloud/dependabot/gradle/org.jetbrains-annotations-17.0.0
Bump annotations from 16.0.3 to 17.0.0
2019-01-29 23:34:14 +01:00
Andy Scherzinger 1c19cbb392 Merge pull request #3515 from nextcloud/ics
Do not open ics within our app
2019-01-29 23:33:18 +01:00
dependabot[bot] 64a75d821b Bump annotations from 16.0.3 to 17.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 16.0.3 to 17.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Commits](https://github.com/JetBrains/java-annotations/compare/16.0.3...17.0.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-01-29 22:09:18 +00:00
tobiasKaminsky b67c086a71 do not open ics within our app
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-29 22:35:52 +01:00
Andy Scherzinger 6cd4f956f1 Merge pull request #3510 from nextcloud/failOnFindBugs
Fail if findbugs increased
2019-01-29 22:33:06 +01:00
Andy Scherzinger f6d09ff6c7 Merge pull request #3516 from nextcloud/parceler
Use public field for parceler
2019-01-29 22:02:42 +01:00
nextcloud-android-bot ad43cf6e31 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-01-29 17:43:09 +00:00
Tobias Kaminsky d9882c916b Merge bb272a71d0 into 95628f4449 2019-01-29 16:58:42 +00:00
tobiasKaminsky bb272a71d0 somehow findbugs got out of sync
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-29 17:58:29 +01:00
tobiasKaminsky 82ee8b8627 fail if findbugs increased
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-29 17:58:28 +01:00
tobiasKaminsky a285f5d46c use public field for parceler
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-29 17:50:26 +01:00
Andy Scherzinger 95628f4449 Merge pull request #3513 from nextcloud/wrongPush
use correct color of account for push notification
2019-01-29 17:45:17 +01:00
Tobias Kaminsky 8dce69087f Merge pull request #3511 from nextcloud/fixCrashOnUpdateFromVeryOldVersion
fix failing upgrade on very old version
2019-01-29 13:40:25 +01:00
tobiasKaminsky ffb61f3e72 use correct color of account for push notification
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-29 13:35:59 +01:00
Tobias Kaminsky 6f9ac654c5 fix failing upgrade on very old version
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-29 11:24:11 +01:00
Tobias Kaminsky 4b9985303b Merge pull request #3428 from PhieF/Propfind
adding propfind method to sso
2019-01-29 08:08:05 +01:00
Nextcloud bot 32385007b4 [tx-robot] updated from transifex 2019-01-29 01:44:58 +00:00
Tobias Kaminsky 2ddff919e4 daily dev 20190129 2019-01-29 00:33:52 +01:00
Andy Scherzinger 220a869e93 Merge pull request #3504 from nextcloud/DAVx5
Add DAVx5 as new app name for DAVdroid
2019-01-28 18:08:08 +01:00
Phie 2fa0687493 implementing propfind + mkcol methods and adding inputstream to post / put methods
don't crash when httpstream is null

Signed-off-by: Phie <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-28 16:39:07 +01:00
Andy Scherzinger c40d5e5605 Add DAVx5 as new app name for DAVdroid
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-28 16:36:55 +01:00
Tobias Kaminsky ba81710bc3 Merge pull request #3464 from nextcloud/chunkedUpload
Chunked upload
2019-01-28 16:36:22 +01:00
tobiasKaminsky e3b33c31e0 revert library to master
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-28 16:11:04 +01:00
Andy Scherzinger 686fc49db8 Merge pull request #3505 from nextcloud/bumpJuniversalCharDet
bump juniversalchardet
2019-01-28 15:11:18 +01:00
Andy Scherzinger 3c2e49e2c9 Merge pull request #3506 from nextcloud/changelog34x
release notes 3.4.1 and 3.4.2
2019-01-28 14:36:24 +01:00
Andy Scherzinger 810da6abd6 release notes 3.4.1 and 3.4.2
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-28 14:06:33 +01:00
tobiasKaminsky 32e677a151 bump juniversalchardet
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-28 13:56:37 +01:00
tobiasKaminsky 9582b3ea86 create outside of loop
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-28 09:47:11 +01:00
tobiasKaminsky 51d7ea8cd6 re-add account migration, to get userId
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-28 09:31:25 +01:00
tobiasKaminsky 22641967d2 Chunked upload
fix upload test: upload needs userId

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-28 08:44:19 +01:00
Nextcloud bot cea480a772 [tx-robot] updated from transifex 2019-01-28 01:45:40 +00:00
Nextcloud bot ef427144d6 [tx-robot] updated from transifex 2019-01-27 01:48:13 +00:00
Nextcloud bot ec383d2aed [tx-robot] updated from transifex 2019-01-26 01:49:47 +00:00
Tobias Kaminsky 77ecec4531 daily dev 20190126 2019-01-26 00:34:06 +01:00
Andy Scherzinger d00cc5150f Merge pull request #3490 from nextcloud/AlertDialogs
AndroidX for AlertDialogs
2019-01-25 07:05:50 +01:00
Nextcloud bot 5fc395850a [tx-robot] updated from transifex 2019-01-25 01:50:21 +00:00
Andy Scherzinger 8971dc1442 make use of AndroidX implementation due to deprecated standard sdk implementation
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-24 09:43:12 +01:00
Nextcloud bot 38859e5bce [tx-robot] updated from transifex 2019-01-24 01:51:29 +00:00
Nextcloud bot 6311d69c61 [tx-robot] updated from transifex 2019-01-23 01:50:55 +00:00
Tobias Kaminsky 10b4cb8caf daily dev 20190123 2019-01-23 00:34:08 +01:00
Andy Scherzinger 627106c18f Merge pull request #3485 from nextcloud/shareScreen
fix showing spinner when opening keyboard in file detail view
2019-01-22 14:37:48 +01:00
tobiasKaminsky b3bfa8641e - fix showing spinner when opening keyboard in file detail view
- first simple checks in if tests
- prevent NPE

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-22 13:27:50 +01:00
Andy Scherzinger cf6dccc835 Merge pull request #3486 from nextcloud/fixLowercase
Uppercase "disable"
2019-01-22 13:11:01 +01:00
tobiasKaminsky d4e39c036e uppercase disable
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-22 11:47:15 +01:00
Nextcloud bot 11595bc60b [tx-robot] updated from transifex 2019-01-22 01:51:17 +00:00
Tobias Kaminsky 963753afb2 daily dev 20190122 2019-01-22 00:33:17 +01:00
Andy Scherzinger 1aaaac6682 Merge pull request #2577 from nextcloud/sdCardTempFile
Better handling of temp file during upload
2019-01-21 19:57:44 +01:00
nextcloud-android-bot aaaeac533a Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-01-21 18:33:46 +00:00
Tobias Kaminsky 57edd906c1 Merge 9689a19099 into 103bf18a2f 2019-01-21 18:17:54 +00:00
tobiasKaminsky 9689a19099 revert library
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 19:17:36 +01:00
tobiasKaminsky cb7134817e add missing upload error messages
better handle temp file

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 19:17:35 +01:00
tobiasKaminsky 9927a649dc wip
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 19:17:09 +01:00
AndyScherzinger 304d11e590 add import 2019-01-21 19:17:08 +01:00
AndyScherzinger 9f235b36cc remove tray/catch due to changed method signature (after rebase) 2019-01-21 19:17:07 +01:00
tobiasKaminsky c3b65814df - use internal temp directory
- always try to delete temp file

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 19:17:01 +01:00
Andy Scherzinger 103bf18a2f Merge pull request #3383 from nextcloud/qrcode
Add support for QR codes & deep links
2019-01-21 18:00:02 +01:00
nextcloud-android-bot 51bdf578eb Drone: update Lint results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <[email protected]>
2019-01-21 17:27:23 +01:00
tobiasKaminsky a1ba4a1a23 - add vibrate permission
- fix codacy

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 17:27:22 +01:00
Andy Scherzinger 6100cc7c60 improve qr code scan icon
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-21 17:27:21 +01:00
tobiasKaminsky d47c77ca5c Add support for QR codes & deep links
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 17:27:20 +01:00
Andy Scherzinger 24cff7db24 Merge pull request #3480 from nextcloud/checkExternalLink
Check external link only in default switch
2019-01-21 17:19:10 +01:00
tobiasKaminsky 374f36c31a check external link only in default switch
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 16:48:00 +01:00
Andy Scherzinger ab670780b0 Merge pull request #3479 from nextcloud/botSignOff
Bot sign off
2019-01-21 14:05:02 +01:00
Andy Scherzinger da1d1e4b0b Merge pull request #3481 from nextcloud/onlyOneReview
PullApprove: Only one review
2019-01-21 13:58:09 +01:00
tobiasKaminsky 3129c0e68d only one review
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 13:23:58 +01:00
tobiasKaminsky 0a7f5cf063 bots signoff
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 13:04:54 +01:00
Tobias Kaminsky a641d528d2 Merge pull request #3478 from nextcloud/droneImage
new android image for drone
2019-01-21 12:30:33 +01:00
tobiasKaminsky a6c2c20ccf new android image for drone
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-21 11:09:21 +01:00
Tobias Kaminsky 1ee794a5b7 Merge pull request #3467 from nextcloud/cameraDirectUpload
Direct camera upload
2019-01-21 10:46:37 +01:00
Nextcloud bot 216356c14a [tx-robot] updated from transifex 2019-01-21 01:50:03 +00:00
Nextcloud bot ec2c0c910f [tx-robot] updated from transifex 2019-01-20 01:50:44 +00:00
Nextcloud bot fd5b9694cd [tx-robot] updated from transifex 2019-01-19 01:52:08 +00:00
Tobias Kaminsky 35c399618a daily dev 20190119 2019-01-19 00:33:12 +01:00
Andy Scherzinger 440eb53d28 Merge pull request #3453 from nextcloud/DocumentProviderThumbnailsNew
Document provider: show thumbnail, if available, else fetch from server
2019-01-18 13:35:12 +01:00
Andy Scherzinger ef2c14e403 improve findbugs score
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-18 13:21:16 +01:00
tobiasKaminsky 13a29ebc10 show thumbnail, if available, else fetch from server
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 13:04:16 +01:00
Andy Scherzinger 6f485566e3 Merge pull request #3454 from nextcloud/DocumentProviderCopyMoveNew
Document provider: allow copy/move of file/folder
2019-01-18 12:49:18 +01:00
tobiasKaminsky 3bd8286807 codacy
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 11:03:40 +01:00
tobiasKaminsky 159aacdd15 fix codacy
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 11:03:39 +01:00
tobiasKaminsky 3ca95252c4 Document provider: allow copy/move of file/folder
only on >= 5.0

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 11:03:29 +01:00
Andy Scherzinger 2d02b53176 Merge pull request #3471 from nextcloud/permissionOnReceiveFiles
Receive files activity: reflect write status
2019-01-18 10:51:58 +01:00
tobiasKaminsky 08b7031fa0 codacy
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 08:53:57 +01:00
nextcloud-android-bot 7004c02614 Drone: update FindBugs results to reflect reduced error/warning count [skip ci] 2019-01-18 06:35:06 +00:00
Tobias Kaminsky 3d9283872f Merge e610eb133a into 6ff68d52e8 2019-01-18 06:32:11 +00:00
tobiasKaminsky e610eb133a disabling FindBug "ANDROID_EXTERNAL_FILE_ACCESS"
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 07:31:56 +01:00
tobiasKaminsky 940a6b8cb6 minor enhancements
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 07:08:35 +01:00
nextcloud-android-bot 3439981292 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2019-01-18 07:08:35 +01:00
AndyScherzinger 8ae93db343 Direct camera upload
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 07:08:35 +01:00
Andy Scherzinger 6ff68d52e8 Merge pull request #3461 from nextcloud/allowMoveIfWritable
Upload: only allow upload behaviour if writable folders
2019-01-18 07:04:03 +01:00
tobiasKaminsky bc73c6e0ea change wording
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 06:56:50 +01:00
tobiasKaminsky 68e263b16c reflect write status
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-18 06:52:21 +01:00
Nextcloud bot 665284e401 [tx-robot] updated from transifex 2019-01-18 01:54:09 +00:00
Tobias Kaminsky 088f54337a daily dev 20190118 2019-01-18 00:33:54 +01:00
Andy Scherzinger dd9da32bc4 Merge pull request #3466 from nextcloud/failonFindbugs
Fail on findbugs
2019-01-17 09:03:44 +01:00
tobiasKaminsky 9f2e1e477c only allow upload behaviour ond writable folders, so file can be moved/deleted
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-17 08:24:57 +01:00
tobiasKaminsky 3e8836ab1a fail on findbugs
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-17 07:51:14 +01:00
Nextcloud bot de712f8c82 [tx-robot] updated from transifex 2019-01-17 01:51:29 +00:00
Tobias Kaminsky ec99b36141 daily dev 20190117 2019-01-17 00:34:09 +01:00
Andy Scherzinger a1c9af68e8 Merge pull request #3439 from nextcloud/DocumentProviderNewFile
Document provider: new file
2019-01-16 15:40:03 +01:00
tobiasKaminsky d24a79247c create new folder
create file

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-16 15:28:34 +01:00
Andy Scherzinger 51eba2df7a Merge pull request #3436 from nextcloud/DocumentProviderRename
Document provider: allow rename
2019-01-16 15:27:20 +01:00
Andy Scherzinger 5b426a1ef5 Merge pull request #3448 from nextcloud/disableMediaScanNotifications
Adding notification option to not show notifications for new media folders
2019-01-16 15:24:29 +01:00
Andy Scherzinger 5a99013f5e ignore findbugs for notification IDs
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-16 15:14:41 +01:00
tobiasKaminsky 7702386ccc better exception
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-16 15:04:28 +01:00
tobiasKaminsky 16fd088d91 Document provider: allow rename
only on >= 5.0

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-16 15:00:43 +01:00
Andy Scherzinger bbeacbfc57 improve usage of random, ignore findbugs since notification Ids are fine to be predictable
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-16 15:00:10 +01:00
Andy Scherzinger bea1560dd9 Merge pull request #3455 from nextcloud/DocumentProviderRefreshNew
Document provider: refresh
2019-01-16 11:21:52 +01:00
Andy Scherzinger 794705a8a4 codacy: Avoid declaring a variable if it is unreferenced before a possible exit point.
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-16 11:05:10 +01:00
tobiasKaminsky bf76349998 Document provider: refresh on every folder entry
show outdated info / nothing when offline

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-16 11:00:09 +01:00
Nextcloud bot 80fdcf3801 [tx-robot] updated from transifex 2019-01-16 01:52:39 +00:00
Tobias Kaminsky f8d2e8339e daily dev 20190116 2019-01-16 00:36:07 +01:00
Andy Scherzinger 08cf746db7 Merge pull request #3435 from nextcloud/DocumentProviderDeleteFile
Document provider: delete file
2019-01-16 00:17:17 +01:00
tobiasKaminsky b49ba06649 delete file/folder
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-16 00:10:07 +01:00
Andy Scherzinger 8c44b94a27 codacy: use local variable
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-16 00:08:29 +01:00
Andy Scherzinger 95aca3ee9b make constant final
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 23:52:47 +01:00
Andy Scherzinger a97f46b442 hide notification option only during preference screen creation
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 23:52:46 +01:00
Andy Scherzinger e08d39a6a7 organize imports
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 23:52:46 +01:00
Andy Scherzinger 08fc1cbfd2 Resolve #3080 adding notification option to not show notifications for new media folders
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 23:52:45 +01:00
Andy Scherzinger c321009b53 Merge pull request #3457 from nextcloud/fileDetailsNullable
FileDetails: no nullable in butterknife
2019-01-15 23:25:07 +01:00
tobiasKaminsky 19241cfa87 change height to wrap_content
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-15 21:02:43 +01:00
tobiasKaminsky 4061028cad no nullable in butterknife
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-15 17:58:34 +01:00
Andy Scherzinger cbb5f825d8 Merge pull request #3460 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-3.3.0
Bump gradle from 3.2.1 to 3.3.0
2019-01-15 14:58:22 +01:00
Andy Scherzinger 9b22ac7e20 use new gradle task api
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:30 +01:00
nextcloud-android-bot ea87c1899e Drone: update Lint results to reflect reduced error/warning count [skip ci]
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:30 +01:00
tobiasKaminsky cd1ab30bf9 fix contstraint layout
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:30 +01:00
tobiasKaminsky 288ed6585b exclude groovy for jacoco
remove desugaring

Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:30 +01:00
Andy Scherzinger 59bf0c7edd show extended infos on obsolete API usage
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:29 +01:00
Andy Scherzinger 0342faad6f Update to 4.10.1-all
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:29 +01:00
dependabot[bot] ccf3098391 Bump gradle from 3.2.1 to 3.3.0
Bumps gradle from 3.2.1 to 3.3.0.

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 14:13:29 +01:00
Tobias Kaminsky cc7c474016 Merge pull request #3388 from nextcloud/legacyLibHandle
Add legacy lib handle
2019-01-15 11:49:54 +01:00
Tobias Kaminsky 6f3595e780 Merge pull request #3447 from nextcloud/removeExpertMode
Removing expert mode checks
2019-01-15 11:34:17 +01:00
Nextcloud bot 2cf17a6fde [tx-robot] updated from transifex 2019-01-15 01:54:23 +00:00
Tobias Kaminsky 2c41c92353 daily dev 20190115 2019-01-15 00:34:16 +01:00
Andy Scherzinger 1cca8a07a0 Resolves #3398 removing expert mode checks
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-15 00:05:26 +01:00
Andy Scherzinger b4f30ada4a Merge pull request #3433 from nextcloud/DocumentProviderEditFile
Documents Provider: allow editing of files, saves back to server
2019-01-14 17:20:38 +01:00
tobiasKaminsky fc507e0989 allow editing of files, saves back to server
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-14 16:11:02 +01:00
Andy Scherzinger ab9c8bef46 Merge pull request #3434 from nextcloud/DocumentProderNewFolder
Document Provider: new folder
2019-01-14 12:14:50 +01:00
Tobias Kaminsky 1f1ee5b049 Merge pull request #3399 from nextcloud/dateOnLongClick
Detail view: show complete date on click
2019-01-14 11:09:31 +01:00
tobiasKaminsky 2429968cea remove not needed variable
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-14 11:04:03 +01:00
tobiasKaminsky 3d6c57abbe create new folder
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-14 09:38:27 +01:00
Andy Scherzinger e650039af2 Merge pull request #3451 from nextcloud/correctShareErrorSnackbar
Show correct share error message
2019-01-14 09:31:34 +01:00
Tobias Kaminsky c804b5c89e Merge pull request #3432 from nextcloud/DocumentProviderBase
Documents Provider: Base for updated documents provider
2019-01-14 09:24:38 +01:00
tobiasKaminsky 94621b15ab line break
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-14 09:04:23 +01:00
tobiasKaminsky 4fa0ca9ef0 show correct share error message
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-14 08:55:19 +01:00
Tobias Kaminsky b50079d3d7 Merge pull request #3446 from nextcloud/revertFont
Use default/device font
2019-01-14 07:41:07 +01:00
Nextcloud bot df9fdc0406 [tx-robot] updated from transifex 2019-01-14 01:51:45 +00:00
Tobias Kaminsky 70b43a2f24 daily dev 20190113 2019-01-13 00:33:12 +01:00
Andy Scherzinger 4ca0f921a7 Resolves #3389 show complete date on click
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 18:18:34 +01:00
Andy Scherzinger ba24f648a0 Resolves #3348 use default/device font
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 16:26:21 +01:00
Andy Scherzinger a201dae5e2 Merge pull request #3237 from nextcloud/materialDesignRevamp
Material design revamp
2019-01-12 16:17:15 +01:00
Andy Scherzinger 33690c51b9 align login button styles for 1st run and prevent possible NPE
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 16:12:02 +01:00
tobiasKaminsky a05f959f4d make public for butterknife
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-12 15:27:55 +01:00
Andy Scherzinger 24c0092d74 Use primary color for primary buttons instead of accent color
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:54 +01:00
Andy Scherzinger 2b33b43e33 use primary color for system bar too
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:53 +01:00
Andy Scherzinger de583ca3dc fix buttons and their font weight (to be bold)
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:52 +01:00
Andy Scherzinger 9d151e7144 fix codacy (organize imports)
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:51 +01:00
Andy Scherzinger ba378a6049 align text at the top for multi-line text fields
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:50 +01:00
Andy Scherzinger 1fa9f39a0d add OutlinedBox styling for wrapper EditTexts including theming
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:49 +01:00
Andy Scherzinger dab1812c31 add pill-styled buttons and implement theming
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:48 +01:00
Andy Scherzinger a39448ca3b remove button shadow
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:47 +01:00
Andy Scherzinger 1a7652d8b1 round buttons (WiP)
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:47 +01:00
Andy Scherzinger 99e30ad670 introduce new, outlined secondary button styling
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:46 +01:00
Andy Scherzinger 6da1079ce5 WiP
Signed-off-by: Andy Scherzinger <[email protected]>
2019-01-12 15:27:34 +01:00
Andy Scherzinger ad2c41602b Merge pull request #3440 from nextcloud/fixGroupShare
Fix group share not working
2019-01-12 15:15:45 +01:00
Nextcloud bot 5caa4881b0 [tx-robot] updated from transifex 2019-01-12 01:50:17 +00:00
Tobias Kaminsky de99761ffb daily dev 20190112 2019-01-12 00:34:30 +01:00
nextcloud-android-bot b85dc4412c Drone: update Lint results to reflect reduced error/warning count [skip ci] 2019-01-11 15:21:22 +00:00
Tobias Kaminsky 9891e81c9e Merge 5f315ef682 into d185e878ab 2019-01-11 15:17:41 +00:00
tobiasKaminsky 5f315ef682 base for updated documents provider
common place to create client

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-11 16:17:05 +01:00
Andy Scherzinger d185e878ab Merge pull request #3443 from nextcloud/removeClass
remove not needed class
2019-01-11 14:28:36 +01:00
tobiasKaminsky 53538eb44d remove not needed class
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-11 13:15:46 +01:00
tobiasKaminsky 5431eeab6c - fix wrong mapping from room to group
- take type into account when checking if already shared

Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-10 14:25:43 +01:00
Nextcloud bot b425bba679 [tx-robot] updated from transifex 2019-01-10 01:49:55 +00:00
Nextcloud bot ae41f78ed4 [tx-robot] updated from transifex 2019-01-09 01:52:44 +00:00
Tobias Kaminsky b2c7b14eeb daily dev 20190108 2019-01-08 00:33:55 +01:00
Tobias Kaminsky a6328f366c Merge pull request #3424 from nextcloud/dependabot/gradle/com.jakewharton-butterknife-10.0.0
Bump butterknife from 9.0.0-rc2 to 10.0.0
2019-01-07 10:38:15 +01:00
dependabot[bot] 2a988f8b78 Bump butterknife from 9.0.0-rc2 to 10.0.0
Bumps [butterknife](https://github.com/JakeWharton/butterknife) from 9.0.0-rc2 to 10.0.0.
- [Release notes](https://github.com/JakeWharton/butterknife/releases)
- [Changelog](https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JakeWharton/butterknife/compare/9.0.0-rc2...10.0.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-01-07 10:13:46 +01:00
Tobias Kaminsky 568c6efbf3 Merge pull request #3423 from nextcloud/dependabot/gradle/com.jakewharton-butterknife-compiler-10.0.0
Bump butterknife-compiler from 9.0.0-rc2 to 10.0.0
2019-01-07 10:12:24 +01:00
Tobias Kaminsky fb9521fb47 Merge pull request #3406 from nextcloud/dependabot/gradle/com.googlecode.ez-vcard-ez-vcard-0.10.5
Bump ez-vcard from 0.10.4 to 0.10.5
2019-01-07 10:12:08 +01:00
Nextcloud bot d283753081 [tx-robot] updated from transifex 2019-01-06 02:03:19 +00:00
Nextcloud bot 8d121eecbc [tx-robot] updated from transifex 2019-01-05 01:49:28 +00:00
Tobias Kaminsky 7c2fc79824 daily dev 20190105 2019-01-05 00:33:13 +01:00
tobiasKaminsky 7bba2b192a change ignore version on freemarker
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-04 13:26:10 +01:00
dependabot[bot] 1e5c4801b4 Bump ez-vcard from 0.10.4 to 0.10.5
Bumps [ez-vcard](https://github.com/mangstadt/ez-vcard) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/mangstadt/ez-vcard/releases)
- [Commits](https://github.com/mangstadt/ez-vcard/compare/0.10.4...0.10.5)

Signed-off-by: dependabot[bot] <[email protected]>
2019-01-04 12:07:37 +00:00
dependabot[bot] f882c28671 Bump butterknife-compiler from 9.0.0-rc2 to 10.0.0
Bumps [butterknife-compiler](https://github.com/JakeWharton/butterknife) from 9.0.0-rc2 to 10.0.0.
- [Release notes](https://github.com/JakeWharton/butterknife/releases)
- [Changelog](https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JakeWharton/butterknife/compare/9.0.0-rc2...10.0.0)

Signed-off-by: dependabot[bot] <[email protected]>
2019-01-04 11:56:56 +00:00
Tobias Kaminsky 4fac5b07a0 Merge pull request #3420 from nextcloud/newServer
New server image, uses php 7.2
2019-01-04 12:54:32 +01:00
tobiasKaminsky eeddeefc5f reformat
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-04 12:45:20 +01:00
tobiasKaminsky 142990052e new server image, uses php 7.2
Signed-off-by: tobiasKaminsky <[email protected]>
2019-01-04 12:24:20 +01:00
Nextcloud bot bf8a54d0e2 [tx-robot] updated from transifex 2019-01-03 01:48:35 +00:00
Nextcloud bot d7a4f270dc [tx-robot] updated from transifex 2019-01-02 01:48:35 +00:00
Nextcloud bot f1978da46f [tx-robot] updated from transifex 2019-01-01 01:48:28 +00:00
Nextcloud bot 1f5025a6e6 [tx-robot] updated from transifex 2018-12-31 01:50:34 +00:00
Nextcloud bot be80e38e2f [tx-robot] updated from transifex 2018-12-30 01:52:17 +00:00
Nextcloud bot 9a6bee5407 [tx-robot] updated from transifex 2018-12-28 15:55:04 +00:00
Nextcloud bot fb047939ef [tx-robot] updated from transifex 2018-12-27 01:51:07 +00:00
Nextcloud bot 1b359d3998 [tx-robot] updated from transifex 2018-12-26 01:52:47 +00:00
Nextcloud bot 4306850628 [tx-robot] updated from transifex 2018-12-25 01:48:29 +00:00
Nextcloud bot 5759e9b3ba [tx-robot] updated from transifex 2018-12-24 01:57:16 +00:00
Nextcloud bot ce86481516 [tx-robot] updated from transifex 2018-12-23 01:52:53 +00:00
Nextcloud bot acf2a1edfa [tx-robot] updated from transifex 2018-12-22 01:48:38 +00:00
Tobias Kaminsky 7e585c273c daily dev 20181222 2018-12-22 00:33:12 +01:00
Tobias Kaminsky c1a75ffc1d Merge pull request #3391 from nextcloud/checkForTemplates
Add check for template support
2018-12-21 14:15:06 +01:00
tobiasKaminsky d93d5ef151 revert library branch
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-21 13:12:44 +01:00
Nextcloud bot f50453bb27 [tx-robot] updated from transifex 2018-12-21 01:49:16 +00:00
Nextcloud bot 37b8ae825c [tx-robot] updated from transifex 2018-12-20 01:50:24 +00:00
Nextcloud bot a89dcd94d8 [tx-robot] updated from transifex 2018-12-19 01:52:08 +00:00
tobiasKaminsky 4490a02efa add check for template support
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-18 16:24:57 +01:00
tobiasKaminsky 732f65acb2 add legacy lib handle
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-18 11:02:03 +01:00
Andy Scherzinger 315769979b Merge pull request #3386 from nextcloud/dependabot/gradle/androidx.multidex-multidex-2.0.1
Bump multidex from 2.0.0 to 2.0.1
2018-12-18 07:18:09 +01:00
dependabot[bot] ce0d4ba3db Bump multidex from 2.0.0 to 2.0.1
Bumps multidex from 2.0.0 to 2.0.1.

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-18 02:16:42 +00:00
Nextcloud bot abb58599f7 [tx-robot] updated from transifex 2018-12-18 01:50:06 +00:00
Tobias Kaminsky c5378a7d8d daily dev 20181218 2018-12-18 00:33:14 +01:00
Andy Scherzinger 3634c432df Merge pull request #3312 from nextcloud/changelog340
Changelog for 3.4.0
2018-12-17 17:21:18 +01:00
Andy Scherzinger 64afaf2820 3.4.0 final 2018-12-17 15:32:26 +01:00
Nextcloud bot 4176ac2917 [tx-robot] updated from transifex 2018-12-17 01:50:18 +00:00
Nextcloud bot 557f8b53e9 [tx-robot] updated from transifex 2018-12-16 01:50:42 +00:00
Tobias Kaminsky 677133ad4f daily dev 20181216 2018-12-16 00:33:09 +01:00
Andy Scherzinger 7eba750e4a Merge pull request #2886 from nextcloud/syncDownloaded
Sync downloaded
2018-12-15 12:20:00 +01:00
Nextcloud bot 3e3a32e588 [tx-robot] updated from transifex 2018-12-15 01:48:13 +00:00
Tobias Kaminsky c0515a02f6 daily dev 20181215 2018-12-15 00:33:08 +01:00
Andy Scherzinger 59c6169ccc Merge pull request #3372 from nextcloud/350alpha
Bump to next major: 3.5.0
2018-12-14 10:31:25 +01:00
tobiasKaminsky bf134ceece bump to next major
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-14 10:21:04 +01:00
tobiasKaminsky 6cf499828c Sync all downloaded files in background
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-14 09:54:30 +01:00
Tobias Kaminsky 824a91ad5d Merge pull request #3130 from nextcloud/activityPreview
Activity: use image url instead of generating previews by oneself
2018-12-14 09:01:23 +01:00
tobiasKaminsky 52f77239f7 use image url instead of generating previews by oneself
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-14 08:01:19 +01:00
Tobias Kaminsky 803cfadb1f Merge pull request #3368 from nextcloud/fixStreaming
Fix streaming
2018-12-14 07:47:25 +01:00
Tobias Kaminsky 23b91eb2e8 Merge pull request #3365 from nextcloud/trashbinCheckIfActive
Trashbin: do UI changes of async only if activity is still up and running
2018-12-14 07:46:53 +01:00
Nextcloud bot 2ab33bd1f4 [tx-robot] updated from transifex 2018-12-14 01:50:38 +00:00
Tobias Kaminsky 83c5306c9b daily dev 20181214 2018-12-14 00:33:21 +01:00
Andy Scherzinger 6daf772501 Merge pull request #3120 from nextcloud/showComments
Show unread comments count
2018-12-13 23:34:16 +01:00
tobiasKaminsky d45f047a38 fix streaming
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 15:53:35 +01:00
tobiasKaminsky 2e9428ad69 do UI changes of async only if activity is still up and running
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 13:44:11 +01:00
Andy Scherzinger 3079073da6 Merge pull request #3359 from nextcloud/androidJobBackport
Use own fork with backported android 9 fix
2018-12-13 12:41:17 +01:00
Andy Scherzinger 4894157942 Merge pull request #3357 from nextcloud/fixNPEonResume
FileDetailSharingFragment: fix npe on resume
2018-12-13 12:40:50 +01:00
Andy Scherzinger 4d192025aa Merge pull request #3360 from nextcloud/fixNPEonCapability
Capability was read too early
2018-12-13 12:40:13 +01:00
tobiasKaminsky 5838918a0a Capability was read too early
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 11:01:27 +01:00
tobiasKaminsky 075bb74736 use own fork with backported android 9 fix
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 10:22:23 +01:00
tobiasKaminsky a37b34fc78 fix npe on resume
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 09:21:32 +01:00
Andy Scherzinger 2d028495c7 Merge pull request #3350 from nextcloud/batteryOptimizationWarning
Add battery optimization warning
2018-12-13 08:51:26 +01:00
tobiasKaminsky 8c679c20b7 remove unneeded parenthesis
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 08:27:17 +01:00
Tobias Kaminsky 034058ff1e Merge pull request #3356 from nextcloud/lintIgnoreDepUpdates
ignore lint warning for gradle deps as we have dependabot
2018-12-13 08:20:11 +01:00
nextcloud-android-bot 7d02c0b045 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-12-13 07:05:41 +00:00
Tobias Kaminsky 88ce0bd256 Merge c09fd78e90 into 41fbb08395 2018-12-13 07:02:03 +00:00
tobiasKaminsky c09fd78e90 ignore lint warning for gradle deps as we have dependabot
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-13 08:01:02 +01:00
Andy Scherzinger 41fbb08395 Merge pull request #3352 from nextcloud/dependabot/gradle/androidx.test-runner-1.1.1
Bump runner from 1.1.0 to 1.1.1
2018-12-13 07:46:12 +01:00
dependabot[bot] 398503a4b3 Bump runner from 1.1.0 to 1.1.1
Bumps runner from 1.1.0 to 1.1.1.

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-13 06:42:23 +00:00
Tobias Kaminsky ad60cc2415 Merge pull request #3353 from nextcloud/dependabot/gradle/androidx.test.espresso-espresso-core-3.1.1
Bump espresso-core from 3.1.0 to 3.1.1
2018-12-13 07:41:22 +01:00
dependabot[bot] 0a2ed61fa9 Bump espresso-core from 3.1.0 to 3.1.1
Bumps espresso-core from 3.1.0 to 3.1.1.

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-13 07:32:52 +01:00
Tobias Kaminsky 4b7175a89c Merge pull request #3355 from nextcloud/dependabot/gradle/androidx.test.espresso-espresso-contrib-3.1.1
Bump espresso-contrib from 3.1.0 to 3.1.1
2018-12-13 07:31:33 +01:00
Tobias Kaminsky efadfa6759 Merge pull request #3354 from nextcloud/dependabot/gradle/androidx.test-rules-1.1.1
Bump rules from 1.1.0 to 1.1.1
2018-12-13 07:31:11 +01:00
dependabot[bot] 045e3feb81 Bump espresso-contrib from 3.1.0 to 3.1.1
Bumps espresso-contrib from 3.1.0 to 3.1.1.

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-13 02:18:23 +00:00
dependabot[bot] 4e9f48341f Bump rules from 1.1.0 to 1.1.1
Bumps rules from 1.1.0 to 1.1.1.

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-13 02:18:20 +00:00
Nextcloud bot f6b7f5ae80 [tx-robot] updated from transifex 2018-12-13 01:50:25 +00:00
tobiasKaminsky d60465d3b0 remove alpha in list
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-12 16:32:45 +01:00
tobiasKaminsky 63211df14a use two xml for comments, one for list, one for grid
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-12 16:25:27 +01:00
Andy Scherzinger 0eed3b00a9 add stroke 2018-12-12 14:56:57 +01:00
tobiasKaminsky 8f63377171 add svg
use 757575

Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-12 14:30:59 +01:00
tobiasKaminsky 7aa8496c68 fix lint
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-12 13:07:02 +01:00
tobiasKaminsky cb1bff1ce0 add battery optimization warning
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-12 11:50:53 +01:00
Nextcloud bot 396c8c4906 [tx-robot] updated from transifex 2018-12-12 01:56:43 +00:00
Tobias Kaminsky e8264e0231 daily dev 20181212 2018-12-12 00:33:18 +01:00
Andy Scherzinger 5901f97c0d Merge pull request #3346 from nextcloud/matchCompleteBranchName
Match complete branch name
2018-12-11 17:03:46 +01:00
tobiasKaminsky 4d24261e84 match complete branch name
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-11 13:28:07 +01:00
Tobias Kaminsky b6efa6c8b6 Merge pull request #3344 from nextcloud/addLabelsToTemplate
Add labels to template
2018-12-11 11:11:36 +01:00
tobiasKaminsky d0ed64f977 add labels to template
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-11 11:10:36 +01:00
Andy Scherzinger e77216cfbe Merge pull request #3339 from nextcloud/findbugsExlude
ignore warning about reading file
2018-12-11 10:12:08 +01:00
Tobias Kaminsky 653c82351c Merge pull request #3330 from nextcloud/sso-fix-request-header
add request headers if present
2018-12-11 09:51:12 +01:00
Tobias Kaminsky a353e3ca6a Merge pull request #3297 from nextcloud/dependabot/gradle/com.github.chrisbanes-PhotoView-2.3.0
Bump PhotoView from 2.1.4 to 2.3.0
2018-12-11 09:43:58 +01:00
tobiasKaminsky 19e9692541 ignore warning about reading file
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-11 09:38:06 +01:00
tobiasKaminsky 3e0c4e70c5 show comments in grid view, but then no share icon
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-11 09:37:18 +01:00
tobiasKaminsky 9e115d91d0 show comments in grid view, but then no share icon
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-11 09:07:51 +01:00
dependabot[bot] 77da74be3a Bump PhotoView from 2.1.4 to 2.3.0
Bumps [PhotoView](https://github.com/chrisbanes/PhotoView) from 2.1.4 to 2.3.0.
- [Release notes](https://github.com/chrisbanes/PhotoView/releases)
- [Commits](https://github.com/chrisbanes/PhotoView/compare/2.1.4...2.3.0)

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-11 07:43:05 +00:00
tobiasKaminsky cad6cd6a19 show unread comments
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-11 08:09:07 +01:00
Tobias Kaminsky 3c8475c8b0 daily dev 20181211 2018-12-11 00:35:07 +01:00
Andy Scherzinger 594eba571f Merge pull request #3336 from nextcloud/useRestoreFileVersionRemoteOperation
Use RestoreFileVersionRemoteOperation
2018-12-11 00:24:58 +01:00
Andy Scherzinger bf51735633 Merge pull request #3089 from nextcloud/androidX
Switch to AndroidX
2018-12-11 00:19:17 +01:00
tobiasKaminsky 478fccf6a1 disable uiAutomator (for now)
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-10 17:26:53 +01:00
tobiasKaminsky bbd1f96f76 use RestoreFileVersionRemoteOperation
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-10 16:49:45 +01:00
tobiasKaminsky 59cf6b9ba4 switch to AndroidX
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-10 13:11:03 +01:00
Tobias Kaminsky 3e7efd86ff Merge pull request #3324 from nextcloud/moveOperationsToLibrary
Move operations to library
2018-12-10 13:05:06 +01:00
tobiasKaminsky e5597e14c9 import location change in test
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-10 10:22:55 +01:00
Andy Scherzinger e197b31c15 revert lib back to master 2018-12-10 09:48:45 +01:00
Nextcloud bot 9c9079df54 [tx-robot] updated from transifex 2018-12-10 05:22:23 +00:00
Nextcloud bot f605fd597c [tx-robot] updated from transifex 2018-12-09 01:50:57 +00:00
Nextcloud bot bf034d2383 [tx-robot] updated from transifex 2018-12-08 01:48:24 +00:00
Tobias Kaminsky 34c016ff27 daily dev 20181208 2018-12-08 00:34:41 +01:00
Andy Scherzinger f3844cfb73 Merge pull request #3328 from nextcloud/analyticsZero
Analytics: show 0 instead of ""
2018-12-07 14:50:01 +01:00
David Luhmer 135a36a10a add request headers if present 2018-12-07 14:17:36 +01:00
tobiasKaminsky 0f34902fb4 show 0 instead of ""
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-07 14:12:40 +01:00
tobiasKaminsky 43ce903559 move all operation to library
rename library operation to RemoteOperation
some cleanups

Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-07 07:43:12 +01:00
Nextcloud bot 9f9adfe9af [tx-robot] updated from transifex 2018-12-07 01:49:48 +00:00
Tobias Kaminsky 41321b77c5 daily dev 20181207 2018-12-07 00:34:18 +01:00
Andy Scherzinger 62afaefff6 Merge pull request #3322 from nextcloud/unusedRessources
remove unused resources / add to lint ignore
2018-12-06 17:26:36 +01:00
nextcloud-android-bot 0aceb0d001 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-12-06 14:05:47 +00:00
Tobias Kaminsky 30b5f87c1d Merge 84303837a6 into 70c364ebe8 2018-12-06 13:38:19 +00:00
tobiasKaminsky 84303837a6 remove unused resources / add to lint ignore
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-06 14:37:35 +01:00
Andy Scherzinger 70c364ebe8 Merge pull request #3323 from nextcloud/showOldLint
Show old lint warning from stable branch
2018-12-06 14:31:28 +01:00
tobiasKaminsky 9264eb8ecc show old lint warning from stable branch
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-06 11:24:16 +01:00
Andy Scherzinger 0c07ef376b Merge pull request #3321 from nextcloud/strugee-patch-1
Fix typo
2018-12-06 10:32:40 +01:00
AJ Jordan 2285b4208e Fix typo 2018-12-06 02:43:29 -05:00
Nextcloud bot 7be83616a1 [tx-robot] updated from transifex 2018-12-06 01:56:13 +00:00
Tobias Kaminsky 51db0a6f57 daily dev 20181206 2018-12-06 00:33:06 +01:00
Andy Scherzinger 8264ed040d Merge pull request #3319 from nextcloud/lombokForHasPreview
use lombok for has preview
2018-12-05 09:52:12 +01:00
tobiasKaminsky f020e02dfb use lombok for has preview
rename
cleanup
fix warnings

Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-05 09:06:11 +01:00
Tobias Kaminsky b997966e90 Merge pull request #3226 from nextcloud/NPEonTrashbin
UI can already be non-existent
2018-12-05 08:11:56 +01:00
Nextcloud bot c1e014373f [tx-robot] updated from transifex 2018-12-05 01:50:55 +00:00
tobiasKaminsky 8cebbf8146 also check for other UI elements
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-04 11:24:27 +01:00
Nextcloud bot d3d78ab744 [tx-robot] updated from transifex 2018-12-04 01:59:47 +00:00
Tobias Kaminsky 96af008653 daily dev 20181204 2018-12-04 00:33:12 +01:00
Andy Scherzinger 1910e4cfa6 Merge pull request #3313 from nextcloud/firstRun_buttonsBold
First run: make buttons bold
2018-12-03 14:53:08 +01:00
Tobias Kaminsky 3fc27cc927 Merge pull request #3303 from dan0xii/curco
Sets the cursor colour on the passcode screen to grey.
2018-12-03 14:49:47 +01:00
Andy Scherzinger 3fdc757ac1 Merge pull request #3316 from nextcloud/directEditingOnDBupgradeMaster
Add db upgrade step: add direct_editing
2018-12-03 14:05:54 +01:00
tobiasKaminsky b972c46686 add db upgrade step: add direct_editing
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-03 13:45:50 +01:00
tobiasKaminsky 09d1fe7654 make buttons bold
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-03 13:16:43 +01:00
Tobias Kaminsky e1514db205 daily dev 20181203 2018-12-03 13:13:44 +01:00
Tobias Kaminsky 3a2f68523d Merge pull request #3311 from nextcloud/directEditingCollabora
Add direct editing capability
2018-12-03 12:07:29 +01:00
Andy Scherzinger 53cc99b032 changelog for 3.4.0 2018-12-03 11:30:55 +01:00
tobiasKaminsky 6b038492b1 add direct editing capability
Signed-off-by: tobiasKaminsky <[email protected]>
2018-12-03 10:35:38 +01:00
Andy Scherzinger f4f9af41dc Merge pull request #3307 from nextcloud/dependabot/gradle/org.parceler-parceler-api-1.1.12
Bump parceler-api from 1.1.11 to 1.1.12
2018-12-03 06:37:47 +01:00
Andy Scherzinger a7c95b46c5 Merge pull request #3306 from nextcloud/dependabot/gradle/org.parceler-parceler-1.1.12
Bump parceler from 1.1.11 to 1.1.12
2018-12-03 06:37:27 +01:00
dependabot[bot] 2eb476639a Bump parceler-api from 1.1.11 to 1.1.12
Bumps [parceler-api](https://github.com/johncarl81/parceler) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/johncarl81/parceler/releases)
- [Changelog](https://github.com/johncarl81/parceler/blob/master/CHANGELOG.adoc)
- [Commits](https://github.com/johncarl81/parceler/compare/parceler-project-1.1.11...parceler-project-1.1.12)

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-03 02:14:22 +00:00
dependabot[bot] cc5b9a10eb Bump parceler from 1.1.11 to 1.1.12
Bumps [parceler](https://github.com/johncarl81/parceler) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/johncarl81/parceler/releases)
- [Changelog](https://github.com/johncarl81/parceler/blob/master/CHANGELOG.adoc)
- [Commits](https://github.com/johncarl81/parceler/compare/parceler-project-1.1.11...parceler-project-1.1.12)

Signed-off-by: dependabot[bot] <[email protected]>
2018-12-03 02:14:22 +00:00
Nextcloud bot 36df660d29 [tx-robot] updated from transifex 2018-12-03 01:47:34 +00:00
Nextcloud bot 3bbc5adecd [tx-robot] updated from transifex 2018-12-02 01:50:01 +00:00
Daniel Bailey 9bc802dddf Sets the cursor colour on the passcode screen to grey.
Before this change, if the user has a custom colour set on their
nextcloud server, the cursor would be blue regardless of the custom
theme colour.
2018-12-01 12:31:07 +00:00
Nextcloud bot 6e6bbb7d8b [tx-robot] updated from transifex 2018-12-01 01:47:35 +00:00
Nextcloud bot 8650de4d45 [tx-robot] updated from transifex 2018-11-30 01:48:29 +00:00
Andy Scherzinger 49bbf945fe Merge pull request #3299 from nextcloud/stableFrom90
use 90 as first stable
2018-11-29 12:53:05 +01:00
tobiasKaminsky b4fc0388c0 use 90 as first stable
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-29 11:13:04 +01:00
Tobias Kaminsky bd253f1584 Merge pull request #3286 from nextcloud/hideDownloadsAlsoOnFolders
Hide download also on folders
2018-11-29 10:47:24 +01:00
Nextcloud bot 1762ecbd26 [tx-robot] updated from transifex 2018-11-29 01:50:25 +00:00
Andy Scherzinger 6011fc42c5 Merge pull request #3126 from nextcloud/richDocumentsInWebView
Add support for richdocuments
2018-11-28 14:52:31 +01:00
nextcloud-android-bot 76b8681061 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-28 14:37:29 +01:00
tobiasKaminsky 4d485d00e7 use lombok
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-28 14:37:29 +01:00
tobiasKaminsky 3a7ef82632 Add support for richdocuments
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-28 14:37:25 +01:00
Andy Scherzinger 0807696761 Merge pull request #3281 from nextcloud/dotFileSortingTest
Test case for sorting hidden files/folders
2018-11-28 14:20:57 +01:00
Andy Scherzinger be320936d9 Test case for sorting hidden files/folders - see #3280 2018-11-28 09:04:49 +01:00
Nextcloud bot ce5acb05ab [tx-robot] updated from transifex 2018-11-28 01:50:16 +00:00
Nextcloud bot 3c87e5a14f [tx-robot] updated from transifex 2018-11-27 04:12:35 +00:00
Nextcloud bot d5da8965d3 [tx-robot] updated from transifex 2018-11-24 01:45:59 +00:00
tobiasKaminsky b785b0b18d hide download also on folders
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-23 14:49:58 +01:00
Andy Scherzinger 7a0af443b2 Merge pull request #3276 from hlovdal/readme-update
Simplify grep + awk command to just awk in readme file
2018-11-23 13:57:40 +01:00
Andy Scherzinger 90e74a6722 Merge pull request #3279 from nextcloud/dependabot/gradle/org.mockito-mockito-core-2.23.4
Bump mockito-core from 2.23.0 to 2.23.4
2018-11-21 08:36:03 +01:00
Nextcloud bot d177ed6755 [tx-robot] updated from transifex 2018-11-21 01:49:18 +00:00
dependabot[bot] ed103ad530 Bump mockito-core from 2.23.0 to 2.23.4
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.23.0 to 2.23.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.23.0...v2.23.4)

Signed-off-by: dependabot[bot] <[email protected]>
2018-11-21 01:12:25 +00:00
Nextcloud bot fb06caff1c [tx-robot] updated from transifex 2018-11-20 01:50:08 +00:00
Håkon Løvdal e7a5cfd45a readme: simplify grep + awk -> awk 2018-11-20 00:50:48 +01:00
Nextcloud bot b34001d866 [tx-robot] updated from transifex 2018-11-17 02:04:55 +00:00
Nextcloud bot b5827c7ec1 [tx-robot] updated from transifex 2018-11-16 01:49:37 +00:00
Nextcloud bot f4d25af034 [tx-robot] updated from transifex 2018-11-15 01:52:19 +00:00
Nextcloud bot d6fcc4869f [tx-robot] updated from transifex 2018-11-13 01:50:57 +00:00
Andy Scherzinger df5eddcd85 Merge pull request #3260 from nextcloud/moveMinVersion
move MINIMUM_SUPPORTED_SERVER_VERSION to MainApp
2018-11-12 09:57:14 +01:00
Andy Scherzinger 9d0457f16e Merge pull request #3259 from nextcloud/hideDownloadOnlyForNC15
Hide download is only working for >=NC15
2018-11-12 09:54:39 +01:00
tobiasKaminsky 5d40c37121 move MINIMUM_SUPPORTED_SERVER_VERSION to MainApp
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-12 09:41:20 +01:00
tobiasKaminsky c72076ae21 Hide download is only working for >=NC15
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-12 09:24:54 +01:00
Andy Scherzinger 828b0a7d75 Merge pull request #3245 from nextcloud/enhanceFileDetailSharingFragment
FileDetailSharingFragment: extract common used objects as fields
2018-11-12 09:03:44 +01:00
Andy Scherzinger b31d650b28 Merge pull request #3133 from nextcloud/sso-fix-exception
fix exception handling
2018-11-12 08:37:46 +01:00
Nextcloud bot 4ed02c40b7 [tx-robot] updated from transifex 2018-11-12 01:48:27 +00:00
Nextcloud bot 64bfb52541 [tx-robot] updated from transifex 2018-11-11 01:49:36 +00:00
nextcloud-android-bot dbf8f9e68a Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-10 09:42:20 +00:00
Andy Scherzinger 8069f04766 Merge pull request #3252 from nextcloud/removeActionEditText
remove class ActionEditText
2018-11-10 10:36:33 +01:00
Nextcloud bot 23a1f2530e [tx-robot] updated from transifex 2018-11-10 01:47:55 +00:00
Andy Scherzinger 60d13157d5 Merge pull request #3250 from nextcloud/i18n
SyncedFolderAdapter: add locale for number
2018-11-09 20:13:41 +01:00
nextcloud-android-bot 8a19ee7d84 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-09 13:03:26 +00:00
Tobias Kaminsky 730f10e9d7 Merge 9a24eb221d into bc2f52840b 2018-11-09 13:00:57 +00:00
tobiasKaminsky 9a24eb221d split up viewHolder
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-09 13:59:50 +01:00
tobiasKaminsky 3705e5a209 add locale
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-09 13:36:38 +01:00
tobiasKaminsky 40268978e7 code formatting
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-09 13:18:10 +01:00
tobiasKaminsky 959cce44fb code formatting
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-09 13:17:12 +01:00
nextcloud-android-bot 404bbe3f13 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-09 10:33:45 +00:00
Tobias Kaminsky 70978089b6 Merge b35ddef4fb into bc2f52840b 2018-11-09 10:29:11 +00:00
tobiasKaminsky b35ddef4fb remove class
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-09 11:28:34 +01:00
tobiasKaminsky 28112b6444 extract common used objects as fields
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-09 11:20:03 +01:00
Nextcloud bot bc2f52840b [tx-robot] updated from transifex 2018-11-09 01:46:47 +00:00
Nextcloud bot 2e6fb57cef [tx-robot] updated from transifex 2018-11-08 01:46:49 +00:00
Andy Scherzinger c29fddfc7e Merge pull request #3249 from nextcloud/wakelockTimeout
use suggested timeout of 10min
2018-11-07 23:44:34 +01:00
nextcloud-android-bot 9780b3ef08 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-07 22:31:46 +00:00
Tobias Kaminsky b2301cb040 Merge 85170d2389 into 93bc0b4050 2018-11-07 22:29:26 +00:00
tobiasKaminsky 85170d2389 use suggested timeout of 10min
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-07 23:28:06 +01:00
Andy Scherzinger 93bc0b4050 Merge pull request #3243 from nextcloud/hideDownload
Add hide download option to share via link
2018-11-07 22:14:29 +01:00
nextcloud-android-bot 77211f2cf0 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-07 21:01:24 +00:00
Tobias Kaminsky 37d34de34f Merge 350f9e9ef4 into bef25b7bc0 2018-11-07 20:58:14 +00:00
Andy Scherzinger 350f9e9ef4 Revert lib back to master 2018-11-07 21:57:45 +01:00
tobiasKaminsky 8d676ea556 Add hide download option to share via link
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-07 21:57:34 +01:00
Andy Scherzinger bef25b7bc0 Merge pull request #3248 from nextcloud/disableRNGwarning
disable lint warning on not secure RNG on < 4.3
2018-11-07 21:44:13 +01:00
tobiasKaminsky a1167ea3d7 disable lint warning on not secure RNG on < 4.3
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-07 21:33:29 +01:00
Andy Scherzinger 71784259f9 Merge pull request #3247 from nextcloud/removeClass
Remove not needed class
2018-11-07 21:16:02 +01:00
nextcloud-android-bot f6709fcf6d Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-11-07 14:16:17 +00:00
Tobias Kaminsky 0d3211e974 Merge d2e867d61b into 13b76b3fb9 2018-11-07 14:11:31 +00:00
tobiasKaminsky d2e867d61b remove not needed class
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-07 15:09:16 +01:00
Nextcloud bot 13b76b3fb9 [tx-robot] updated from transifex 2018-11-07 01:46:44 +00:00
Tobias Kaminsky 1742509309 daily dev 20181107 2018-11-07 00:33:35 +01:00
David Luhmer 6850d73c40 fix codacy issue 2018-11-06 21:40:53 +01:00
Andy Scherzinger 0b1e102715 Merge pull request #3236 from nextcloud/lombok
Use lombok to generate POJO boilerplate code
2018-11-06 13:06:08 +01:00
Andy Scherzinger e46818f3fa rename boolean variable for nicer getter/setter names 2018-11-06 12:52:46 +01:00
Andy Scherzinger 9c5a390257 Merge pull request #3241 from nextcloud/lombok-2
Further lombok usage
2018-11-06 12:43:17 +01:00
Andy Scherzinger 1f5bae0dbb Resolve #3148 adding lombok to more data classes 2018-11-06 09:25:37 +01:00
Andy Scherzinger 8091470ae3 codacy: remove useless parentheses 2018-11-06 08:35:07 +01:00
Andy Scherzinger 162ccfc15c Resolve #3148 adding lombok to some larger data classes 2018-11-06 08:22:24 +01:00
Andy Scherzinger 0aae8653d8 Resolve #3148 adding lombok support for the app 2018-11-06 08:21:56 +01:00
Nextcloud bot 3dab2b0a4c [tx-robot] updated from transifex 2018-11-06 01:48:28 +00:00
Tobias Kaminsky 52c000a50f daily dev 20181106 2018-11-06 00:32:15 +01:00
Andy Scherzinger 4f1d4f4250 Merge pull request #3216 from nextcloud/hasPreviewProperty
Add has-preview property
2018-11-05 21:53:38 +01:00
Andy Scherzinger 69b86b5e6c fixes after and revert back to master lib 2018-11-05 21:47:42 +01:00
tobiasKaminsky c381bc9da8 add has-preview property
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 21:32:49 +01:00
Andy Scherzinger 8ba7257628 Merge pull request #3225 from nextcloud/notificationOutOfBounds
As async, it can happen that list already changed
2018-11-05 21:20:11 +01:00
Andy Scherzinger 560ae2c311 Merge pull request #3227 from nextcloud/preventNPEonAccount
SyncedFolderActivity: prevent account NPE
2018-11-05 21:16:36 +01:00
Andy Scherzinger c0c1e0085b Merge pull request #3228 from nextcloud/npeOnRetrievingMnemonic
NPE on some devices when showing Mnemonic
2018-11-05 21:15:04 +01:00
Andy Scherzinger c8a87a2e06 Merge pull request #3233 from nextcloud/uploadIT
Upload IT: add non-zero uploads
2018-11-05 20:08:20 +01:00
tobiasKaminsky 49d516969d upload IT: add non-zero uploads
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 16:22:35 +01:00
Andy Scherzinger b32e1705d9 Merge pull request #3230 from nextcloud/addAllLanguageToLint
test add languages to lint
2018-11-05 15:46:50 +01:00
tobiasKaminsky bd58321cfa Replace specific languages with placeholder
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 15:08:18 +01:00
Tobias Kaminsky 7ea630a88e Merge pull request #3231 from nextcloud/anaylsisVariableFx
Analysis: variable was not replaced
2018-11-05 15:05:46 +01:00
tobiasKaminsky e37e11cc3e variable was not replaced
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 12:55:43 +01:00
tobiasKaminsky facf8a2aae correct lower bound
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 12:32:20 +01:00
Andy Scherzinger c5ff313d27 Merge pull request #3229 from nextcloud/changelog332
Changelog for 3.3.2
2018-11-05 12:24:48 +01:00
tobiasKaminsky c9d77884c5 changelog for 3.3.2
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 12:22:02 +01:00
tobiasKaminsky f20f74fec9 NPE on some devices when showing Mnemonic
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 10:24:22 +01:00
tobiasKaminsky e250b61e01 prevent account NPE
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 09:31:26 +01:00
tobiasKaminsky 6210a69297 UI can already be non-existent
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 08:56:42 +01:00
tobiasKaminsky f91a9725d7 As async, it can happen that list already changed
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-05 08:48:51 +01:00
Nextcloud bot 0d5b557bf2 [tx-robot] updated from transifex 2018-11-05 01:48:07 +00:00
Nextcloud bot bcbbdfb9df [tx-robot] updated from transifex 2018-11-04 01:52:58 +00:00
Nextcloud bot dd95a6af0f [tx-robot] updated from transifex 2018-11-03 01:48:03 +00:00
Tobias Kaminsky d74c5da260 daily dev 20181103 2018-11-03 00:33:07 +01:00
Nextcloud bot c4cfd0de25 [tx-robot] updated from transifex 2018-11-02 01:49:56 +00:00
Tobias Kaminsky 0e23d84b72 daily dev 20181102 2018-11-02 00:32:10 +01:00
Andy Scherzinger 7944422a2f Merge pull request #3214 from nextcloud/adjustLint
Lint changes
2018-11-01 23:07:10 +01:00
tobiasKaminsky 8ac77c731e lint changes
Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-01 10:59:08 +01:00
Andy Scherzinger c15bc58a39 Merge pull request #3205 from nextcloud/sortTrash
Add specific sort order for upload/local/trashbin
2018-11-01 09:02:57 +01:00
tobiasKaminsky ab8bcbddc2 add specific sort order for upload/local/trashbin
trashbin: new->old by default

Signed-off-by: tobiasKaminsky <[email protected]>
2018-11-01 08:35:41 +01:00
Tobias Kaminsky df5aa98cd0 daily dev 20181101 2018-11-01 00:32:22 +01:00
Andy Scherzinger 90302c0de0 Merge pull request #3207 from nextcloud/fingerprintBug
Fix fingerprint bug
2018-10-31 20:37:18 +01:00
tobiasKaminsky ad7771d8e4 Fix fingerprint bug: on certain devices no fingerprint, but only pin worked
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-31 15:21:23 +01:00
Andy Scherzinger ce72bef98c Merge pull request #3203 from nextcloud/nunito
Switch font from openSans to Nunito
2018-10-31 14:22:07 +01:00
Andy Scherzinger 59a4e24ade bump lint warnings due to font use 2018-10-31 13:49:07 +01:00
Nextcloud bot 630585b2e4 [tx-robot] updated from transifex 2018-10-31 01:48:12 +00:00
Tobias Kaminsky d375140e4a daily dev 20181031 2018-10-31 00:33:04 +01:00
Andy Scherzinger 91590b2408 Merge pull request #3201 from nextcloud/changelog331new
enhanced changelog for 3.3.1
2018-10-30 16:51:45 +01:00
tobiasKaminsky aa96a1ded7 switch to Nunito
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-30 10:58:50 +01:00
tobiasKaminsky ebce82e1e8 enhanced changelog for 3.3.1
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-30 10:28:52 +01:00
Nextcloud bot 27ea5731bb [tx-robot] updated from transifex 2018-10-30 01:51:00 +00:00
Tobias Kaminsky 5771aa3631 daily dev 20181030 2018-10-30 00:32:20 +01:00
Andy Scherzinger fbb350a64b Merge pull request #3189 from nextcloud/fixTalkIcon
Fix talk icon on first run
2018-10-29 22:42:51 +01:00
tobiasKaminsky 7ad8a1a863 use another svg as source for talk icon. previous got corrupted on 6.0
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-29 22:28:00 +01:00
Andy Scherzinger 831f083153 Merge pull request #3187 from nextcloud/handleNoApps
Wrapper to start urls/intents if no app is available
2018-10-29 22:24:59 +01:00
tobiasKaminsky 4736124a9e wrapper to start urls/intents if no app is available
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-29 22:09:08 +01:00
Andy Scherzinger 3b9e6fa210 Merge pull request #3067 from nextcloud/fixDoubleSorting
LocalFileListAdapter: fix double sorting
2018-10-29 17:55:43 +01:00
tobiasKaminsky 59745fb8ca fix #2714
remove double sorting
remove unneeded ListAdapter

Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-29 14:40:39 +01:00
Andy Scherzinger 52b61670a4 Merge pull request #3199 from nextcloud/changelog331
Changelog for 3.3.1
2018-10-29 12:49:28 +01:00
tobiasKaminsky 01eaebbe98 Changelog for 3.3.1
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-29 12:01:01 +01:00
Nextcloud bot 6d567fb68c [tx-robot] updated from transifex 2018-10-29 01:50:08 +00:00
Nextcloud bot 27855ddb84 [tx-robot] updated from transifex 2018-10-28 00:48:25 +00:00
Tobias Kaminsky a90766c5b9 daily dev 20181028 2018-10-28 00:33:17 +02:00
Nextcloud bot 77a46d0e29 [tx-robot] updated from transifex 2018-10-27 00:49:37 +00:00
Tobias Kaminsky fac6bf5461 daily dev 20181027 2018-10-27 00:32:56 +02:00
Andy Scherzinger 8dff447f68 Merge pull request #3194 from nextcloud/adjustFeatureTemplate
Make headlines a bit bigger
2018-10-26 09:14:04 +02:00
Tobias Kaminsky 8324d47d43 Merge pull request #3082 from nextcloud/sendNote
Allow to set/edit note on shares
2018-10-26 08:42:57 +02:00
tobiasKaminsky fce151948f make headlines a bit bigger
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-26 08:01:28 +02:00
Tobias Kaminsky a22a80374e Merge pull request #3144 from nextcloud/dependabot/gradle/org.codehaus.groovy-groovy-all-2.5.3
Bump groovy-all from 2.4.12 to 2.5.3
2018-10-26 07:38:02 +02:00
Nextcloud bot e705342dc3 [tx-robot] updated from transifex 2018-10-26 00:48:50 +00:00
Tobias Kaminsky a81792e788 daily dev 20181026 2018-10-26 00:33:22 +02:00
tobiasKaminsky e1c27f65b5 use IllegalArgumentException instead of NPE
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-25 10:48:54 +02:00
tobiasKaminsky b963818a98 test to remove groovy-all
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-25 10:19:44 +02:00
Tobias Kaminsky b48fbb2e06 Merge pull request #1708 from apicellaj/action_bar
Prevent action bar title from being overwritten
2018-10-25 10:02:38 +02:00
Nextcloud bot 334ec4824c [tx-robot] updated from transifex 2018-10-25 00:48:16 +00:00
Tobias Kaminsky 401f99762c daily dev 20181025 2018-10-25 00:32:29 +02:00
tobiasKaminsky 44896ba832 minor code enhancements
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 18:53:41 +02:00
tobiasKaminsky cf983d621f suppress lint as it is ok for dialogs to pass null as parent
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 18:53:41 +02:00
tobiasKaminsky e7ae1a5364 prevent autofill
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 18:53:40 +02:00
tobiasKaminsky d0a3302212 allow to set/edit note on shares
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 18:53:37 +02:00
Andy Scherzinger 7e2230970b Merge pull request #3171 from nextcloud/downgradeJUniveralLib
Downgrade juniversalchardet
2018-10-24 15:24:11 +02:00
Andy Scherzinger dac6bac8df bump lint score due to lib downgrade 2018-10-24 15:00:03 +02:00
Tobias Kaminsky 7fc2d9f902 Merge pull request #565 from nextcloud/bugfix-454
Search inside of text files
2018-10-24 14:44:20 +02:00
tobiasKaminsky 5c0e4be5c9 downgrade juniversalchardet
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 14:35:54 +02:00
Andy Scherzinger 87cda5a97f Merge pull request #3182 from nextcloud/searchEventExplicit
Use explicit SearchEvent everywhere
2018-10-24 14:04:45 +02:00
Andy Scherzinger dab0ea373c Merge pull request #3173 from nextcloud/autoUploadNotifcation
Fix AutoUpload notification
2018-10-24 13:23:44 +02:00
Andy Scherzinger 078d19382c Merge pull request #3183 from nextcloud/removeDuplicatedIfBranch
In both if branches was the same
2018-10-24 12:37:28 +02:00
Andy Scherzinger f74570f348 Merge pull request #3097 from nextcloud/fixDavdroidURL
Fix davdroid url: base url was retrieved too early
2018-10-24 11:41:30 +02:00
nextcloud-android-bot ea58ad6340 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-10-24 08:35:18 +00:00
tobiasKaminsky 5e135e6ced in both if branches was the same
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 10:24:49 +02:00
tobiasKaminsky 82e713c167 use explicit SearchEvent everywhere
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 10:21:42 +02:00
Andy Scherzinger c01061b9df Merge pull request #3153 from nextcloud/fixNotificationCrash
Notification: move client creation to thread
2018-10-24 10:12:59 +02:00
Andy Scherzinger 148f9b119b Merge pull request #3176 from nextcloud/fixFavoriteRefreshingBug
Fix refreshing bug on favorite
2018-10-24 10:00:09 +02:00
tobiasKaminsky 46f916b1a2 satisfy codacy
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:42:24 +02:00
Mario Danic b6c528763c Search inside text files
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:42:24 +02:00
tobiasKaminsky bc2179965f - fix not working detection of already defined synced folders
- delete not used (and wrong) function

Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:40:55 +02:00
Tobias Kaminsky 2e2e509835 Merge 30fc18d772 into e39c1658f1 2018-10-24 07:35:22 +00:00
tobiasKaminsky 30fc18d772 satisfy codacy
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:35:16 +02:00
tobiasKaminsky 7876f44e5b base uri was retrieved too early
-code cleanup

Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:35:16 +02:00
tobiasKaminsky 31ea2e7be4 base uri was retrieved too early
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:35:16 +02:00
tobiasKaminsky 08d36d68e3 fix refreshing bug on favorite
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 09:05:00 +02:00
Tobias Kaminsky e39c1658f1 Merge pull request #3180 from nextcloud/changeRepoOrder
Change repositories order
2018-10-24 09:02:38 +02:00
tobiasKaminsky 5d1e3a2213 change repositories order
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-24 08:44:44 +02:00
Nextcloud bot 952fe722f6 [tx-robot] updated from transifex 2018-10-24 00:49:19 +00:00
Tobias Kaminsky c0fa9b9bf6 daily dev 20181024 2018-10-24 00:32:15 +02:00
Tobias Kaminsky 1d1e4f974b Merge pull request #3170 from nextcloud/fixAutoUploadPreferenceHeadlines
max-2-line headlines for auto upload config items
2018-10-23 07:37:51 +02:00
Nextcloud bot 8e835271d5 [tx-robot] updated from transifex 2018-10-23 00:41:26 +00:00
Tobias Kaminsky 6f8e5b53b3 daily dev 20181023 2018-10-23 00:32:12 +02:00
AndyScherzinger a5d6731611 Resolves #3165 - allowing 2-line headlines for auto upload config item's headlines 2018-10-22 19:09:29 +02:00
Andy Scherzinger 0c525db644 Merge pull request #3114 from nextcloud/notificationButtonHandling
Notification button handling
2018-10-22 17:26:32 +02:00
Andy Scherzinger 9bbf69a621 Merge pull request #3162 from nextcloud/handleReshare
Obey "can reshare" property
2018-10-22 13:51:53 +02:00
Andy Scherzinger 33af9119ce Merge pull request #3058 from nextcloud/asyncWithWeakReference
fix "static context is leaked"
2018-10-22 13:49:06 +02:00
nextcloud-android-bot 4eb62c7655 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-10-22 07:18:47 +00:00
Tobias Kaminsky e9758fda6c Merge 7a17e13d55 into febc475634 2018-10-22 07:13:51 +00:00
tobiasKaminsky 7a17e13d55 fix "static context is leaked"
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-22 08:48:58 +02:00
David Luhmer f9bc65b6e1 add exception handling if nextcloud-files app is reinstalled and third party app tries to access using an old token 2018-10-21 12:42:09 +02:00
Nextcloud bot febc475634 [tx-robot] updated from transifex 2018-10-21 00:42:37 +00:00
Nextcloud bot b9b6d9da78 [tx-robot] updated from transifex 2018-10-20 00:41:37 +00:00
Tobias Kaminsky 3f4502e861 daily dev 20181020 2018-10-20 00:33:08 +02:00
Andy Scherzinger 6d8c7af90c Merge pull request #3152 from nextcloud/codacy
Fixing further codacy issues
2018-10-19 07:49:43 +02:00
tobiasKaminsky a4e3347abf obey "can reshare" property
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-18 10:02:50 +02:00
Nextcloud bot a71f449adc [tx-robot] updated from transifex 2018-10-18 00:44:09 +00:00
Tobias Kaminsky 96fe9e094c daily dev 20181018 2018-10-18 00:32:13 +02:00
Andy Scherzinger b105abc56f Merge pull request #3157 from nextcloud/fixPom
Pom: increase httpclient version
2018-10-18 00:00:38 +02:00
Andy Scherzinger bb5790cd1a Merge pull request #3143 from slohse/sorting-general-contract-violation-files-with-dots
Fix IllegalArgumentException on files with dots in name, add test case
2018-10-17 23:58:48 +02:00
tobiasKaminsky 506dee2337 sort & compare for two tests
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-17 15:52:38 +02:00
tobiasKaminsky 1cf1b0f1da increase httpclient version
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-17 14:50:46 +02:00
tobiasKaminsky 15bc754ea7 move client to thread
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-17 10:20:42 +02:00
Nextcloud bot 01641a05f4 [tx-robot] updated from transifex 2018-10-17 00:40:59 +00:00
AndyScherzinger 84a1cc37a5 codacy: Avoid using redundant field initializer for 'onlyOnDevice' 2018-10-16 08:37:42 +02:00
AndyScherzinger a4088eb173 codacy: This for loop can be replaced by a foreach loop 2018-10-16 08:35:17 +02:00
AndyScherzinger 70f0d9c61b extract size to variable 2018-10-16 08:34:54 +02:00
AndyScherzinger 0c6b7fc4a1 codacy: Avoid unused private fields such as 'account'. 2018-10-16 08:29:23 +02:00
Nextcloud bot bf9df6e0b2 [tx-robot] updated from transifex 2018-10-16 00:41:24 +00:00
Tobias Kaminsky f3fff52304 daily dev 20181016 2018-10-16 00:32:56 +02:00
Andy Scherzinger 3cde7fc4ee Merge pull request #3129 from nextcloud/autofill
Add autofill hints
2018-10-15 15:30:15 +02:00
Stephan Lohse 9b19f3940b Fix IllegalArgumentException on files with dots in name, add test case 2018-10-14 22:54:21 +02:00
Nextcloud bot e5e776c288 [tx-robot] updated from transifex 2018-10-14 00:41:35 +00:00
Nextcloud bot f648fdc31c [tx-robot] updated from transifex 2018-10-13 00:40:59 +00:00
Tobias Kaminsky 5ea50b1030 daily dev 20181013 2018-10-13 00:33:58 +02:00
Andy Scherzinger c3269e6639 Merge pull request #3132 from Blackhat96/master
App crashes when uploading files to Nextcloud
2018-10-12 22:43:03 +02:00
tobiasKaminsky bba96eef89 line wrap
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-12 14:03:41 +02:00
David Luhmer d9080650ac add response-body (if available) to exception if request failed (ref https://github.com/nextcloud/Android-SingleSignOn/issues/35) 2018-10-12 10:36:38 +02:00
David Luhmer 704a41b281 improve error handling as suggested by @AndyScherzinger 2018-10-12 10:35:25 +02:00
Andy Scherzinger 585f734e32 Merge pull request #3135 from nextcloud/update-issue-templates
Update issue templates: choose between bug and feature request
2018-10-12 09:12:06 +02:00
tobiasKaminsky 412d32e58d delete template on old position
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-12 09:03:14 +02:00
Tobias Kaminsky 73ecd3505e Update issue templates: choose between bug and feature request 2018-10-12 09:01:33 +02:00
Andy Scherzinger f2759fc5dd Merge pull request #3134 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-3.2.1
Bump gradle from 3.2.0 to 3.2.1
2018-10-12 08:26:59 +02:00
dependabot[bot] 5b07b66492 Bump gradle from 3.2.0 to 3.2.1
Bumps gradle from 3.2.0 to 3.2.1.

Signed-off-by: dependabot[bot] <[email protected]>
2018-10-12 01:13:01 +00:00
Nextcloud bot 2b91e651d4 [tx-robot] updated from transifex 2018-10-12 00:40:54 +00:00
David Luhmer 80582657f0 fix exception handling (networkonmainthread failed before) 2018-10-11 21:24:21 +02:00
Abhishek U Bhat 82de7f631a Rquesting FOREGROUND_SERVICE permission for Android 9(API level 28) or
higher
2018-10-11 22:59:59 +05:30
Joe Apicella 333b544001 modify default display name for root folder 2018-10-11 14:27:18 +02:00
Joe Apicella 6e98e25184 set action bar title to show "On device" 2018-10-11 14:27:18 +02:00
Joe Apicella 36bed52eae prevent action bar title from being overwritten 2018-10-11 14:27:08 +02:00
nextcloud-android-bot 976abb854b Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-10-10 13:32:34 +00:00
Tobias Kaminsky d667354e09 Merge 6b468d5751 into 86e564bb91 2018-10-10 13:30:44 +00:00
tobiasKaminsky 6b468d5751 hide unusedAttribute lint warning on autofill
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-10 15:30:30 +02:00
tobiasKaminsky a61f6e8f93 add autofill hints
Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-10 15:18:12 +02:00
Nextcloud bot 86e564bb91 [tx-robot] updated from transifex 2018-10-10 00:49:23 +00:00
Tobias Kaminsky f5b9f28cc0 daily dev 20181009 2018-10-09 00:33:14 +02:00
Andy Scherzinger 7dad67ad35 Merge pull request #3117 from nextcloud/dependabot/gradle/org.mockito-mockito-core-2.23.0
Bump mockito-core from 2.22.0 to 2.23.0
2018-10-08 09:16:51 +02:00
dependabot[bot] 0eb93b4e8b Bump mockito-core from 2.22.0 to 2.23.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.22.0...v2.23.0)

Signed-off-by: dependabot[bot] <[email protected]>
2018-10-08 01:12:28 +00:00
Nextcloud bot f5ad4c9117 [tx-robot] updated from transifex 2018-10-07 00:48:53 +00:00
Nextcloud bot 14e7cfcbef [tx-robot] updated from transifex 2018-10-06 00:47:08 +00:00
Tobias Kaminsky 89e4cc7be0 daily dev 20181006 2018-10-06 00:32:12 +02:00
Tobias Kaminsky 00b2cfb785 Merge pull request #3113 from Tijs-B/master
Changed "Copied to clipboard" text to "Link copied"
2018-10-05 09:36:24 +02:00
tobiasKaminsky 8b8820ef91 create a task for each button
disable buttons until request is complete: error -> re-enable / success: delete notification
success check: added 202 (accepted)

Signed-off-by: tobiasKaminsky <[email protected]>
2018-10-05 09:06:13 +02:00
Nextcloud bot d3ffbb6bd0 [tx-robot] updated from transifex 2018-10-05 00:49:57 +00:00
Tijs-B 725ecb192c Changed "Copied to clipboard" text to "Link copied 2018-10-04 14:16:24 +02:00
Tijs-B 15fa3804af Changed "Copied to clipboard" text to "Link copied" 2018-10-04 14:14:42 +02:00
Nextcloud bot 5d359ba7a0 [tx-robot] updated from transifex 2018-10-04 00:52:19 +00:00
Nextcloud bot df779d9f2a [tx-robot] updated from transifex 2018-10-03 00:40:26 +00:00
Nextcloud bot b9633f1c22 [tx-robot] updated from transifex 2018-10-02 00:47:56 +00:00
Nextcloud bot a6ec9e3049 [tx-robot] updated from transifex 2018-10-01 00:47:34 +00:00
Nextcloud bot bec84e799e [tx-robot] updated from transifex 2018-09-30 00:48:31 +00:00
Nextcloud bot 4eb45af6d0 [tx-robot] updated from transifex 2018-09-29 00:45:52 +00:00
Nextcloud bot 61579b1166 [tx-robot] updated from transifex 2018-09-28 00:41:57 +00:00
Nextcloud bot 41aae0b753 [tx-robot] updated from transifex 2018-09-27 00:50:31 +00:00
Tobias Kaminsky 23ff844e70 daily dev 20180927 2018-09-27 00:32:10 +02:00
Andy Scherzinger a3730c7c82 Merge pull request #3094 from nextcloud/editorconfig
Add editor config to configure Android Studio
2018-09-26 13:22:34 +02:00
AndyScherzinger a587defb76 add editor config to configure Android Studio according to the project guidelines automatically 2018-09-26 11:31:06 +02:00
Andy Scherzinger 38407d55a9 Merge pull request #3065 from nextcloud/fixNavigation
Fix broken navigation
2018-09-26 08:29:25 +02:00
tobiasKaminsky 63435257f0 fix #2857
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-26 08:05:05 +02:00
Tobias Kaminsky 17065f9193 Merge pull request #3090 from nextcloud/fixOutOfBoundsOnCharAt
charAt is throwing out of bounds, if empty string
2018-09-26 07:56:26 +02:00
Nextcloud bot 6caecfce72 [tx-robot] updated from transifex 2018-09-26 00:50:34 +00:00
Tobias Kaminsky 1dabdb5315 daily dev 20180926 2018-09-26 00:33:06 +02:00
AndyScherzinger 131a8fafcd charAt is throwing out of bounds, if empty string 2018-09-25 18:50:39 +02:00
tobiasKaminsky b5f742f3ba charAt is throwing out of bounds, if empty string
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-25 18:50:36 +02:00
Andy Scherzinger 726cb1a3eb Merge pull request #3086 from nextcloud/rememberLocalUploadPath
Remember last path which was used on local file selection
2018-09-25 18:49:46 +02:00
tobiasKaminsky 59d0b99121 remember last path which was used on local file selection
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-25 18:17:13 +02:00
Andy Scherzinger b061b1a557 Merge pull request #3085 from nextcloud/wakeLockTag
Wakelock tag pattern follows PowerManager doc
2018-09-25 15:52:24 +02:00
nextcloud-android-bot 3b1c6ae68f Drone: update Lint results to reflect reduced error/warning count [skip ci] 2018-09-25 14:12:29 +02:00
tobiasKaminsky d5ed79ab66 tag pattern follows PowerManager doc
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-25 14:12:29 +02:00
Andy Scherzinger df3bb79365 Merge pull request #3070 from nextcloud/codacy
Codacy fixes
2018-09-25 13:51:35 +02:00
AndyScherzinger 7308f3464b codacy: This for loop can be replaced by a foreach loop 2018-09-25 13:26:17 +02:00
AndyScherzinger 8a53f5ff56 codacy: Avoid using redundant field initializer 2018-09-25 13:26:16 +02:00
AndyScherzinger 3e5de81414 codacy: No need to call String.valueOf to append to a string. 2018-09-25 13:26:16 +02:00
AndyScherzinger 6b59ade7bd codacy: A getX() method which returns a boolean should be named isX() 2018-09-25 13:26:15 +02:00
AndyScherzinger ebed24ab5d codacy: String.startsWith can be rewritten using String.charAt(0) 2018-09-25 13:26:15 +02:00
AndyScherzinger 64c227afc9 codacy: No need to check for null before an instanceof 2018-09-25 13:26:14 +02:00
AndyScherzinger bb6947d9d9 codacy: Avoid unnecessary constructors - the compiler will generate these for you 2018-09-25 13:26:14 +02:00
AndyScherzinger f35db9a594 codacy: Avoid the use of value in annotations when its the only element 2018-09-25 13:26:13 +02:00
AndyScherzinger fb446d433a codacy: Do not add empty strings 2018-09-25 13:26:13 +02:00
AndyScherzinger 1e443545c9 codacy: String.indexOf(char) is faster than String.indexOf(String). 2018-09-25 13:26:12 +02:00
Andy Scherzinger 0ee0c655cf Merge pull request #3087 from nextcloud/useAssembleOnFindbugs
Fix findbugs
2018-09-25 13:25:33 +02:00
Andy Scherzinger 183f8f5398 Merge pull request #3088 from nextcloud/android-42
use android-42 docker-ci
2018-09-25 13:20:35 +02:00
Andy Scherzinger 91e300cb68 use android-42 2018-09-25 13:12:00 +02:00
Andy Scherzinger 641895c0d5 Merge pull request #3051 from nextcloud/addRoomShareType
Add room share type
2018-09-25 12:48:11 +02:00
tobiasKaminsky e84522c2fa Use new findbug location
error out if findbugs / lint report is missing

Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-25 12:31:09 +02:00
tobiasKaminsky dc4077325b use list instead of checking each individually
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-25 10:52:39 +02:00
Nextcloud bot 44c42e1c01 [tx-robot] updated from transifex 2018-09-25 00:50:23 +00:00
Tobias Kaminsky f2f86932f4 daily dev 20180925 2018-09-25 00:36:02 +02:00
Andy Scherzinger 943d197253 Merge pull request #3084 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-3.2.0
Bump gradle from 3.1.4 to 3.2.0
2018-09-24 20:36:13 +02:00
Andy Scherzinger 3a015657cb bump lint result due to new version 2018-09-24 19:38:02 +02:00
Andy Scherzinger 974520a733 update to gradle-4.6-all 2018-09-24 19:26:13 +02:00
dependabot[bot] b1dedf3435 Bump gradle from 3.1.4 to 3.2.0
Bumps gradle from 3.1.4 to 3.2.0.

Signed-off-by: dependabot[bot] <[email protected]>
2018-09-24 17:20:58 +00:00
Andy Scherzinger 29347af729 Merge pull request #3081 from nextcloud/test28
Bump supportLibraryVersion from 27.1.1 to 28.0.0
2018-09-24 18:33:18 +02:00
AndyScherzinger 9efd3ec7ad use InstrumentationRegistry.getTargetContext() for tests 2018-09-24 09:21:04 +02:00
AndyScherzinger 169b0e560b lint: remove deprecated/removed ApplicationTestCase reference 2018-09-24 09:19:31 +02:00
AndyScherzinger 9c560eae63 lint: use new v28 app-compat API 2018-09-24 09:18:56 +02:00
Andy Scherzinger 3e2c4b1db0 bump target to v28 2018-09-24 08:42:19 +02:00
dependabot[bot] cb47072fa7 Bump supportLibraryVersion from 27.1.1 to 28.0.0
Bumps `supportLibraryVersion` from 27.1.1 to 28.0.0.

Updates `support-v4` from 27.1.1 to 28.0.0

Updates `design` from 27.1.1 to 28.0.0
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/commits)

Updates `appcompat-v7` from 27.1.1 to 28.0.0

Updates `cardview-v7` from 27.1.1 to 28.0.0

Updates `exifinterface` from 27.1.1 to 28.0.0

Updates `support-annotations` from 27.1.1 to 28.0.0

Signed-off-by: dependabot[bot] <[email protected]>
2018-09-24 06:32:34 +00:00
Andy Scherzinger 8291a19487 revert back to master lib 2018-09-23 12:32:09 +02:00
tobiasKaminsky c40a912815 use chat bubble as fallback
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-19 14:18:37 +02:00
tobiasKaminsky 0efdf2bbac Add room share type
Signed-off-by: tobiasKaminsky <[email protected]>
2018-09-18 14:48:29 +02:00
517 changed files with 49942 additions and 43395 deletions

No files matched your search

+56 -55
View File
@@ -1,67 +1,68 @@
pipeline:
compile:
image: nextcloudci/android:android-40
commands:
# build app and assemble APK
- sh -c "if [ '${FLAVOR}' != 'Analysis' ]; then ./gradlew assemble${FLAVOR}; fi"
when:
matrix:
FLAVOR: [Generic, Gplay]
compile:
image: nextcloudci/android:android-44
commands:
# build app and assemble APK
- sh -c "if [ '${FLAVOR}' != 'Analysis' ]; then ./gradlew assemble${FLAVOR}; fi"
when:
matrix:
FLAVOR: [Generic, Gplay]
test:
image: nextcloudci/android:android-40
privileged: true
commands:
- emulator -avd android-27 -no-window -no-audio &
- ./wait_for_emulator.sh
- ./gradlew assembleGplayDebug
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "Unit"
- ./gradlew installGplayDebugAndroidTest
- ./gradlew createGplayDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "IT"
- ./gradlew combinedTestReport
- curl -o codecov.sh https://codecov.io/bash
- bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
secrets: [ LOG_USERNAME, LOG_PASSWORD ]
when:
matrix:
FLAVOR: Gplay
test:
image: nextcloudci/android:android-44
privileged: true
commands:
- emulator -avd android-27 -no-window -no-audio &
- ./wait_for_emulator.sh
- ./gradlew assembleGplayDebug
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew installGplayDebugAndroidTest
- ./gradlew createGplayDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "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
secrets: [ LOG_USERNAME, LOG_PASSWORD, GIT_USERNAME, GIT_TOKEN ]
when:
matrix:
FLAVOR: Gplay
analysis:
image: nextcloudci/android:android-40
commands:
- export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
- scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
secrets: [ GIT_USERNAME, GIT_TOKEN, LOG_USERNAME, LOG_PASSWORD ]
when:
matrix:
FLAVOR: Analysis
notify:
image: drillster/drone-email
host: $EMAIL_HOST
port: 587
username: $EMAIL_USERNAME
password: $EMAIL_PASSWORD
from: [email protected]
recipients_only: true
recipients: [ $EMAIL_RECIPIENTS ]
secrets: [ EMAIL_USERNAME, EMAIL_PASSWORD, EMAIL_RECIPIENTS, EMAIL_HOST ]
when:
event: push
status: failure
branch: master
analysis:
image: nextcloudci/android:android-44
commands:
- export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
- scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
secrets: [ GIT_USERNAME, GIT_TOKEN, LOG_USERNAME, LOG_PASSWORD ]
when:
matrix:
FLAVOR: Analysis
notify:
image: drillster/drone-email
host: $EMAIL_HOST
port: 587
username: $EMAIL_USERNAME
password: $EMAIL_PASSWORD
from: [email protected]
skip_verify: true
recipients_only: true
recipients: [ $EMAIL_RECIPIENTS ]
secrets: [ EMAIL_USERNAME, EMAIL_PASSWORD, EMAIL_RECIPIENTS, EMAIL_HOST ]
when:
event: push
status: failure
branch: master
matrix:
FLAVOR:
FLAVOR:
- Generic
- Gplay
- Analysis
services:
server:
image: nextcloudci/server:server-1
when:
matrix:
FLAVOR: Gplay
server:
image: nextcloudci/server:server-3
when:
matrix:
FLAVOR: Gplay
branches: master
+33
View File
@@ -0,0 +1,33 @@
# .editorconfig
# see http://EditorConfig.org
# This is the file in the root of the project.
# For sub folders you can have other files that override only some settings.
# For these, this settings should be false.
root=true
[*]
max_line_length=120
# use spaces, not tabs.
indent_style=space
indent_size=4
charset=utf-8
# Trimming is good for consistency
trim_trailing_whitespace=true
# I've seen cases where a missing new_line was ignored on *nix systems.
# Never again with this setting!
insert_final_newline=true
[*.properties]
# Exception for Java properties files should be encoded latin1 (aka iso8859-1)
charset=latin1
[*.{cmd,bat}]
# batch files on Windows should stay with CRLF
end_of_line=crlf
[*.md]
trim_trailing_whitespace=false
@@ -1,3 +1,10 @@
---
name: Bug report
about: Create a report to help us improve
labels: bug
---
### Actual behaviour
- Tell us what happens
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
labels: enhancement
---
### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### Describe the solution you'd like
A clear and concise description of what you want to happen.
### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
### Additional context
Add any other context or screenshots about the feature request here.
**NOTE:** Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate
+3 -3
View File
@@ -27,14 +27,14 @@ group_defaults:
groups:
code-review:
required: 2
required: 1
reject_value: -99
users:
- AndyScherzinger
- tobiasKaminsky
- mario
- przybylski
- ardevd
- ardevd
design-review:
conditions:
@@ -45,5 +45,5 @@ groups:
required: 1
reject_value: -99
users:
- jancborchardt
- jancborchardt
- eppfel
+56 -1
View File
@@ -1,3 +1,58 @@
## 3.5.0 (February, 13, 2019)
- Chunked upload: 1MB on mobile data, 10MB on Wi-Fi
- Switch to Material Design
- Option to not show notifications for new media folders
- Add support for QR codes & deep links
- Direct camera upload
- Fully working Document provider
- Detail view: Show complete date upon click
- Show correct share error message
- Use default/device font
- Sync all downloaded
- Add battery optimization warning
For a full list, please see https://github.com/nextcloud/android/milestone/28
## 3.4.2 (January, 21, 2019)
- fix sharing to group
- show correct share error messages
- fix bug when searching for user/group if Talk is disabled
For a full list, please see https://github.com/nextcloud/android/milestone/29
## 3.4.1 (December, 23, 2018)
- fix wrong detection of direct editing capability for RichDocuments
## 3.4.0 (December, 17, 2018)
- hide download when creating share links
- direct editing files with Collabora (Collabora Server >=4.0)
- sort deleted files by deletion date by default
- set/edit notes on shares
- search inside of text files
- actions on notifications
- remember last path on upload
- share file to Talk room
- show local size in "on device" view
- SSO: add request header for deck app
- bug fixes
For a full list, please see https://github.com/nextcloud/android/milestone/25
## 3.3.2 (November, 02, 2018)
- fix fingerprint not working on certain devices
For a full list, please see https://github.com/nextcloud/android/milestone/27
## 3.3.1 (October, 29, 2018)
Bugfix release
- fix crash on shared folder/file via Talk
- fix crash on Notification activity
- fixed setup DAVdroid via settings
- hide edit option on shares, if not allowed
For a full list, please see https://github.com/nextcloud/android/milestone/26
## 3.3.0 (September, 19, 2018)
- Support for Trashbin (Nc14+)
- Media streaming (Nc14+)
@@ -17,7 +72,7 @@
- Fix push notification on gplay release
## 3.2.3 (August, 21, 2018)
- Fix crash on Android Android 4.x
- Fix crash on Android 4.x
## 3.2.2 (August, 20, 2018)
- New simple signup screen
+1 -1
View File
@@ -34,7 +34,7 @@
# Guidelines
## Issue reporting
* [Report the issue](https://github.com/nextcloud/android/issues/new) using our [template](https://github.com/nextcloud/android/blob/master/issue_template.md), it includes all the information we need to track down the issue.
* [Report the issue](https://github.com/nextcloud/android/issues/new/choose) and choose bug report or feature request. The template includes all the information we need to track down the issue.
* This repository is *only* for issues within the Nextcloud Android app code. Issues in other components should be reported in their own repositories, e.g. [Nextcloud core](https://github.com/nextcloud/core/issues)
* Search the [existing issues](https://github.com/nextcloud/android/issues) first, it's likely that your issue was already reported.
If your issue appears to be a bug, and hasn't been reported, open a new issue.
+1 -1
View File
@@ -45,7 +45,7 @@ Easy starting points are also reviewing [pull requests](https://github.com/nextc
#### With a computer:
- connect the device via USB
- open command prompt/terminal
- enter `adb logcat | grep "$(adb shell ps | grep com.nextcloud.client | awk '{print $2}')" > logcatOutput.txt` to save the output to this file
- enter `adb logcat | grep "$(adb shell ps | awk '/com.nextcloud.client/{print $2}')" > logcatOutput.txt` to save the output to this file
**Note:** You must have [adb](https://developer.android.com/studio/releases/platform-tools.html) installed first!
+1
View File
@@ -52,6 +52,7 @@ To set up the project in Android Studio follow the next steps:
* Make sure you have called ```git submodule update``` whenever you switched branches
* Open Android Studio and select 'Import Project (Eclipse ADT, Gradle, etc)'. Browse through your file system to the folder 'android' where the project is located. Android Studio will then create the '.iml' files it needs. If you ever close the project but the files are still there, you just select 'Open Project…'. The file chooser will show an Android face as the folder icon, which you can select to reopen the project.
* Android Studio will try to build the project directly after importing it. To build it manually, follow the menu path 'Build'/'Make Project', or just click the 'Play' button in the toolbar to build and run it in a mobile device or an emulator. The resulting APK file will be saved in the 'build/outputs/apk/' subdirectory in the project folder.
* Setup Android Studio editor configurtation for the project: ```Settings``` → ```Editor``` → ```Code Style``` → ```Scheme: Project``` and ```Enable EditorConfig support```
### 3. Working in a terminal with Gradle:
+2 -2
View File
@@ -66,7 +66,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.1</version>
<version>4.3.6</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
@@ -75,4 +75,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
</project>
</project>
+62 -56
View File
@@ -7,18 +7,17 @@
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'org.codehaus.groovy:groovy-all:2.4.12'
classpath('com.dicedmelon.gradle:jacoco-android:0.1.3') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
classpath 'com.android.tools.build:gradle:3.3.2'
classpath('com.dicedmelon.gradle:jacoco-android:0.1.4') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
}
}
@@ -31,12 +30,14 @@ apply plugin: 'jacoco-android'
configurations.all {
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'
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
ext {
supportLibraryVersion = '27.1.1'
jacocoVersion = "0.8.2"
travisBuild = System.getenv("TRAVIS") == "true"
@@ -46,10 +47,10 @@ ext {
}
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
google()
flatDir {
dirs 'libs'
@@ -58,9 +59,9 @@ repositories {
// semantic versioning for version code
def versionMajor = 3
def versionMinor = 4
def versionMinor = 5
def versionPatch = 0
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 99=stable
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
def taskRequest = getGradle().getStartParameter().getTaskRequests().toString()
if (taskRequest.contains("Gplay") || taskRequest.contains("findbugs") || taskRequest.contains("lint")) {
@@ -72,36 +73,35 @@ android {
abortOnError false
htmlReport true
htmlOutput file("$project.buildDir/reports/lint/lint.html")
disable 'MissingTranslation'
disable 'MissingTranslation', 'GradleDependency'
}
dexOptions {
javaMaxHeapSize "4g"
}
compileSdkVersion 27
compileSdkVersion 28
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
targetSdkVersion 28
// arguments to be passed to functional tests
testInstrumentationRunnerArgument "TEST_USER", "\"$System.env.OCTEST_APP_USERNAME\""
testInstrumentationRunnerArgument "TEST_PASSWORD", "\"$System.env.OCTEST_APP_PASSWORD\""
testInstrumentationRunnerArgument "TEST_SERVER_URL", "\"$System.env.OCTEST_SERVER_BASE_URL\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument "TEST_SERVER_URL", "${NC_TEST_SERVER_BASEURL}"
testInstrumentationRunnerArgument "TEST_SERVER_USERNAME", "${NC_TEST_SERVER_USERNAME}"
testInstrumentationRunnerArgument "TEST_SERVER_PASSWORD", "${NC_TEST_SERVER_PASSWORD}"
multiDexEnabled true
versionCode versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
if (versionBuild > 98) {
if (versionBuild > 89) {
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
} else if (versionBuild > 50) {
versionName "${versionMajor}.${versionMinor}.${versionPatch} RC"+(versionBuild-50)
versionName "${versionMajor}.${versionMinor}.${versionPatch} RC" + (versionBuild - 50)
} else {
versionName "${versionMajor}.${versionMinor}.${versionPatch} Alpha"+(versionBuild+1)
versionName "${versionMajor}.${versionMinor}.${versionPatch} Alpha" + (versionBuild + 1)
}
// adapt structure from Eclipse to Gradle/Android Studio expectations;
@@ -130,8 +130,8 @@ android {
versionDev {
applicationId "com.nextcloud.android.beta"
dimension "default"
versionCode 20180924
versionName "20180924"
versionCode 20190309
versionName "20190309"
}
}
}
@@ -149,7 +149,7 @@ android {
exclude 'META-INF/LICENSE'
}
task checkstyle(type: Checkstyle) {
tasks.register("checkstyle", Checkstyle) {
configFile = file("${rootProject.projectDir}/checkstyle.xml")
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
source 'src'
@@ -158,7 +158,7 @@ android {
classpath = files()
}
task pmd(type: Pmd) {
tasks.register("pmd", Pmd) {
ruleSetFiles = files("${project.rootDir}/pmd-ruleset.xml")
ignoreFailures = false
ruleSets = []
@@ -179,11 +179,11 @@ android {
}
}
task findbugs(type: FindBugs) {
tasks.register("findbugs", FindBugs) {
ignoreFailures = false
effort = "max"
reportLevel = "medium"
classes = fileTree("$project.buildDir/intermediates/classes/gplay/debug/com/owncloud")
classes = fileTree("$project.buildDir/intermediates/javac/gplayDebug/compileGplayDebugJavaWithJavac/classes/")
excludeFilter = file("${project.rootDir}/findbugs-filter.xml")
source = fileTree('src/main/java')
pluginClasspath = project.configurations.findbugsPlugins
@@ -210,65 +210,71 @@ android {
dependencies {
// dependencies for app building
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.1'
// implementation project('nextcloud-android-library')
genericImplementation "com.github.nextcloud:android-library:master-SNAPSHOT"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
gplayImplementation "com.github.nextcloud:android-library:master-SNAPSHOT"
versionDevImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' // use always latest master
implementation "com.android.support:support-v4:${supportLibraryVersion}"
implementation "com.android.support:design:${supportLibraryVersion}"
genericImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT'
gplayImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT'
versionDevImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
implementation "com.android.support:cardview-v7:${supportLibraryVersion}"
implementation "com.android.support:exifinterface:${supportLibraryVersion}"
implementation 'com.github.albfernandez:juniversalchardet:2.2.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'com.github.albfernandez:juniversalchardet:2.0.3' // need this version for Android <7
implementation 'com.google.code.findbugs:annotations:2.0.1'
implementation 'commons-io:commons-io:2.6'
implementation 'com.github.evernote:android-job:v1.2.5'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.github.tobiaskaminsky:android-job:v1.2.6.1' // 'com.github.evernote:android-job:v1.2.5'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.4'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
implementation 'org.lukhnos:nnio:0.2'
implementation 'com.madgag.spongycastle:pkix:1.54.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.afollestad:sectioned-recyclerview:0.5.0'
implementation 'com.github.chrisbanes:PhotoView:2.1.4'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'
implementation 'com.github.tobiaskaminsky:qrcodescanner:0.1.2.2' // 'com.github.blikoon:QRCodeScanner:0.1.2'
implementation 'com.google.android:flexbox:1.1.0'
implementation 'org.parceler:parceler-api:1.1.11'
annotationProcessor 'org.parceler:parceler:1.1.11'
implementation ('com.github.bumptech.glide:glide:3.7.0') {
implementation 'org.parceler:parceler-api:1.1.12'
annotationProcessor 'org.parceler:parceler:1.1.12'
implementation('com.github.bumptech.glide:glide:3.7.0') {
exclude group: "com.android.support"
}
implementation 'com.caverock:androidsvg:1.3'
implementation "com.android.support:support-annotations:${supportLibraryVersion}"
implementation 'androidx.annotation:annotation:1.0.2'
implementation 'com.google.code.gson:gson:2.8.5'
// dependencies for local unit tests
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.22.0'
testImplementation 'org.mockito:mockito-core:2.25.0'
// dependencies for instrumented tests
// JUnit4 Rules
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test:rules:1.1.1'
// Android JUnit Runner
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'androidx.test:runner:1.1.1'
// Espresso core
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.1'
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
// androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
//androidTestImplementation "com.android.support:support-annotations:${supportLibraryVersion}"
implementation 'org.jetbrains:annotations:16.0.3'
implementation 'org.jetbrains:annotations:17.0.0'
compileOnly "org.projectlombok:lombok:1.18.6"
annotationProcessor "org.projectlombok:lombok:1.18.6"
androidTestImplementation 'tools.fastlane:screengrab:1.2.0'
findbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.8.0'
findbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.3'
// jacocoAnt "org.jacoco:org.jacoco.ant:${jacocoVersion}"
// jacocoAgent "org.jacoco:org.jacoco.agent:${jacocoVersion}"
// androidJacocoAgent "org.jacoco:org.jacoco.agent:${jacocoVersion}"
@@ -295,7 +301,7 @@ android.applicationVariants.all { variant ->
}
}
task combinedTestReport(type: JacocoReport) {
tasks.register("combinedTestReport", JacocoReport) {
reports {
xml.enabled = true
@@ -309,6 +315,6 @@ task combinedTestReport(type: JacocoReport) {
sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: project.buildDir, includes: [
'jacoco/testGplayDebugUnitTest.exec', 'outputs/code-coverage/connected/flavors/GPLAY/*coverage.ec'
'jacoco/testGplayDebugUnitTest.exec', 'outputs/code-coverage/connected/flavors/GPLAY/*coverage.ec'
])
}
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0-4h-2V9h2v5z" />
</svg>

After

Width:  |  Height:  |  Size: 318 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>

After

Width:  |  Height:  |  Size: 216 B

+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" />
</svg>

After

Width:  |  Height:  |  Size: 277 B

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0z" />
<path
d="M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" />
</svg>

After

Width:  |  Height:  |  Size: 346 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewbox="0 0 16 16">
<path
d="M8 1.5C3.582 1.5 0 3.962 0 7s3.582 5.5 8 5.5c.25 0 .49-.016.734-.03L13 16v-4.703c1.83-1.008 3-2.56 3-4.297 0-3.038-3.582-5.5-8-5.5z" />
</svg>

After

Width:  |  Height:  |  Size: 262 B

+11 -9
View File
@@ -13,7 +13,7 @@
viewBox="0 0 128 128"
version="1.1"
id="svg829"
inkscape:version="0.92.2 2405546, 2018-03-11"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="first_run_talk.svg">
<defs
id="defs823"/>
@@ -25,8 +25,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="297.07973"
inkscape:cy="366.5173"
inkscape:cx="197.26742"
inkscape:cy="78.319822"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
@@ -35,10 +35,10 @@
fit-margin-left="2"
fit-margin-right="2"
fit-margin-bottom="2"
inkscape:window-width="1600"
inkscape:window-height="835"
inkscape:window-width="1920"
inkscape:window-height="1046"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-y="34"
inkscape:window-maximized="1"/>
<metadata
id="metadata826">
@@ -58,9 +58,11 @@
id="layer1"
transform="translate(-15.580506,-52.12649)">
<path
style="fill:#ffffff;stroke-width:4.78543139"
d="M 241.85938,2.6035156 C 109.72511,2.6053865 2.6113188,109.72517 2.6152344,241.86133 c 8.69e-5,132.13334 107.1127156,239.24815 239.2441456,239.25 26.38805,-0.0535 52.46249,-4.4707 77.19954,-12.96295 16.31567,-5.60118 32.04955,-12.97512 46.90788,-22.039 12.78608,5.081 32.46588,14.50729 51.91537,22.30803 25.27886,10.13878 50.16864,17.53156 59.02799,9.06892 8.75623,-8.36216 2.65569,-33.29226 -6.22433,-58.86696 -7.73207,-22.26856 -17.57143,-45.02584 -21.54521,-57.75999 9.61628,-16.68601 17.14139,-34.39874 22.46771,-52.73831 6.22776,-21.44334 9.44951,-43.74365 9.49323,-66.26169 C 481.09967,109.72865 373.99016,2.6150774 241.86133,2.6113281 Z m 0.0273,90.9609374 h 0.002 c 81.9303,3.48e-4 148.34762,66.419397 148.34766,148.351567 -0.004,81.92844 -66.42304,148.34179 -148.34961,148.34179 -81.92656,0 -148.342022,-66.41335 -148.347658,-148.34179 2.7e-5,-81.93241 66.417128,-148.351563 148.347658,-148.351567 z"
transform="matrix(0.26458333,0,0,0.26458333,15.580506,52.12649)"
id="path4753"
inkscape:connector-curvature="0"
style="fill:#ffffff;stroke-width:1.26614535"
d="m 79.572589,52.815123 a 63.300934,63.301842 0 0 0 -63.300038,63.303717 63.300934,63.301842 0 0 0 63.300038,63.3018 63.300934,63.301842 0 0 0 32.836581,-9.26097 c 7.77991,3.09162 25.20623,12.26357 29.35376,8.30176 4.33401,-4.13896 -5.08818,-23.61904 -7.34707,-30.85775 A 63.300934,63.301842 0 0 0 142.8719,116.11826 63.300934,63.301842 0 0 0 79.572762,52.817324 Z m 0.0074,24.06677 A 39.250508,39.251409 0 0 1 118.83033,116.13329 39.250508,39.251409 0 0 1 79.579825,155.382 39.250508,39.251409 0 0 1 40.329319,116.13329 39.250508,39.251409 0 0 1 79.579825,76.881893 Z"
id="path2"/>
sodipodi:nodetypes="cccscscscscccsccscs"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z" /></svg>

After

Width:  |  Height:  |  Size: 518 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>

After

Width:  |  Height:  |  Size: 404 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z" /></svg>

After

Width:  |  Height:  |  Size: 422 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z" /></svg>

After

Width:  |  Height:  |  Size: 336 B

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z" /></svg>

After

Width:  |  Height:  |  Size: 411 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" /></svg>

After

Width:  |  Height:  |  Size: 410 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M18,4L20,8H17L15,4H13L15,8H12L10,4H8L10,8H7L5,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V4H18Z" /></svg>

After

Width:  |  Height:  |  Size: 401 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z" /></svg>

After

Width:  |  Height:  |  Size: 515 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M18,8H16V4H18M15,8H13V4H15M12,8H10V4H12M18,2H10L4,8V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V4A2,2 0 0,0 18,2Z" /></svg>

After

Width:  |  Height:  |  Size: 401 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z" /></svg>

After

Width:  |  Height:  |  Size: 521 B

+247
View File
@@ -0,0 +1,247 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" baseProfile="full" width="232" height="232" viewBox="0 0 232 232" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<desc></desc>
<rect width="232" height="232" fill="#ffffff" cx="0" cy="0" />
<defs>
<rect id="p" width="8" height="8" />
</defs>
<g fill="#000000">
<use x="32" y="32" xlink:href="#p" />
<use x="32" y="40" xlink:href="#p" />
<use x="32" y="48" xlink:href="#p" />
<use x="32" y="56" xlink:href="#p" />
<use x="32" y="64" xlink:href="#p" />
<use x="32" y="72" xlink:href="#p" />
<use x="32" y="80" xlink:href="#p" />
<use x="32" y="96" xlink:href="#p" />
<use x="32" y="104" xlink:href="#p" />
<use x="32" y="112" xlink:href="#p" />
<use x="32" y="120" xlink:href="#p" />
<use x="32" y="128" xlink:href="#p" />
<use x="32" y="144" xlink:href="#p" />
<use x="32" y="152" xlink:href="#p" />
<use x="32" y="160" xlink:href="#p" />
<use x="32" y="168" xlink:href="#p" />
<use x="32" y="176" xlink:href="#p" />
<use x="32" y="184" xlink:href="#p" />
<use x="32" y="192" xlink:href="#p" />
<use x="40" y="32" xlink:href="#p" />
<use x="40" y="80" xlink:href="#p" />
<use x="40" y="96" xlink:href="#p" />
<use x="40" y="104" xlink:href="#p" />
<use x="40" y="144" xlink:href="#p" />
<use x="40" y="192" xlink:href="#p" />
<use x="48" y="32" xlink:href="#p" />
<use x="48" y="48" xlink:href="#p" />
<use x="48" y="56" xlink:href="#p" />
<use x="48" y="64" xlink:href="#p" />
<use x="48" y="80" xlink:href="#p" />
<use x="48" y="96" xlink:href="#p" />
<use x="48" y="104" xlink:href="#p" />
<use x="48" y="120" xlink:href="#p" />
<use x="48" y="128" xlink:href="#p" />
<use x="48" y="144" xlink:href="#p" />
<use x="48" y="160" xlink:href="#p" />
<use x="48" y="168" xlink:href="#p" />
<use x="48" y="176" xlink:href="#p" />
<use x="48" y="192" xlink:href="#p" />
<use x="56" y="32" xlink:href="#p" />
<use x="56" y="48" xlink:href="#p" />
<use x="56" y="56" xlink:href="#p" />
<use x="56" y="64" xlink:href="#p" />
<use x="56" y="80" xlink:href="#p" />
<use x="56" y="96" xlink:href="#p" />
<use x="56" y="104" xlink:href="#p" />
<use x="56" y="112" xlink:href="#p" />
<use x="56" y="128" xlink:href="#p" />
<use x="56" y="144" xlink:href="#p" />
<use x="56" y="160" xlink:href="#p" />
<use x="56" y="168" xlink:href="#p" />
<use x="56" y="176" xlink:href="#p" />
<use x="56" y="192" xlink:href="#p" />
<use x="64" y="32" xlink:href="#p" />
<use x="64" y="48" xlink:href="#p" />
<use x="64" y="56" xlink:href="#p" />
<use x="64" y="64" xlink:href="#p" />
<use x="64" y="80" xlink:href="#p" />
<use x="64" y="96" xlink:href="#p" />
<use x="64" y="104" xlink:href="#p" />
<use x="64" y="112" xlink:href="#p" />
<use x="64" y="120" xlink:href="#p" />
<use x="64" y="144" xlink:href="#p" />
<use x="64" y="160" xlink:href="#p" />
<use x="64" y="168" xlink:href="#p" />
<use x="64" y="176" xlink:href="#p" />
<use x="64" y="192" xlink:href="#p" />
<use x="72" y="32" xlink:href="#p" />
<use x="72" y="80" xlink:href="#p" />
<use x="72" y="104" xlink:href="#p" />
<use x="72" y="120" xlink:href="#p" />
<use x="72" y="144" xlink:href="#p" />
<use x="72" y="192" xlink:href="#p" />
<use x="80" y="32" xlink:href="#p" />
<use x="80" y="40" xlink:href="#p" />
<use x="80" y="48" xlink:href="#p" />
<use x="80" y="56" xlink:href="#p" />
<use x="80" y="64" xlink:href="#p" />
<use x="80" y="72" xlink:href="#p" />
<use x="80" y="80" xlink:href="#p" />
<use x="80" y="96" xlink:href="#p" />
<use x="80" y="112" xlink:href="#p" />
<use x="80" y="128" xlink:href="#p" />
<use x="80" y="144" xlink:href="#p" />
<use x="80" y="152" xlink:href="#p" />
<use x="80" y="160" xlink:href="#p" />
<use x="80" y="168" xlink:href="#p" />
<use x="80" y="176" xlink:href="#p" />
<use x="80" y="184" xlink:href="#p" />
<use x="80" y="192" xlink:href="#p" />
<use x="88" y="96" xlink:href="#p" />
<use x="88" y="104" xlink:href="#p" />
<use x="88" y="112" xlink:href="#p" />
<use x="88" y="128" xlink:href="#p" />
<use x="96" y="40" xlink:href="#p" />
<use x="96" y="56" xlink:href="#p" />
<use x="96" y="72" xlink:href="#p" />
<use x="96" y="80" xlink:href="#p" />
<use x="96" y="96" xlink:href="#p" />
<use x="96" y="136" xlink:href="#p" />
<use x="96" y="144" xlink:href="#p" />
<use x="96" y="160" xlink:href="#p" />
<use x="96" y="168" xlink:href="#p" />
<use x="96" y="176" xlink:href="#p" />
<use x="96" y="184" xlink:href="#p" />
<use x="96" y="192" xlink:href="#p" />
<use x="104" y="40" xlink:href="#p" />
<use x="104" y="56" xlink:href="#p" />
<use x="104" y="64" xlink:href="#p" />
<use x="104" y="88" xlink:href="#p" />
<use x="104" y="120" xlink:href="#p" />
<use x="104" y="128" xlink:href="#p" />
<use x="104" y="136" xlink:href="#p" />
<use x="104" y="144" xlink:href="#p" />
<use x="104" y="152" xlink:href="#p" />
<use x="104" y="160" xlink:href="#p" />
<use x="104" y="168" xlink:href="#p" />
<use x="104" y="176" xlink:href="#p" />
<use x="112" y="32" xlink:href="#p" />
<use x="112" y="40" xlink:href="#p" />
<use x="112" y="48" xlink:href="#p" />
<use x="112" y="80" xlink:href="#p" />
<use x="112" y="104" xlink:href="#p" />
<use x="112" y="112" xlink:href="#p" />
<use x="112" y="128" xlink:href="#p" />
<use x="112" y="144" xlink:href="#p" />
<use x="112" y="184" xlink:href="#p" />
<use x="112" y="192" xlink:href="#p" />
<use x="120" y="32" xlink:href="#p" />
<use x="120" y="48" xlink:href="#p" />
<use x="120" y="72" xlink:href="#p" />
<use x="120" y="96" xlink:href="#p" />
<use x="120" y="104" xlink:href="#p" />
<use x="120" y="120" xlink:href="#p" />
<use x="120" y="144" xlink:href="#p" />
<use x="120" y="160" xlink:href="#p" />
<use x="120" y="168" xlink:href="#p" />
<use x="120" y="184" xlink:href="#p" />
<use x="128" y="32" xlink:href="#p" />
<use x="128" y="40" xlink:href="#p" />
<use x="128" y="48" xlink:href="#p" />
<use x="128" y="56" xlink:href="#p" />
<use x="128" y="64" xlink:href="#p" />
<use x="128" y="80" xlink:href="#p" />
<use x="128" y="104" xlink:href="#p" />
<use x="128" y="112" xlink:href="#p" />
<use x="128" y="120" xlink:href="#p" />
<use x="128" y="128" xlink:href="#p" />
<use x="128" y="136" xlink:href="#p" />
<use x="128" y="168" xlink:href="#p" />
<use x="128" y="176" xlink:href="#p" />
<use x="128" y="184" xlink:href="#p" />
<use x="128" y="192" xlink:href="#p" />
<use x="136" y="96" xlink:href="#p" />
<use x="136" y="104" xlink:href="#p" />
<use x="136" y="112" xlink:href="#p" />
<use x="136" y="120" xlink:href="#p" />
<use x="136" y="136" xlink:href="#p" />
<use x="136" y="168" xlink:href="#p" />
<use x="136" y="184" xlink:href="#p" />
<use x="144" y="32" xlink:href="#p" />
<use x="144" y="40" xlink:href="#p" />
<use x="144" y="48" xlink:href="#p" />
<use x="144" y="56" xlink:href="#p" />
<use x="144" y="64" xlink:href="#p" />
<use x="144" y="72" xlink:href="#p" />
<use x="144" y="80" xlink:href="#p" />
<use x="144" y="128" xlink:href="#p" />
<use x="144" y="168" xlink:href="#p" />
<use x="144" y="176" xlink:href="#p" />
<use x="144" y="184" xlink:href="#p" />
<use x="152" y="32" xlink:href="#p" />
<use x="152" y="80" xlink:href="#p" />
<use x="152" y="96" xlink:href="#p" />
<use x="152" y="136" xlink:href="#p" />
<use x="152" y="152" xlink:href="#p" />
<use x="152" y="168" xlink:href="#p" />
<use x="152" y="192" xlink:href="#p" />
<use x="160" y="32" xlink:href="#p" />
<use x="160" y="48" xlink:href="#p" />
<use x="160" y="56" xlink:href="#p" />
<use x="160" y="64" xlink:href="#p" />
<use x="160" y="80" xlink:href="#p" />
<use x="160" y="104" xlink:href="#p" />
<use x="160" y="120" xlink:href="#p" />
<use x="160" y="128" xlink:href="#p" />
<use x="160" y="136" xlink:href="#p" />
<use x="160" y="160" xlink:href="#p" />
<use x="160" y="168" xlink:href="#p" />
<use x="160" y="184" xlink:href="#p" />
<use x="168" y="32" xlink:href="#p" />
<use x="168" y="48" xlink:href="#p" />
<use x="168" y="56" xlink:href="#p" />
<use x="168" y="64" xlink:href="#p" />
<use x="168" y="80" xlink:href="#p" />
<use x="168" y="96" xlink:href="#p" />
<use x="168" y="104" xlink:href="#p" />
<use x="168" y="112" xlink:href="#p" />
<use x="168" y="120" xlink:href="#p" />
<use x="168" y="128" xlink:href="#p" />
<use x="168" y="152" xlink:href="#p" />
<use x="168" y="160" xlink:href="#p" />
<use x="168" y="168" xlink:href="#p" />
<use x="168" y="184" xlink:href="#p" />
<use x="176" y="32" xlink:href="#p" />
<use x="176" y="48" xlink:href="#p" />
<use x="176" y="56" xlink:href="#p" />
<use x="176" y="64" xlink:href="#p" />
<use x="176" y="80" xlink:href="#p" />
<use x="176" y="104" xlink:href="#p" />
<use x="176" y="112" xlink:href="#p" />
<use x="176" y="120" xlink:href="#p" />
<use x="176" y="144" xlink:href="#p" />
<use x="176" y="152" xlink:href="#p" />
<use x="176" y="168" xlink:href="#p" />
<use x="176" y="176" xlink:href="#p" />
<use x="176" y="184" xlink:href="#p" />
<use x="184" y="32" xlink:href="#p" />
<use x="184" y="80" xlink:href="#p" />
<use x="184" y="96" xlink:href="#p" />
<use x="184" y="112" xlink:href="#p" />
<use x="184" y="128" xlink:href="#p" />
<use x="184" y="144" xlink:href="#p" />
<use x="184" y="152" xlink:href="#p" />
<use x="184" y="192" xlink:href="#p" />
<use x="192" y="32" xlink:href="#p" />
<use x="192" y="40" xlink:href="#p" />
<use x="192" y="48" xlink:href="#p" />
<use x="192" y="56" xlink:href="#p" />
<use x="192" y="64" xlink:href="#p" />
<use x="192" y="72" xlink:href="#p" />
<use x="192" y="80" xlink:href="#p" />
<use x="192" y="104" xlink:href="#p" />
<use x="192" y="120" xlink:href="#p" />
<use x="192" y="128" xlink:href="#p" />
<use x="192" y="160" xlink:href="#p" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

+2
View File
@@ -8,4 +8,6 @@
<Match>
<Class name="~.*\.R\$.*"/>
</Match>
<Bug pattern="PATH_TRAVERSAL_IN" />
<Bug pattern="ANDROID_EXTERNAL_FILE_ACCESS" />
</FindBugsFilter>
+7
View File
@@ -0,0 +1,7 @@
# can be overriden by ~/.gradle/gradle.properties
NC_TEST_SERVER_BASEURL=http://server
NC_TEST_SERVER_USERNAME=test
NC_TEST_SERVER_PASSWORD=test
android.enableJetifier=true
android.useAndroidX=true
android.debug.obsoleteApi=true
+2 -2
View File
@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionSha256Sum=7a2c66d1a78f811d5f37d14630ad21cec5e77a2a4dc61e787e2257a6341016ce
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionSha256Sum=36bf7ff499223d5139f005822130ccca784c91591b514677fd376eed966c907e
+14 -172
View File
@@ -1,17 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="UnusedAttribute">
<ignore regexp="importantForAutofill"/>
<ignore regexp="autofillHints"/>
</issue>
<issue id="InvalidPackage">
<ignore path="**/freemarker-2.3.23.jar"/>
<ignore path="**/freemarker-2.3.28.jar" />
<ignore path="**/nnio-0.2.jar"/>
<ignore path="**/pkix-1.54.0.0.jar"/>
</issue>
<issue id="UnusedResources">
<ignore regexp="store_short_desc|store_full_desc|store_short_dev_desc|store_full_dev_desc" />
<ignore
regexp="screenshot_01_gridView|screenshot_02_listView|screenshot_03_drawer|screenshot_04_accounts|screenshot_05_autoUpload|screenshot_06_davdroid"/>
<ignore path="**/raw/encryption_key_words.txt" />
</issue>
<issue id="MissingQuantity">
<ignore path="**/values-ka-rGE/strings.xml"/>
</issue>
@@ -28,178 +33,15 @@
</issue>
<issue id="UnusedResources">
<ignore path="**/values-b+en+001/strings.xml"/>
<ignore path="**/values-b+es+419/strings.xml" />
<ignore path="**/values-pt-rPT/strings.xml"/>
<ignore path="**/values-ro/strings.xml"/>
<ignore path="**/values-zh-rCN/strings.xml"/>
<ignore path="**/values-bg-rBG/strings.xml"/>
<ignore path="**/values-nb-rNO/strings.xml"/>
<ignore path="**/values-es/strings.xml"/>
<ignore path="**/values-fa/strings.xml"/>
<ignore path="**/values-ko/strings.xml"/>
<ignore path="**/values-ru/strings.xml"/>
<ignore path="**/values-ast/strings.xml"/>
<ignore path="**/values-es-rCO/strings.xml"/>
<ignore path="**/values-es-rCL/strings.xml"/>
<ignore path="**/values-es-rSV/strings.xml"/>
<ignore path="**/values-sv/strings.xml"/>
<ignore path="**/values-tr/strings.xml"/>
<ignore path="**/values-es-rUY/strings.xml"/>
<ignore path="**/values-es-rGT/strings.xml"/>
<ignore path="**/values-fr/strings.xml"/>
<ignore path="**/values-es-rMX/strings.xml"/>
<ignore path="**/values-fi-rFI/strings.xml"/>
<ignore path="**/values-ar/strings.xml"/>
<ignore path="**/values-es-rAR/strings.xml"/>
<ignore path="**/values-de-rDE/strings.xml"/>
<ignore path="**/values-ca/strings.xml"/>
<ignore path="**/values-is/strings.xml"/>
<ignore path="**/values-es-rNI/strings.xml"/>
<ignore path="**/values-es-rPR/strings.xml"/>
<ignore path="**/values-es-rDO/strings.xml"/>
<ignore path="**/values-sq/strings.xml"/>
<ignore path="**/values-pt-rBR/strings.xml"/>
<ignore path="**/values-ja-rJP/strings.xml"/>
<ignore path="**/values-sr/strings.xml"/>
<ignore path="**/values-it/strings.xml"/>
<ignore path="**/values-hu-rHU/strings.xml"/>
<ignore path="**/values-pl/strings.xml"/>
<ignore path="**/values-es-rHN/strings.xml"/>
<ignore path="**/values-lt-rLT/strings.xml"/>
<ignore path="**/values-es-rPA/strings.xml"/>
<ignore path="**/values-nl/strings.xml"/>
<ignore path="**/values-sk-rSK/strings.xml"/>
<ignore path="**/values-ka-rGE/strings.xml"/>
<ignore path="**/values-eu/strings.xml"/>
<ignore path="**/values-es-rCR/strings.xml"/>
<ignore path="**/values-da/strings.xml"/>
<ignore path="**/values-es-rEC/strings.xml"/>
<ignore path="**/values-de/strings.xml"/>
<ignore path="**/values-sl/strings.xml"/>
<ignore path="**/values-es-rPY/strings.xml"/>
<ignore path="**/values-es-rPE/strings.xml"/>
<ignore path="**/values-zh-rTW/strings.xml"/>
<ignore path="**/values-el/strings.xml"/>
<ignore path="**/values-id/strings.xml"/>
<ignore path="**/values-cs-rCZ/strings.xml"/>
<ignore path="**/values-en-rGB/strings.xml"/>
<ignore path="**/values-**/strings.xml" />
</issue>
<issue id="TypographyEllipsis">
<ignore path="**/values-b+en+001/strings.xml"/>
<ignore path="**/values-pt-rPT/strings.xml"/>
<ignore path="**/values-ro/strings.xml"/>
<ignore path="**/values-zh-rCN/strings.xml"/>
<ignore path="**/values-bg-rBG/strings.xml"/>
<ignore path="**/values-nb-rNO/strings.xml"/>
<ignore path="**/values-es/strings.xml"/>
<ignore path="**/values-fa/strings.xml"/>
<ignore path="**/values-ko/strings.xml"/>
<ignore path="**/values-ru/strings.xml"/>
<ignore path="**/values-ast/strings.xml"/>
<ignore path="**/values-es-rCO/strings.xml"/>
<ignore path="**/values-es-rCL/strings.xml"/>
<ignore path="**/values-es-rSV/strings.xml"/>
<ignore path="**/values-sv/strings.xml"/>
<ignore path="**/values-tr/strings.xml"/>
<ignore path="**/values-es-rUY/strings.xml"/>
<ignore path="**/values-es-rGT/strings.xml"/>
<ignore path="**/values-fr/strings.xml"/>
<ignore path="**/values-es-rMX/strings.xml"/>
<ignore path="**/values-fi-rFI/strings.xml"/>
<ignore path="**/values-ar/strings.xml"/>
<ignore path="**/values-es-rAR/strings.xml"/>
<ignore path="**/values-de-rDE/strings.xml"/>
<ignore path="**/values-ca/strings.xml"/>
<ignore path="**/values-is/strings.xml"/>
<ignore path="**/values-es-rNI/strings.xml"/>
<ignore path="**/values-es-rPR/strings.xml"/>
<ignore path="**/values-es-rDO/strings.xml"/>
<ignore path="**/values-sq/strings.xml"/>
<ignore path="**/values-pt-rBR/strings.xml"/>
<ignore path="**/values-ja-rJP/strings.xml"/>
<ignore path="**/values-sr/strings.xml"/>
<ignore path="**/values-it/strings.xml"/>
<ignore path="**/values-hu-rHU/strings.xml"/>
<ignore path="**/values-pl/strings.xml"/>
<ignore path="**/values-es-rHN/strings.xml"/>
<ignore path="**/values-lt-rLT/strings.xml"/>
<ignore path="**/values-es-rPA/strings.xml"/>
<ignore path="**/values-nl/strings.xml"/>
<ignore path="**/values-sk-rSK/strings.xml"/>
<ignore path="**/values-ka-rGE/strings.xml"/>
<ignore path="**/values-eu/strings.xml"/>
<ignore path="**/values-es-rCR/strings.xml"/>
<ignore path="**/values-da/strings.xml"/>
<ignore path="**/values-es-rEC/strings.xml"/>
<ignore path="**/values-de/strings.xml"/>
<ignore path="**/values-sl/strings.xml"/>
<ignore path="**/values-es-rPY/strings.xml"/>
<ignore path="**/values-es-rPE/strings.xml"/>
<ignore path="**/values-zh-rTW/strings.xml"/>
<ignore path="**/values-el/strings.xml"/>
<ignore path="**/values-id/strings.xml"/>
<ignore path="**/values-cs-rCZ/strings.xml"/>
<ignore path="**/values-en-rGB/strings.xml"/>
<ignore path="**/values-**/strings.xml" />
</issue>
<issue id="Typos">
<ignore path="**/values-b+en+001/strings.xml"/>
<ignore path="**/values-pt-rPT/strings.xml"/>
<ignore path="**/values-ro/strings.xml"/>
<ignore path="**/values-zh-rCN/strings.xml"/>
<ignore path="**/values-bg-rBG/strings.xml"/>
<ignore path="**/values-nb-rNO/strings.xml"/>
<ignore path="**/values-es/strings.xml"/>
<ignore path="**/values-fa/strings.xml"/>
<ignore path="**/values-ko/strings.xml"/>
<ignore path="**/values-ru/strings.xml"/>
<ignore path="**/values-ast/strings.xml"/>
<ignore path="**/values-es-rCO/strings.xml"/>
<ignore path="**/values-es-rCL/strings.xml"/>
<ignore path="**/values-es-rSV/strings.xml"/>
<ignore path="**/values-sv/strings.xml"/>
<ignore path="**/values-tr/strings.xml"/>
<ignore path="**/values-es-rUY/strings.xml"/>
<ignore path="**/values-es-rGT/strings.xml"/>
<ignore path="**/values-fr/strings.xml"/>
<ignore path="**/values-es-rMX/strings.xml"/>
<ignore path="**/values-fi-rFI/strings.xml"/>
<ignore path="**/values-ar/strings.xml"/>
<ignore path="**/values-es-rAR/strings.xml"/>
<ignore path="**/values-de-rDE/strings.xml"/>
<ignore path="**/values-ca/strings.xml"/>
<ignore path="**/values-is/strings.xml"/>
<ignore path="**/values-es-rNI/strings.xml"/>
<ignore path="**/values-es-rPR/strings.xml"/>
<ignore path="**/values-es-rDO/strings.xml"/>
<ignore path="**/values-sq/strings.xml"/>
<ignore path="**/values-pt-rBR/strings.xml"/>
<ignore path="**/values-ja-rJP/strings.xml"/>
<ignore path="**/values-sr/strings.xml"/>
<ignore path="**/values-it/strings.xml"/>
<ignore path="**/values-hu-rHU/strings.xml"/>
<ignore path="**/values-pl/strings.xml"/>
<ignore path="**/values-es-rHN/strings.xml"/>
<ignore path="**/values-lt-rLT/strings.xml"/>
<ignore path="**/values-es-rPA/strings.xml"/>
<ignore path="**/values-nl/strings.xml"/>
<ignore path="**/values-sk-rSK/strings.xml"/>
<ignore path="**/values-ka-rGE/strings.xml"/>
<ignore path="**/values-eu/strings.xml"/>
<ignore path="**/values-es-rCR/strings.xml"/>
<ignore path="**/values-da/strings.xml"/>
<ignore path="**/values-es-rEC/strings.xml"/>
<ignore path="**/values-de/strings.xml"/>
<ignore path="**/values-sl/strings.xml"/>
<ignore path="**/values-es-rPY/strings.xml"/>
<ignore path="**/values-es-rPE/strings.xml"/>
<ignore path="**/values-zh-rTW/strings.xml"/>
<ignore path="**/values-el/strings.xml"/>
<ignore path="**/values-id/strings.xml"/>
<ignore path="**/values-cs-rCZ/strings.xml"/>
<ignore path="**/values-en-rGB/strings.xml"/>
<issue id="Typos">
<ignore path="**/values-**/strings.xml" />
</issue>
</lint>
+84 -37
View File
@@ -8,10 +8,14 @@
#6: DRONE_BUILD_NUMBER
#7: PULL_REQUEST_NUMBER
stableBranch="master"
repository="android"
ruby scripts/analysis/lint-up.rb $1 $2 $3
lintValue=$?
./gradlew findbugs
ruby scripts/analysis/findbugs-up.rb $1 $2 $3
findbugsValue=$?
# exit codes:
# 0: count was reduced
@@ -20,62 +24,105 @@ lintValue=$?
echo "Branch: $3"
if [ $3 = "master" ]; then
echo "New findbugs result for master at: https://www.kaminsky.me/nc-dev/client-findbugs/master.html"
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/findbugs/master.html --upload-file build/reports/findbugs/findbugs.html
summary=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/findbugs/findbugs.html | head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s'/Summary/FindBugs (master)/' | tr "\"" "\'" | tr -d "\r\n")
curl -u $4:$5 -X PUT -d "$summary" https://nextcloud.kaminsky.me/remote.php/webdav/findbugs/findbugs.html
if [ $3 = $stableBranch ]; then
echo "New findbugs result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html"
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$stableBranch.html --upload-file build/reports/findbugs/findbugs.html
summary=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/findbugs/findbugs.html | head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"/Summary/FindBugs ($stableBranch)/" | tr "\"" "\'" | tr -d "\r\n")
curl -u $4:$5 -X PUT -d "$summary" https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/findbugs-summary-$stableBranch.html
if [ $lintValue -ne 1 ]; then
echo "New lint result for master at: https://www.kaminsky.me/nc-dev/client-lint/master.html"
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/master.html --upload-file build/reports/lint/lint.html
echo "New lint result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-lint/$stableBranch.html"
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-lint/$stableBranch.html --upload-file build/reports/lint/lint.html
exit 0
fi
else
if [ -e $6 ]; then
6="master-"$(date +%F)
6=$stableBranch"-"$(date +%F)
fi
echo "New lint results at https://www.kaminsky.me/nc-dev/client-lint/$6.html"
curl 2>/dev/null -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/$6.html --upload-file build/reports/lint/lint.html
echo "New findbugs results at https://www.kaminsky.me/nc-dev/client-findbugs/$6.html"
curl 2>/dev/null -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/findbugs/$6.html --upload-file build/reports/findbugs/findbugs.html
echo "New lint results at https://www.kaminsky.me/nc-dev/$repository-lint/$6.html"
curl 2>/dev/null -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-lint/$6.html --upload-file build/reports/lint/lint.html
echo "New findbugs results at https://www.kaminsky.me/nc-dev/$repository-findbugs/$6.html"
curl 2>/dev/null -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$6.html --upload-file build/reports/findbugs/findbugs.html
# delete all old comments
oldComments=$(curl 2>/dev/null -u $1:$2 -X GET https://api.github.com/repos/nextcloud/android/issues/$7/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) ' | grep true | tr -d "\"" | cut -f1 -d"|")
echo $oldComments | while read comment ; do
oldComments=$(curl 2>/dev/null -u $1:$2 -X GET https://api.github.com/repos/nextcloud/android/issues/$7/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) ' | grep true | tr -d "\"" | cut -f1 -d"|")
echo $oldComments | while read comment ; do
curl 2>/dev/null -u $1:$2 -X DELETE https://api.github.com/repos/nextcloud/android/issues/comments/$comment
done
# check library, only if base branch is master
baseBranch=$(scripts/analysis/getBranchBase.sh $1 $2 $7 | tr -d "\"")
if [ $baseBranch = "master" -a $(grep "android-library:master" build.gradle -c) -ne 3 ]; then
checkLibraryMessage="<h1>Android-library is not set to master branch in build.gradle</h1>"
checkLibrary=1
else
else
checkLibrary=0
fi
# lint and findbugs file must exist
if [ ! -s build/reports/lint/lint.html ] ; then
echo "lint.html file is missing!"
exit 1
fi
if [ ! -s build/reports/findbugs/findbugs.html ] ; then
echo "findbugs.html file is missing!"
exit 1
fi
# add comment with results
lintResultNew=$(grep "Lint Report.* [0-9]* warnings" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
lintWarningNew=$(echo $lintResultNew | grep "[0-9]* warning" -o | cut -f1 -d" ")
lintErrorOld=$(grep "[0-9]* error" scripts/analysis/lint-results.txt -o | cut -f1 -d" ")
lintWarningOld=$(grep "[0-9]* warning" scripts/analysis/lint-results.txt -o | cut -f1 -d" ")
lintResult="<h1>Lint</h1><table width='500' cellpadding='5' cellspacing='2'><tr class='tablerow0'><td>Type</td><td><a href='https://www.kaminsky.me/nc-dev/client-lint/master.html'>Master</a></td><td><a href='https://www.kaminsky.me/nc-dev/client-lint/"$6".html'>PR</a></td></tr><tr class='tablerow1'><td>Warnings</td><td>"$lintWarningOld"</td><td>"$lintWarningNew"</td></tr><tr class='tablerow0'><td>Errors</td><td>"$lintErrorOld"</td><td>"$lintErrorNew"</td></tr></table>"
findbugsResultNew=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/findbugs/findbugs.html |head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"#Summary#<a href=\"https://www.kaminsky.me/nc-dev/client-findbugs/$6.html\">FindBugs</a> (new)#" | tr "\"" "\'" | tr -d "\n")
findbugsResultOld=$(curl 2>/dev/null https://nextcloud.kaminsky.me/index.php/s/YaHngKMM6ERmBeg/download | tr "\"" "\'" | tr -d "\r\n" | sed s'#FindBugs#<a href=\"https://www.kaminsky.me/nc-dev/client-findbugs/master.html">FindBugs</a>#'| tr "\"" "\'" | tr -d "\n")
curl -u $1:$2 -X POST https://api.github.com/repos/nextcloud/android/issues/$7/comments -d "{ \"body\" : \"$lintResult $findbugsResultNew $findbugsResultOld $checkLibraryMessage \" }"
lintResultNew=$(grep "Lint Report.* [0-9]* warning" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
if ( [ -z $lintErrorNew ] ); then
lintErrorNew=0
fi
lintWarningNew=$(echo $lintResultNew | grep "[0-9]* warning" -o | cut -f1 -d" ")
if ( [ -z $lintWarningNew ] ); then
lintWarningNew=0
fi
lintResultOld=$(curl 2>/dev/null https://raw.githubusercontent.com/nextcloud/android/$stableBranch/scripts/analysis/lint-results.txt)
lintErrorOld=$(echo $lintResultOld | grep "[0-9]* error" -o | cut -f1 -d" ")
if ( [ -z $lintErrorOld ] ); then
lintErrorOld=0
fi
lintWarningOld=$(echo $lintResultOld | grep "[0-9]* warning" -o | cut -f1 -d" ")
if ( [ -z $lintWarningOld ] ); then
lintWarningOld=0
fi
lintResult="<h1>Lint</h1><table width='500' cellpadding='5' cellspacing='2'><tr class='tablerow0'><td>Type</td><td><a href='https://www.kaminsky.me/nc-dev/"$repository"-lint/"$stableBranch".html'>$stableBranch</a></td><td><a href='https://www.kaminsky.me/nc-dev/"$repository"-lint/"$6".html'>PR</a></td></tr><tr class='tablerow1'><td>Warnings</td><td>"$lintWarningOld"</td><td>"$lintWarningNew"</td></tr><tr class='tablerow0'><td>Errors</td><td>"$lintErrorOld"</td><td>"$lintErrorNew"</td></tr></table>"
findbugsResultNew=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/findbugs/findbugs.html |head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"#Summary#<a href=\"https://www.kaminsky.me/nc-dev/$repository-findbugs/$6.html\">FindBugs</a> (new)#" | tr "\"" "\'" | tr -d "\n")
findbugsResultOld=$(curl 2>/dev/null https://www.kaminsky.me/nc-dev/$repository-findbugs/findbugs-summary-$stableBranch.html | tr "\"" "\'" | tr -d "\r\n" | sed s"#FindBugs#<a href=\"https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html\">FindBugs</a>#" | tr "\"" "\'" | tr -d "\n")
if ( [ $lintValue -eq 1 ] ) ; then
lintMessage="<h1>Lint increased!</h1>"
fi
if ( [ $findbugsValue -eq 1 ] ) ; then
findbugsMessage="<h1>Findbugs increased!</h1>"
fi
curl -u $1:$2 -X POST https://api.github.com/repos/nextcloud/android/issues/$7/comments -d "{ \"body\" : \"$lintResult $findbugsResultNew $findbugsResultOld $checkLibraryMessage $lintMessage $findbugsMessage \" }"
if [ $checkLibrary -eq 1 ]; then
exit 1
fi
if [ $lintValue -eq 2 ]; then
if [ ! $lintValue -eq 2 ]; then
exit $lintValue
fi
if [ $findbugsValue -eq 2 ]; then
exit 0
else
exit $lintValue
fi
exit $findbugsValue
fi
fi
+1
View File
@@ -0,0 +1 @@
475
+130
View File
@@ -0,0 +1,130 @@
## Script from https://github.com/tir38/android-lint-entropy-reducer at 07.05.2017
# adapts to drone, use git username / token as parameter
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
puts "=================== starting Android FindBugs Entropy Reducer ===================="
# get args
git_user, git_token, git_branch = ARGV
# ======================== SETUP ============================
# User name for git commits made by this script.
TRAVIS_GIT_USERNAME = String.new("Drone CI server")
# File name and relative path of generated FindBugs report. Must match build.gradle file:
# lintOptions {
# htmlOutput file("[FILE_NAME].html")
# }
FINDBUGS_REPORT_FILE = String.new("build/reports/findbugs/findbugs.html")
# File name and relative path of previous results of this script.
PREVIOUS_FINDBUGS_RESULTS_FILE=String.new("scripts/analysis/findbugs-results.txt")
# Flag to evaluate warnings. true = check warnings; false = ignore warnings
CHECK_WARNINGS = true
# File name and relative path to custom FindBugs rules; Can be null or "".
CUSTOM_FINDBUGS_FILE = String.new("")
# ================ SETUP DONE; DON'T TOUCH ANYTHING BELOW ================
require 'fileutils'
require 'pathname'
require 'open3'
# since we need the xml-simple gem, and we want this script self-contained, let's grab it just when we need it
begin
gem "xml-simple"
rescue LoadError
system("gem install xml-simple")
Gem.clear_paths
end
require 'xmlsimple'
# run FindBugs
puts "running FindBugs..."
system './gradlew findbugs'
# find FindBugs report file
findbugs_reports = Dir.glob(FINDBUGS_REPORT_FILE)
if findbugs_reports.length == 0
puts "Findbugs HTML report not found."
exit 1
end
findbugs_report = String.new(findbugs_reports[0])
# find number of warnings
current_warning_count = `grep -A 3 "<b>Total</b>" build/reports/findbugs/findbugs.html | tail -n1 | cut -f2 -d">" | cut -f1 -d"<"`.to_i
puts "found warnings: " + current_warning_count.to_s
# get warning counts from last successful build
previous_results = false
previous_findbugs_reports = Dir.glob(PREVIOUS_FINDBUGS_RESULTS_FILE)
if previous_findbugs_reports.nil? || previous_findbugs_reports.length == 0
previous_findbugs_report = File.new(PREVIOUS_FINDBUGS_RESULTS_FILE, "w") # create for writing to later
else
previous_findbugs_report = String.new(previous_findbugs_reports[0])
previous_warning_count = File.open(previous_findbugs_report, &:readline).match(/[0-9]*/)[0].to_i
if previous_warning_count.nil?
previous_results = false
else
previous_results = true
puts "previous warnings: " + previous_warning_count.to_s
end
end
# compare previous warning count with current warning count
if previous_results == true && current_warning_count > previous_warning_count
puts "FAIL: warning count increased"
exit 1
end
# check if warning and error count stayed the same
if previous_results == true && current_warning_count == previous_warning_count
puts "SUCCESS: count stayed the same"
exit 2
end
# warning count DECREASED
puts "SUCCESS: count decreased from " + previous_warning_count.to_s + " to " + current_warning_count.to_s
# write new results to file (will overwrite existing, or create new)
File.write(previous_findbugs_report, current_warning_count)
# push changes to github (if this script is run locally, we don't want to overwrite git username and email, so save temporarily)
previous_git_username, _ = Open3.capture2('git config user.name')
previous_git_username = previous_git_username.strip
previous_git_email, _ = Open3.capture3('git config user.email')
previous_git_email = previous_git_email.strip
# update git user name and email for this script
system ("git config --local user.name '" + git_user + "'")
system ("git config --local user.email '[email protected]'")
system ("git remote rm origin")
system ("git remote add origin https://" + git_user + ":" + git_token + "@github.com/nextcloud/android")
# add previous FindBugs result file to git
system ('git add ' + PREVIOUS_FINDBUGS_RESULTS_FILE)
# commit changes; Add "skip ci" so that we don't accidentally trigger another Drone build
system ('git commit -sm "Drone: update FindBugs results to reflect reduced error/warning count [skip ci]" ')
# push to origin
system ('git push origin HEAD:' + git_branch)
# restore previous git user name and email
system("git config --local user.name '#{previous_git_username}'")
system("git config --local user.email '#{previous_git_email}'")
puts "SUCCESS: count was reduced"
exit 0 # success
+1 -1
View File
@@ -5,5 +5,5 @@
if [ -z $3 ] ; then
echo "master";
else
curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v master | cut -d"\"" -f4
curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4
fi
+1 -1
View File
@@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 94 warnings</span>
<span class="mdl-layout-title">Lint Report: 68 warnings</span>
+2 -2
View File
@@ -178,7 +178,7 @@ previous_git_email = previous_git_email.strip
# update git user name and email for this script
system ("git config --local user.name '" + git_user + "'")
system ("git config --local user.email '.'") # set email blank
system ("git config --local user.email '[email protected]'")
system ("git remote rm origin")
system ("git remote add origin https://" + git_user + ":" + git_token + "@github.com/nextcloud/android")
@@ -186,7 +186,7 @@ system ("git remote add origin https://" + git_user + ":" + git_token + "@github
system ('git add ' + PREVIOUS_LINT_RESULTS_FILE)
# commit changes; Add "skip ci" so that we don't accidentally trigger another Drone build
system ('git commit -m "Drone: update Lint results to reflect reduced error/warning count [skip ci]" ')
system ('git commit -sm "Drone: update Lint results to reflect reduced error/warning count [skip ci]" ')
# push to origin
system ('git push origin HEAD:' + git_branch)
+14 -3
View File
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
URL=https://nextcloud.kaminsky.me/remote.php/webdav/integrationTests
#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
URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-integrationTests
ID=$3
USER=$1
PASS=$2
@@ -8,12 +16,15 @@ TYPE=$4
if [ $TYPE = "IT" ]; then
cd build/reports/androidTests/connected/flavors/GPLAY
else
else
cd build/reports/tests/testGplayDebugUnitTest
fi
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$ID/$(echo {} | sed s#\./##) \;
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$ID/$(echo {} | sed s#\./##) --upload-file {} \;
echo "Uploaded failing tests to https://nextcloud.kaminsky.me/index.php/s/XqY52jBr9ZYfDiz -> $ID"
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$ID"
curl -u $6:$7 -X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments -d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$ID \" }"
exit 1
+5 -5
View File
@@ -25,8 +25,8 @@
the normal release/debug builds.
-->
<manifest
package="${applicationId}.test"
xmlns:tools="http://schemas.android.com/tools">
<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
</manifest>
<manifest xmlns:tools="http://schemas.android.com/tools"
package="${applicationId}.test">
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator" />
</manifest>
@@ -1,11 +1,6 @@
package com.owncloud.android.screenshots;
import android.content.Intent;
import android.support.test.espresso.Espresso;
import android.support.test.espresso.action.ViewActions;
import android.support.test.espresso.contrib.DrawerActions;
import android.support.test.espresso.matcher.PreferenceMatchers;
import android.support.test.rule.ActivityTestRule;
import com.owncloud.android.R;
import com.owncloud.android.ui.activity.FileDisplayActivity;
@@ -20,15 +15,20 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import androidx.test.espresso.Espresso;
import androidx.test.espresso.action.ViewActions;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.espresso.matcher.PreferenceMatchers;
import androidx.test.rule.ActivityTestRule;
import tools.fastlane.screengrab.Screengrab;
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
import tools.fastlane.screengrab.locale.LocaleTestRule;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.anything;
import static org.hamcrest.core.AnyOf.anyOf;
@@ -21,18 +21,19 @@ package com.owncloud.android.uiautomator;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SdkSuppress;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SdkSuppress;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObject;
import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
@@ -6,8 +6,8 @@ import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.support.test.runner.AndroidJUnit4;
import android.test.ApplicationTestCase;
import android.net.Uri;
import android.os.Bundle;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.lib.common.OwnCloudClient;
@@ -15,35 +15,40 @@ import com.owncloud.android.lib.common.OwnCloudClientFactory;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.utils.FileStorageUtils;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
/**
* Common base for all integration tests
*/
@RunWith(AndroidJUnit4.class)
public abstract class AbstractIT extends ApplicationTestCase<MainApp> {
public abstract class AbstractIT {
protected static OwnCloudClient client;
protected static Account account;
static Account account;
protected static Context context;
private static final String username = "test";
private static final String password = "test";
private static final String baseUrl = "server";
public AbstractIT() {
super(MainApp.class);
}
@BeforeClass
public static void beforeAll() {
try {
context = MainApp.getAppContext();
context = InstrumentationRegistry.getInstrumentation().getTargetContext();
Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
Uri baseUrl = Uri.parse(arguments.getString("TEST_SERVER_URL"));
String username = arguments.getString("TEST_SERVER_USERNAME");
String password = arguments.getString("TEST_SERVER_PASSWORD");
Account temp = new Account(username + "@" + baseUrl, MainApp.getAccountType(context));
@@ -53,7 +58,8 @@ public abstract class AbstractIT extends ApplicationTestCase<MainApp> {
accountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(com.owncloud.android.authentication.AccountUtils.ACCOUNT_VERSION));
accountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_VERSION, "14.0.0.0");
accountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL, "http://" + baseUrl);
accountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL, baseUrl.toString());
accountManager.setUserData(temp, AccountUtils.Constants.KEY_USER_ID, username);
}
account = com.owncloud.android.authentication.AccountUtils.getOwnCloudAccountByName(context,
@@ -62,10 +68,12 @@ public abstract class AbstractIT extends ApplicationTestCase<MainApp> {
if (account == null) {
throw new ActivityNotFoundException();
}
client = OwnCloudClientFactory.createOwnCloudClient(account, context);
createDummyFiles();
waitForServer(client, baseUrl);
} catch (OperationCanceledException e) {
e.printStackTrace();
} catch (AuthenticatorException e) {
@@ -77,14 +85,50 @@ public abstract class AbstractIT extends ApplicationTestCase<MainApp> {
}
}
protected FileDataStorageManager getStorageManager() {
FileDataStorageManager getStorageManager() {
return new FileDataStorageManager(account, context.getContentResolver());
}
private static void createDummyFiles() throws IOException {
new File(FileStorageUtils.getSavePath(account.name)).mkdirs();
File file = new File(FileStorageUtils.getSavePath(account.name) + "/123.txt");
createFile("empty.txt", 0);
createFile("nonEmpty.txt", 100);
createFile("chunkedFile.txt", 500000);
}
private static void createFile(String name, int iteration) throws IOException {
File file = new File(FileStorageUtils.getSavePath(account.name) + File.separator + name);
file.createNewFile();
FileWriter writer = new FileWriter(file);
for (int i = 0; i < iteration; i++) {
writer.write("123123123123123123123123123\n");
}
writer.flush();
writer.close();
}
private static void waitForServer(OwnCloudClient client, Uri baseUrl) {
GetMethod get = new GetMethod(baseUrl + "/status.php");
try {
int i = 0;
while (client.executeMethod(get) != HttpStatus.SC_OK && i < 3) {
System.out.println("wait…");
Thread.sleep(60 * 1000);
i++;
}
if (i == 3) {
Assert.fail("Server not ready!");
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
@@ -1,35 +1,41 @@
package com.owncloud.android;
import android.support.test.runner.AndroidJUnit4;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.operations.common.SyncOperation;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertNull;
/**
* Tests related to file operations
*/
@RunWith(AndroidJUnit4.class)
public class FileIT extends AbstractIT {
@Test
public void testCreateFolder() {
String path = "/testFolder/";
// folder does not exist yet
assertNull(getStorageManager().getFileByPath(path));
SyncOperation syncOp = new CreateFolderOperation(path, true);
RemoteOperationResult result = syncOp.execute(client, getStorageManager());
assertTrue(result.isSuccess());
assertTrue(result.toString(), result.isSuccess());
// folder exists
assertTrue(getStorageManager().getFileByPath(path).isFolder());
// cleanup
new RemoveFileOperation(path, false, account, false, context).execute(client, getStorageManager());
}
@Test
@@ -40,9 +46,12 @@ public class FileIT extends AbstractIT {
SyncOperation syncOp = new CreateFolderOperation(path, true);
RemoteOperationResult result = syncOp.execute(client, getStorageManager());
assertTrue(result.isSuccess());
assertTrue(result.toString(), result.isSuccess());
// folder exists
assertTrue(getStorageManager().getFileByPath(path).isFolder());
// cleanup
new RemoveFileOperation("/testFolder/", false, account, false, context).execute(client, getStorageManager());
}
}
@@ -1,16 +1,19 @@
package com.owncloud.android;
import android.support.test.runner.AndroidJUnit4;
import com.owncloud.android.db.OCUpload;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import static junit.framework.TestCase.assertTrue;
/**
* Tests related to file uploads
*/
@@ -19,18 +22,54 @@ import org.junit.runner.RunWith;
public class UploadIT extends AbstractIT {
@Test
public void testSimpleUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/123.txt",
"/testUpload/1.txt", account.name);
public void testEmptyUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/empty.txt",
"/testUpload/empty.txt", account.name);
RemoteOperationResult result = testUpload(ocUpload);
assertTrue(result.toString(), result.isSuccess());
// cleanup
new RemoveFileOperation("/testUpload/", false, account, false, context).execute(client, getStorageManager());
}
@Test
public void testNonEmptyUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/nonEmpty.txt",
"/testUpload/nonEmpty.txt", account.name);
RemoteOperationResult result = testUpload(ocUpload);
assertTrue(result.toString(), result.isSuccess());
// cleanup
new RemoveFileOperation("/testUpload/", false, account, false, context).execute(client, getStorageManager());
}
@Test
public void testChunkedUpload() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/chunkedFile.txt",
"/testUpload/chunkedFile.txt", account.name);
RemoteOperationResult result = testUpload(ocUpload);
assertTrue(result.toString(), result.isSuccess());
// cleanup
new RemoveFileOperation("/testUpload/", false, account, false, context).execute(client, getStorageManager());
}
public RemoteOperationResult testUpload(OCUpload ocUpload) {
UploadFileOperation newUpload = new UploadFileOperation(
account,
null,
ocUpload,
false,
FileUploader.LOCAL_BEHAVIOUR_COPY,
context,
false,
false
account,
null,
ocUpload,
false,
FileUploader.LOCAL_BEHAVIOUR_COPY,
context,
false,
false
);
newUpload.addRenameUploadListener(() -> {
// dummy
@@ -38,13 +77,12 @@ public class UploadIT extends AbstractIT {
newUpload.setRemoteFolderToBeCreated();
RemoteOperationResult result = newUpload.execute(client, getStorageManager());
assertTrue(result.isSuccess());
return newUpload.execute(client, getStorageManager());
}
@Test
public void testUploadInNonExistingFolder() {
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/123.txt",
OCUpload ocUpload = new OCUpload(FileStorageUtils.getSavePath(account.name) + "/empty.txt",
"/testUpload/2/3/4/1.txt", account.name);
UploadFileOperation newUpload = new UploadFileOperation(
account,
@@ -63,6 +101,9 @@ public class UploadIT extends AbstractIT {
newUpload.setRemoteFolderToBeCreated();
RemoteOperationResult result = newUpload.execute(client, getStorageManager());
assertTrue(result.isSuccess());
assertTrue(result.toString(), result.isSuccess());
// cleanup
new RemoveFileOperation("/testUpload/", false, account, false, context).execute(client, getStorageManager());
}
}
@@ -1,4 +1,4 @@
/**
/*
* ownCloud Android client application
*
* @author David A. Velasco
@@ -21,13 +21,14 @@
package com.owncloud.android.datamodel;
import android.os.Parcel;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -77,21 +78,20 @@ public class OCFileUnitTest {
mFile.setFileId(ID);
mFile.setParentId(PARENT_ID);
mFile.setStoragePath(STORAGE_PATH);
mFile.setMimetype(MIME_TYPE);
mFile.setMimeType(MIME_TYPE);
mFile.setFileLength(FILE_LENGTH);
mFile.setCreationTimestamp(CREATION_TIMESTAMP);
mFile.setModificationTimestamp(MODIFICATION_TIMESTAMP);
mFile.setModificationTimestampAtLastSyncForData(MODIFICATION_TIMESTAMP_AT_LAST_SYNC_FOR_DATA);
mFile.setLastSyncDateForProperties(LAST_SYNC_DATE_FOR_PROPERTIES);
mFile.setLastSyncDateForData(LAST_SYNC_DATE_FOR_DATA);
mFile.setAvailableOffline(true);
mFile.setEtag(ETAG);
mFile.setShareViaLink(true);
mFile.setShareWithSharee(true);
mFile.setSharedViaLink(true);
mFile.setSharedWithSharee(true);
mFile.setPublicLink(PUBLIC_LINK);
mFile.setPermissions(PERMISSIONS);
mFile.setRemoteId(REMOTE_ID);
mFile.setNeedsUpdateThumbnail(true);
mFile.setUpdateThumbnailNeeded(true);
mFile.setDownloading(true);
mFile.setEtagInConflict(ETAG_IN_CONFLICT);
@@ -119,16 +119,14 @@ public class OCFileUnitTest {
);
assertThat(fileReadFromParcel.getLastSyncDateForProperties(), is(LAST_SYNC_DATE_FOR_PROPERTIES));
assertThat(fileReadFromParcel.getLastSyncDateForData(), is(LAST_SYNC_DATE_FOR_DATA));
assertThat(fileReadFromParcel.isAvailableOffline(), is(true));
assertThat(fileReadFromParcel.getEtag(), is(ETAG));
assertThat(fileReadFromParcel.isSharedViaLink(), is(true));
assertThat(fileReadFromParcel.isSharedWithSharee(), is(true));
assertThat(fileReadFromParcel.getPublicLink(), is(PUBLIC_LINK));
assertThat(fileReadFromParcel.getPermissions(), is(PERMISSIONS));
assertThat(fileReadFromParcel.getRemoteId(), is(REMOTE_ID));
assertThat(fileReadFromParcel.needsUpdateThumbnail(), is(true));
assertThat(fileReadFromParcel.isUpdateThumbnailNeeded(), is(true));
assertThat(fileReadFromParcel.isDownloading(), is(true));
assertThat(fileReadFromParcel.getEtagInConflict(), is(ETAG_IN_CONFLICT));
}
}
@@ -3,9 +3,6 @@ package com.owncloud.android.datamodel;
import android.accounts.Account;
import android.content.ContentResolver;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import com.owncloud.android.db.OCUpload;
@@ -17,6 +14,10 @@ import org.junit.runner.RunWith;
import java.io.File;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
/**
* Created by JARP on 6/7/17.
*/
@@ -22,8 +22,6 @@
package com.owncloud.android.util;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.test.runner.AndroidJUnit4;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
@@ -50,7 +48,10 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import static android.support.test.InstrumentationRegistry.getInstrumentation;
import androidx.annotation.RequiresApi;
import androidx.test.runner.AndroidJUnit4;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
-1
View File
@@ -14,6 +14,5 @@
<application
android:testOnly="false"
android:allowBackup="false"
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>
@@ -0,0 +1,18 @@
La versió lliure i llicenciada com a \"copyleft\" de l'app de Nextcloud per a Android us dona llibertat de moviment.
Característiques:\* Fàcil, interfície moderna, associada a l'aspecte del vostre servidor
* Pugeu fitxers al vostre servidor Nextcloud
* Compartiu-los amb d'altres
* Mantingueu els vostres fitxers i carpetes preferits sincronitzats
* Cerqueu a través de totes les carpetes del vostre servidor
* Pujada automàtica de les fotos i vídeos fets des del vostre dispositiu
* Mantingueu les notificacions actualitzades
* Suport per a multi-usuari
* Accés segur a les vostres dades a través d'empremta digital o PIN
* Integració amb DAVdroid per una configuració senzilla del calendari & i sincronització de contactes
Si us plau informeu de totes les incidències a https://github.com/nextcloud/android/issues i debateu sobre aquesta app a https://help.nextcloud.com/c/clients/android
Nou a Nextcloud? Nextcloud és un servidor de comunicacions per a mantenir fitxers privats sincronitzats i compartir &. És programari lliure i podeu allotjar-los vos mateix o pagar a una empresa perquè ho faci per a vos. D'aquesta manera, teniu el control de les vostres fotos, calendaris i dades dels contactes, els vostres documents i tota la resta.
Proveu Nextcloud a https://nextcloud.com
@@ -0,0 +1 @@
L'app de Nextcloud per a Android demana dona accés mòbil per a tots els fitxers
@@ -0,0 +1 @@
Nextcloud
@@ -1,19 +1,19 @@
Svobodná (copyleft) aplikace Nextcloud pro Android, poskytující mobilní svobodu.
Svobodně licencovaná Nexcloud Android aplikace, dávající vám mobilní svobodu.
Funkce:
* Snadno použitelné moderní rozhraní, hodící se k vzhledu vašeho serveru
* Nahrávání souborů na Nextcloud server
* Jejich sdílení s ostatními
* Synchronizace vašich oblíbených souborů a složek
* Hledání napříč všemi složkami na serveru
* Automatické nahrávání fotek a videí pořízených vaším zařízením
* Doručování oznámení
* Podpora vícero účtů
* Snadno použitelné moderní rozhraní, přizpůsobené vzhledu, používaném na vašem serveru
* Nahrávejte soubory na svůj Nextcloud server
* Sdílejte je s ostatními
* Udržujte své oblíbené soubory a složky synchronizované
* Hledejte napříč všemi složkami na svém serveru
* Automaticky nahrávejte své fotky a videa, pořízená zařízením
* Udržujte si přehled pomocí oznámení
* Podporuje vícero účtů
* Zabezpečený přístup k vašim datům pomocí otisku prstu nebo PIN kódu
* Začlenění DAVdroid pro snadný přístup ke kalendáři & Synchronizace kontaktů
* Napojení na DAVx5 (dříve známé pod názvem DAVdroid) pro snadné nastavení synchronizace kalendáře a kontaktů
Jakékoli problémy prosím hlaste na https://github.com/nextcloud/android/issues a o aplikaci diskutujte na https://help.nextcloud.com/c/clients/android
Veškeré nalezené problémy hlaste na https://github.com/nextcloud/android/issues a diskutujte o aplikaci na https://help.nextcloud.com/c/clients/android
Noví v Nextcloud? Nextcloud je server pro soukromou synchronizaci souborů &, sdílení a komunikaci. Je to svobodný software a můžete ho buď provozovat sami nebo pronajímat od společnosti. Tím vy vládnete svým fotkám, údajům v kalendáři a kontaktech, dokumentům a všemu ostatnímu.
Noví v Nextcloud? Nextcloud je soukromý server pro synchronizaci souborů a jejich sdílení, dále pro komunikaci. Jedná se o svobodný software a můžete ho hostovat svými silami nebo za to zaplatit nějaké společnosti. Tím máte pod kontrolou své fotky, kalendář a kontakty, dokumenty a vše ostatní.
Podívejte se na Nextcloud na https://nextcloud.com
@@ -1 +1 @@
Aplikace Nextcloud pro Android ti nabízí přístup ke všem souborům ve tvém Nextcl
Aplikace Nextcloud pro Android poskytuje přístup ke všem souborům na vašem Nextc
@@ -0,0 +1,19 @@
Nextcloud Android app copylefted libre, giver mobil frihed.
Fremviser:
* Nem, moderne brugerflade, tilpasset til din servers tema
* Send filer til din Nextcloud server
* Del dem med andre
* Hold dine favorit filer og mapper i sync
* Søg henover alle foldere på din server
* Auto Upload photos og videoer taget med din device
* Hold dig opdateret med notifikationer
* Understøttelse af multiple konti
* Sikret tilgang til dine data med fingeraftryk eller PIN
* Integration med DAVx5 (tidligere kendt som DAVdroid) for let adgang til kalender & kontakt synkronisering
Venligst rapporter alle problemer på https://github.com/nextcloud/android/issues og diskuter denne app på https://help.nextcloud.com/c/clients/android
Ny på Nextcloud? Nextcloud er en privat fil synkronisering & dele og kommunikationsserver. Det er fri software, og du kan være din egen vært eller betale et firma for at være vært for dig. På den måde har du kontrol over dine photos, din kalender og kontakt data, dine dokumenter og alt det andet.
Tjek Nextcloud på https://nextcloud.com
@@ -0,0 +1 @@
Nextcloud Android appen giver mobil adgang til alle filer på din Nextcloud.
@@ -0,0 +1 @@
Nextcloud
@@ -1,19 +1,19 @@
Die Open Source Nextcloud Android App erlaubt Ihnen Zugriff auf alle Dateien in Ihrer Nextcloud.
Eigenschaften:
* Einfache, moderne Oberfläche
* Einfache, moderne an Ihr Theme angepasste Oberfläche
* Laden Sie Ihre Dateien auf Ihren Nextcloud Server
* Teilen Sie Ihre Dateien mit anderen
* Wichtige Dateien und Verzeichnisse können aktuell gehalten werden
* Halten Sie Ihre favorisierten Dateien und Verzeichnisse synchron
* Suche über alle Ordner auf Ihrem Server
* Automatisches Hochladen von Photos und Videos von Ihrem Gerät
* Automatisches Hochladen von Fotos und Videos von Ihrem Gerät
* Bleiben Sie auf dem Laufenden durch Benachrichtigungen
* Mehrere Konten gleichzeitig
* Geschützter Zugriff durch Fingerabdruck oder PIN
* Integration mit DAVdroid für einfaches Konfigurieren von Kalender & Kontakte Synchronisierung
* Integration mit DAVx5 (zuvor DAVdroid) für einfaches Konfigurieren der Kalender- & Kontakte-Synchronisation
Bitte melden Sie alle Probleme unter https://github.com/nextcloud/android/issues oder diskutieren Sie über die App auf https://help.nextcloud.com/c/clients/android
Was ist die Nextcloud? Die Nextcloud ist ein privater Dateiaustausch & -synchronisierungs Server. Nextcloud ist Open Source und kann auf einem eigenen Server installiert werden. So behalten Sie die Kontrolle über Ihre Fotos, Ihre Kalender und Kontakte, Ihre Dokumente und alle anderen Daten.
Schauen Sie sich Nextcloud unter https://nextcloud.com an.
Schauen Sie sich Nextcloud an unter https://nextcloud.com.
@@ -10,7 +10,7 @@ Features:
* Keep up to date with notifications
* Multi-account support
* Secure access to your data with fingerprint or PIN
* Integration with DAVdroid for easy setup of calendar & Contacts synchronization
* Integration with DAVx5 (formerly known as DAVdroid) for easy setup of calendar & Contacts synchronization
Please report all issues at https://github.com/nextcloud/android/issues and discuss this app at https://help.nextcloud.com/c/clients/android
@@ -1,4 +1,4 @@
La app copyleft de software libre Nextcloud para Android te da libertad móvil.
La app (copyleft y software libre) Nextcloud para Android te da libertad móvil.
Características
* Interfaz sencilla y moderna, adaptada al tema de tu servidor
@@ -10,7 +10,7 @@ Características
* Mantente al tanto de todo mediante las notificaciones
* Soporte de múltiples cuentas
* Acceso seguro a tus datos con huella dactilar o PIN
* Integración con DAVdroid para configurar fácilmente la sincronización de calendarios y contactos
* Integración con DAVx5 (antes conocido como DAVdroid) para configurar fácilmente la sincronización de calendarios y contactos
Por favor, informa de todos los problemas en https://github.com/nextcloud/android/issues y discute la app en https://help.nextcloud.com/c/clients/android
@@ -9,7 +9,7 @@ Fonctionnalitées :
* Rester à jour avec vos notifications
* Utilisation de plusieurs comptes
* Accès sécurisé à vos données avec votre empreinte digitale ou code PIN
* Intégration avec DAVdroid pour une synchronisation facile des contacts & agenda
* Intégration avec DAVx5 (autrefois connu comme DAVdroid) pour une synchronisation facile des contacts & agenda
S'il vous plait, rapporter les bogues à l'adresse suivante : https://github.com/nextcloud/android/issues et parler de cette application à l'adresse suivante : https://help.nextcloud.com/c/clients/android
@@ -8,7 +8,7 @@ L'applicazione libera e priva di copyright per Android di Nextcloud ti offre lib
* Tieniti aggiornato con le notifiche
* Supporto di più account
* Proteggi l'accesso ai tuoi dati con impronta digitale o PIN
* Integrazione con DAVdroid per una facile configurazione della sincronizzazione di calendari e contatti
* Integrazione con DAVx5 (conosciuto originariamente come DAVdroid) per una facile configurazione della sincronizzazione di calendari e contatti
Segnala tutti i problemi su https://github.com/nextcloud/android/issues e discuti questa applicazione su https://help.nextcloud.com/c/clients/android
@@ -0,0 +1 @@
Nextcloud Android programėlė suteikia jums mobiliąją prieigą prie jūsų visų Next
@@ -0,0 +1 @@
Nextcloud
@@ -10,10 +10,10 @@ Functies:
* Blijf op de hoogte met notificaties
* Ondersteuning voor meerdere accounts en servers
* Beveilig toegang tot je gegevens met vingerafdruk of pincode
* Integratie met DAVdroid voor makkelijk synchroniseren van je kalender & contacten
* Integratie met DAVx5 (vroeger bekend als DAVdroid) voor makkelijk synchroniseren van je kalender & contacten
Meld alsjeblieft alle bugs en problemen op https://github.com/nextcloud/android/issues en doe je zegje over deze app in ons forum https://help.nextcloud.com/c/clients/android
Nieuw bij Nextcloud? Nextcloud is je persoonlijke bestanden- en communicatieserver. Het is volledig open source en je kunt het zelf hosten of een bedrijf betalen om dat voor je te doen. Zo heb je volledige controle over je foto's, kalender, adresboek, document en al het andere.
Nieuw bij Nextcloud? Nextcloud is een privé bestanden- en communicatieserver. Het is volledig open source en je kunt het zelf hosten of een bedrijf betalen om dat voor je te doen. Zo heb je volledige controle over je foto's, kalender, adresboek, document en al het andere.
Check Nextcloud op https://nextcloud.com
@@ -1,14 +1,19 @@
Oparta na Open Source aplikacja Nexcloud Android umożliwia dostęp do wszystkich twoich plików w Nextcloud.
Rozpowszechniana bez ograniczeń aplikacja NextCloud (Android), zapewniająca mobilną swobodę.
Funkcje:
* Prosty i nowoczesny wygląd
* Wysyłaj swoje pliki na swój serwer Nextcloud* Dawaj innym dostęp do twoich plików
* Synchronizuj wybrane pliki i katalogi z serwerem
* Automatycznie wysyłaj zdjęcia i filmy robione urządzeniem
* Wsparcie dla wielu kont
* Łatwy, nowoczesny interfejs, dostosowany do motywu serwera
* Wysyłanie plików na serwer NextCloud
* Udostępnianie ich innym użytkownikom
* Synchronizacja Twoich ulubionych plików i katalogów
* Przeszukiwanie wszystkich katalogów na serwerze
* Automatyczne wysyłanie na serwer zdjęć i filmów
* Otrzymywanie powiadomień na bierząco
* Obsługa wielu kont
* Bezpieczny dostęp do danych za pomocą odcisku palca lub PIN
* Integracja z DAVx5 (dawniej DAVdroid), aby łatwiej skonfigurować kalendarz& synchronizację kontaktów
Zgłaszaj błędy na https://github.com/nextcloud/android/issues i dyskutuj na temat tej aplikacji na https://help.nextcloud.com/c/clients/android
Wszelkie problemy z aplikacją proszę zgłaszać do Nextcloud https://github.com/nextcloud/android/issues, forum dyskusyjne dla aplikacji znajduje się na https://help.nextcloud.com/c/clients/android
Nie znasz jeszcze Nextcloud? Nextcloud jest prywatnym serwerem synchronizacji & współdzielenia plików oraz komunikacji. Jego źródła są całkowicie otwarte, więc możesz korzystać z niego na własnym serwerze albo możesz zapłacić za to firmie trzeciej. W ten sposób kontrolujesz swoje zdjęcia, kalendarz, dane kontaktowe, twoje dokumenty i inne dane.
Nowy Nextcloud zapewnia poufną synchronizację danych& udostępnianie plików oraz komunikację. Jest darmowym oprogramowaniem, które możesz wykorzystać samodzielnie lub zlecić odpłatnie instalację firmie, która zrobi to za Ciebie. Dzięki temu posiadasz pełną kontrolę nad swoimi zdjęciami, kalendarzem, kontaktami, dokumentami i pozostałymi poufnymi danymi.
Zobacz Nextcloud na https://nextcloud.com
Wypróbuj Nextcloud https://nextcloud.com
@@ -1 +1 @@
Przy użyciu aplikacji mobilnej Nextcloud na Android'a uzyskasz dostęp do wszystk
Aplikacja Nextcloud dla Androida zapewnia mobilny dostęp do plików na serwerze.
@@ -1,19 +1,19 @@
O aplicativo de código aberto Nextcloud, lhe dá liberdade móvel.
O aplicativo de código aberto Nextcloud para Android oferece liberdade móvel.
Recursos:
Características:
* Interface fácil e moderna, adequada ao tema do seu servidor
* Envio de arquivos para seu servidor Nextcloud
* Compartilhá-los com outros
* Manter seus arquivos e pastas favoritos sincronizados
* Pesquisa em todas as pastas no seu servidor
* Envio automático de fotos e vídeos tirados pelo seu dispositivo
* Manter-se atualizado com notificações
* Suporte a múltiplas contas
* Acesso seguro aos seus dados com impressão digital ou PIN
* Integração com o DAVdroid para fácil configuração da sincronização do Calendário & Contatos
* Envia arquivos para o servidor Nextcloud
* Compartilha com outras pessoas
* Mantém seus arquivos e pastas favoritas sincronizados
* Pesquisa em todas as pastas do servidor
* Envio automático de fotos e vídeos feitos pelo seu dispositivo
* Atualiza-se com as notificações
* Suporte a várias contas
* Acesso seguro aos seus dados com impressão digital ou PIN
* Integração com o DAVx5 (conhecido como DAVdroid) para facilitar a sincronização do calendário & contatos
Informe todos os problemas em https://github.com/nextcloud/android/issues e discuta este aplicativo em https://help.nextcloud.com/c/clients/android
Reporte qualquer problema em https://github.com/nextcloud/android/issues e fale sobre este aplicativo em https://help.nextcloud.com/c/clients/android
Novo para Nextcloud? Nextcloud é um servidor privado de comunicação, sincronismo & compartilhamento. É um software livre e você mesmo pode hospedá-lo ou pagar uma empresa para fazê-lo. Dessa forma, você controla suas fotos, calendários e dados de contato, seus documentos e tudo mais.
É novo para o Nextcloud? Nextcloud é um servidor privado de comunicação & compartilhamento. É software livre e você pode auto-hospedá-lo ou pagar uma empresa para fazer isso. Dessa forma, você está no controle de suas fotos, calendário, dados de contato, documentos e tudo mais.
Saiba mais sobre o Nextcloud em https://nextcloud.com
Saiba mais em https://nextcloud.com
@@ -0,0 +1,19 @@
A aplicação Open Source Nextcloud para Android, dá-lhe liberdade móvel.
Funcionalidades:
* Fácil, interface moderna, adaptado ao tema do seu servidor
* Envie ficheiros para o seu servidor Nextcloud
* Partilhe-os com outras pessoas
* Mantenha os seus ficheiros e pastas favoritos sincronizados
* Pesquise através de todas as pastas no seu servidor
* Envio automático de fotos e vídeos capturados pelo seu dispositivo
* Mantenha-se actualizado com notificações
* Suporte para várias contas
* Aceda aos seus dados de forma segura usando a impressão digital ou PIN
* Integração com DAVx5 (anteriormente conhecido como DAVdroid) para configuração fácil do Calendário & sincronização de Contactos
Por favor, reporte todos os problemas em https://github.com/nextcloud/android/issues e discuta sobre esta aplicação em https://help.nextcloud.com/c/clients/android
A Nextcloud é um servidor privado de comunicação, sincronização & partilha de ficheiros. É Open Source, e pode ser hospedado por si ou pagar a uma empresa para o fazer. Assim, está sob o controlo das suas fotos, calendário e dados de contacto, dos seus documentos e de tudo o resto.
Dê uma vista de olhos no Nextcloud em: https://nextcloud.com
@@ -0,0 +1 @@
A aplicação Nextcloud para Android permite acesso móvel a todos os ficheiros no
@@ -0,0 +1 @@
Nextcloud
@@ -1,4 +1,4 @@
Некстклауд андроид апликација отвореног кода омогућава приступ свим фајловима на Вашем Некстклауд серверу, дајући Вам мобилну слободу.
Некстклауд андроид апликација отвореног кода Вам даје мобилну слободу.
Особине:
* Лако и модерно сучеље, потпуно усклађено са темом са сервера
* Отпремање фајлова на Некстклауд сервер
@@ -9,10 +9,10 @@
* Обавештења са сервера
* Подршка за више налога
* Безбедан приступ свим подацима преко отиска прста или пина
* Интеграција са ДАВдроидом за брзо подешавање синхронизације календара & контаката
* Интеграција са DAVx5-ом (раније знаном и као ДАВдроид) за брзо подешавање синхронизације календара & контаката
Све проблеме можете да пријавите на https://github.com/nextcloud/android/issues а о апликацији дискутујте на https://help.nextcloud.com/c/clients/android
Нови сте на Некстклауду? Некстклауд је лични сервер за синхронизацију, дељење фајлова & комуникацију. Потпуно је отвореног кода и можете да га сами хостовати или платити компанији да која то већ ради. На овај начин, сами контролишете своје слике, календаре, контакате, документа и све остало.
Нови сте на Некстклауду? Некстклауд је лични сервер за синхронизацију, дељење фајлова & комуникацију. Потпуно је отвореног кода и можете да га сами хостовати или платити компанији да то ради за Вас. На овај начин, сами контролишете своје слике, календаре, контакте, документа и све остало.
Погледајте Некстклауд на https://nextcloud.com
@@ -0,0 +1 @@
Nextcloud Android-appen ger mobilåtkomst till alla filer på ditt Nextcloud.
@@ -0,0 +1 @@
Nextcloud
@@ -9,7 +9,7 @@ Copyleft Nextcloud Android uygulaması, Nextcloud üzerindeki tüm dosyalarını
* Bildirimler ile güncel kalma
* Birden çok hesap desteği
*Parmak izi ya da PIN kodu ile verilerinize güvenli erişme
* Davdroid bütünleştirmesi ile takvim ve kişileri eşitleme
* DAVx5 (eski adı DAVdroid) bütünleştirmesi ile takvim ve kişileri eşitleme
Kullanımda karşılaşabileceğiniz hataları https://github.com/nextcloud/android/issues adresinden bildirebilir, uygulama hakkındaki konuları https://help.nextcloud.com/c/clients/android adresinde tartışabilirsiniz
@@ -24,7 +24,7 @@ import android.content.Context;
import com.owncloud.android.MainApp;
import com.owncloud.android.datamodel.SignatureVerification;
import com.owncloud.android.db.PreferenceManager;
import com.nextcloud.client.preferences.PreferenceManager;
import java.security.Key;
+1 -6
View File
@@ -84,12 +84,7 @@
<service
android:name="com.evernote.android.job.gcm.PlatformGcmService"
android:enabled="true"
android:exported="true"
android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
tools:replace="android:enabled">
<intent-filter>
<action android:name="com.google.android.gms.gcm.ACTION_TASK_READY"/>
</intent-filter>
tools:node="remove">
</service>
</application>
@@ -23,9 +23,9 @@ import android.text.TextUtils;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
import com.nextcloud.client.preferences.PreferenceManager;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.utils.PushUtils;
public class NCFirebaseInstanceIDService extends FirebaseInstanceIdService {
@@ -29,13 +29,13 @@ import android.util.Base64;
import android.util.Log;
import com.google.gson.Gson;
import com.nextcloud.client.preferences.PreferenceManager;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.PushConfigurationState;
import com.owncloud.android.datamodel.SignatureVerification;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
@@ -395,19 +395,11 @@ public final class PushUtils {
PreferenceManager.setKeysMigration(context, true);
} else {
if (oldPrivateKeyFile.exists()) {
try {
FileStorageUtils.moveFile(oldPrivateKeyFile, privateKeyFile);
} catch (IOException e) {
Log.e(TAG, "Failed to move old private key to new location");
}
FileStorageUtils.moveFile(oldPrivateKeyFile, privateKeyFile);
}
if (oldPublicKeyFile.exists()) {
try {
FileStorageUtils.moveFile(oldPublicKeyFile, publicKeyFile);
} catch (IOException e) {
Log.e(TAG, "Failed to move old public key to new location");
}
FileStorageUtils.moveFile(oldPublicKeyFile, publicKeyFile);
}
if (privateKeyFile.exists() && publicKeyFile.exists()) {
-1
View File
@@ -10,7 +10,6 @@
<string name="google_app_id" translatable="false">1:829118773643:android:512449826e931d0e</string>
<string name="google_crash_reporting_api_key" translatable="false">AIzaSyAWIyOcLafaFp8PFL61h64cy1NNZW2cU_s</string>
<string name="google_storage_bucket" translatable="false">nextcloud-a7dea.appspot.com</string>
<string name="project_id" translatable="false">nextcloud-a7dea</string>
</resources>
+78 -7
View File
@@ -52,6 +52,8 @@
<!-- WRITE_EXTERNAL_STORAGE may be enabled or disabled by the user after installation in
API >= 23; the app needs to handle this -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Next permissions are always approved in installation time, the apps needs to do nothing special in runtime -->
<uses-permission android:name="android.permission.INTERNET" />
@@ -64,8 +66,13 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<!-- Apps that target Android 9 (API level 28) or higher and use foreground services
must request the FOREGROUND_SERVICE permission -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-sdk tools:overrideLibrary="com.blikoon.qrcodescanner" />
<application
android:name=".MainApp"
@@ -79,6 +86,11 @@
android:installLocation="internalOnly"
android:manageSpaceActivity="com.owncloud.android.ui.activity.ManageSpaceActivity"
tools:ignore="UnusedAttribute">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<activity
android:name=".ui.activity.FileDisplayActivity"
android:launchMode="singleTop"
@@ -103,13 +115,18 @@
<activity android:name=".ui.activities.ActivitiesActivity"
android:configChanges="orientation|screenSize|keyboardHidden" />
<activity android:name=".ui.activity.SyncedFoldersActivity"/>
<receiver android:name="com.owncloud.android.jobs.MediaFoldersDetectionJob$NotificationReceiver" />
<receiver android:name="com.owncloud.android.jobs.NotificationJob$NotificationReceiver" />
<activity android:name=".ui.activity.UploadFilesActivity" />
<activity android:name=".ui.activity.ExternalSiteWebView"
android:configChanges="orientation|screenSize|keyboardHidden" />
<activity
android:name=".ui.activity.RichDocumentsWebView"
android:configChanges="orientation|screenSize|keyboardHidden"/>
<activity android:name=".ui.activity.ContactsPreferenceActivity"
android:launchMode="singleInstance"/>
<activity android:name=".ui.activity.ReceiveExternalFilesActivity"
android:taskAffinity=""
android:excludeFromRecents="true"
android:theme="@style/Theme.ownCloud.NoActionBar">
@@ -125,7 +142,7 @@
</intent-filter>
</activity>
<activity
android:name=".ui.activity.Preferences"
android:name=".ui.activity.SettingsActivity"
android:theme="@style/Theme.ownCloud" >
</activity>
<activity
@@ -171,7 +188,40 @@
android:enabled="true"
android:exported="true"
android:label="@string/sync_string_files"
android:syncable="true" />
android:syncable="true">
<path-permission
android:pathPrefix="/shares"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/capabilities"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/uploads"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/synced_folders"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/external_links"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/arbitrary_data"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/virtual"
android:readPermission="false"
android:writePermission="false" />
<path-permission
android:pathPrefix="/filesystem"
android:readPermission="false"
android:writePermission="false" />
</provider>
<provider
android:name=".providers.UsersAndGroupsSearchProvider"
@@ -194,7 +244,7 @@
<!-- new provider used to generate URIs without file:// scheme (forbidden from Android 7) -->
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="@string/file_provider_authority"
android:grantUriPermissions="true"
android:exported="false">
@@ -228,11 +278,24 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".authentication.DeepLinkLoginActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="true"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:theme="@style/Theme.ownCloud.noActionBar.Login">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/login_data_own_scheme" android:host="login"/>
<data
android:host="login"
android:scheme="@string/login_data_own_scheme" />
</intent-filter>
</activity>
@@ -242,10 +305,12 @@
<service android:name=".media.MediaService" />
<activity android:name=".ui.activity.PassCodeActivity" />
<activity android:name=".ui.activity.RequestCredentialsActivity" />
<activity
android:name=".ui.activity.RequestCredentialsActivity"
android:launchMode="singleTask" />
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
<activity android:name=".ui.activity.LogHistoryActivity"/>
<activity android:name=".ui.errorhandling.ErrorShowActivity" />
@@ -277,6 +342,12 @@
<activity
android:name=".ui.activity.FolderPickerActivity"
android:label="@string/app_name" />
<activity
android:name=".ui.activity.FilePickerActivity"
android:label="@string/app_name"
android:theme="@style/Theme.ownCloud.Dialog.NoTitle"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".ui.activity.UploadPathActivity"
android:label="@string/app_name" />
@@ -20,6 +20,8 @@ package com.nextcloud.android.sso.aidl;
// Declare the interface.
interface IInputStreamService {
ParcelFileDescriptor performNextcloudRequest(in ParcelFileDescriptor input);
ParcelFileDescriptor performNextcloudRequestAndBodyStream(in ParcelFileDescriptor input,
in ParcelFileDescriptor requestBodyParcelFileDescriptor);
}
ParcelFileDescriptor performNextcloudRequest(in ParcelFileDescriptor input);
}
@@ -26,8 +26,10 @@ import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Binder;
import android.os.ParcelFileDescriptor;
import android.text.TextUtils;
import android.util.Log;
import com.nextcloud.android.sso.aidl.IInputStreamService;
@@ -41,21 +43,32 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.utils.EncryptionUtils;
import org.apache.commons.httpclient.HttpConnection;
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.HttpState;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.DeleteMethod;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.jackrabbit.webdav.DavConstants;
import org.apache.jackrabbit.webdav.client.methods.MkColMethod;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import static com.nextcloud.android.sso.Constants.EXCEPTION_ACCOUNT_NOT_FOUND;
@@ -96,9 +109,16 @@ public class InputStreamBinder extends IInputStreamService.Stub {
}
public ParcelFileDescriptor performNextcloudRequest(ParcelFileDescriptor input) {
return performNextcloudRequestAndBodyStream(input, null);
}
public ParcelFileDescriptor performNextcloudRequestAndBodyStream(ParcelFileDescriptor input,
ParcelFileDescriptor requestBodyParcelFileDescriptor) {
// read the input
final InputStream is = new ParcelFileDescriptor.AutoCloseInputStream(input);
final InputStream requestBodyInputStream = requestBodyParcelFileDescriptor != null ?
new ParcelFileDescriptor.AutoCloseInputStream(requestBodyParcelFileDescriptor) : null;
Exception exception = null;
InputStream httpStream = new InputStream() {
@Override
@@ -106,22 +126,28 @@ public class InputStreamBinder extends IInputStreamService.Stub {
return 0;
}
};
try {
// Start request and catch exceptions
NextcloudRequest request = deserializeObjectAndCloseStream(is);
httpStream = processRequest(request);
httpStream = processRequest(request, requestBodyInputStream);
} catch (Exception e) {
Log_OC.e(TAG, e.getMessage());
Log_OC.e(TAG, "Error during Nextcloud request", e);
exception = e;
}
try {
// Write exception to the stream followed by the actual network stream
InputStream exceptionStream = serializeObjectToInputStream(exception);
InputStream resultStream = new java.io.SequenceInputStream(exceptionStream, httpStream);
InputStream resultStream;
if (httpStream != null) {
resultStream = new java.io.SequenceInputStream(exceptionStream, httpStream);
} else {
resultStream = exceptionStream;
}
return ParcelFileDescriptorUtil.pipeFrom(resultStream, thread -> Log.d(TAG, "Done sending result"));
} catch (IOException e) {
Log_OC.e(TAG, e.getMessage());
Log_OC.e(TAG, "Error while sending response back to client app", e);
}
return null;
}
@@ -135,7 +161,8 @@ public class InputStreamBinder extends IInputStreamService.Stub {
return new ByteArrayInputStream(baos.toByteArray());
}
private <T extends Serializable> T deserializeObjectAndCloseStream(InputStream is) throws IOException, ClassNotFoundException {
private <T extends Serializable> T deserializeObjectAndCloseStream(InputStream is) throws IOException,
ClassNotFoundException {
ObjectInputStream ois = new ObjectInputStream(is);
T result = (T) ois.readObject();
is.close();
@@ -143,9 +170,88 @@ public class InputStreamBinder extends IInputStreamService.Stub {
return result;
}
public class NCPropFindMethod extends PropFindMethod {
NCPropFindMethod(String uri, int propfindType, int depth) throws IOException {
super(uri, propfindType, new DavPropertyNameSet(), depth);
}
private InputStream processRequest(final NextcloudRequest request) throws UnsupportedOperationException, com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException, OperationCanceledException, AuthenticatorException, IOException {
Account account = AccountUtils.getOwnCloudAccountByName(context, request.getAccountName()); // TODO handle case that account is not found!
@Override
protected void processResponseBody(HttpState httpState, HttpConnection httpConnection) {
// Do not process the response body here. Instead pass it on to client app.
}
}
private HttpMethodBase buildMethod(NextcloudRequest request, Uri baseUri, InputStream requestBodyInputStream)
throws IOException {
String requestUrl = baseUri + request.getUrl();
HttpMethodBase method;
switch (request.getMethod()) {
case "GET":
method = new GetMethod(requestUrl);
break;
case "POST":
method = new PostMethod(requestUrl);
if(requestBodyInputStream != null){
RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream);
((PostMethod) method).setRequestEntity(requestEntity);
}
else if (request.getRequestBody() != null) {
StringRequestEntity requestEntity = new StringRequestEntity(
request.getRequestBody(),
CONTENT_TYPE_APPLICATION_JSON,
CHARSET_UTF8);
((PostMethod) method).setRequestEntity(requestEntity);
}
break;
case "PUT":
method = new PutMethod(requestUrl);
if(requestBodyInputStream != null){
RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream);
((PutMethod) method).setRequestEntity(requestEntity);
}
else if (request.getRequestBody() != null) {
StringRequestEntity requestEntity = new StringRequestEntity(
request.getRequestBody(),
CONTENT_TYPE_APPLICATION_JSON,
CHARSET_UTF8);
((PutMethod) method).setRequestEntity(requestEntity);
}
break;
case "DELETE":
method = new DeleteMethod(requestUrl);
break;
case "PROPFIND":
method = new NCPropFindMethod(requestUrl, DavConstants.PROPFIND_ALL_PROP, DavConstants.DEPTH_1);
if (request.getRequestBody() != null) {
//text/xml; charset=UTF-8 is taken from XmlRequestEntity... Should be application/xml
StringRequestEntity requestEntity = new StringRequestEntity(
request.getRequestBody(),
"text/xml; charset=UTF-8",
CHARSET_UTF8);
((PropFindMethod) method).setRequestEntity(requestEntity);
}
break;
case "MKCOL":
method = new MkColMethod(requestUrl);
break;
default:
throw new UnsupportedOperationException(EXCEPTION_UNSUPPORTED_METHOD);
}
return method;
}
private InputStream processRequest(final NextcloudRequest request, final InputStream requestBodyInputStream)
throws UnsupportedOperationException,
com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException,
OperationCanceledException, AuthenticatorException, IOException {
Account account = AccountUtils.getOwnCloudAccountByName(context, request.getAccountName());
if(account == null) {
throw new IllegalStateException(EXCEPTION_ACCOUNT_NOT_FOUND);
}
@@ -156,56 +262,25 @@ public class InputStreamBinder extends IInputStreamService.Stub {
}
// Validate URL
if(request.getUrl().length() == 0 || request.getUrl().charAt(0) != PATH_SEPARATOR) {
throw new IllegalStateException(EXCEPTION_INVALID_REQUEST_URL, new IllegalStateException("URL need to start with a /"));
if (request.getUrl().length() == 0 || request.getUrl().charAt(0) != PATH_SEPARATOR) {
throw new IllegalStateException(EXCEPTION_INVALID_REQUEST_URL,
new IllegalStateException("URL need to start with a /"));
}
OwnCloudClientManager ownCloudClientManager = OwnCloudClientManagerFactory.getDefaultSingleton();
OwnCloudAccount ocAccount = new OwnCloudAccount(account, context);
OwnCloudClient client = ownCloudClientManager.getClientFor(ocAccount, context);
String requestUrl = client.getBaseUri() + request.getUrl();
HttpMethodBase method;
switch (request.getMethod()) {
case "GET":
method = new GetMethod(requestUrl);
break;
case "POST":
method = new PostMethod(requestUrl);
if (request.getRequestBody() != null) {
StringRequestEntity requestEntity = new StringRequestEntity(
request.getRequestBody(),
CONTENT_TYPE_APPLICATION_JSON,
CHARSET_UTF8);
((PostMethod) method).setRequestEntity(requestEntity);
}
break;
case "PUT":
method = new PutMethod(requestUrl);
if (request.getRequestBody() != null) {
StringRequestEntity requestEntity = new StringRequestEntity(
request.getRequestBody(),
CONTENT_TYPE_APPLICATION_JSON,
CHARSET_UTF8);
((PutMethod) method).setRequestEntity(requestEntity);
}
break;
case "DELETE":
method = new DeleteMethod(requestUrl);
break;
default:
throw new UnsupportedOperationException(EXCEPTION_UNSUPPORTED_METHOD);
}
HttpMethodBase method = buildMethod(request, client.getBaseUri(), requestBodyInputStream);
method.setQueryString(convertMapToNVP(request.getParameter()));
method.addRequestHeader("OCS-APIREQUEST", "true");
for(Map.Entry<String, List<String>> header : request.getHeader().entrySet()) {
// https://stackoverflow.com/a/3097052
method.addRequestHeader(header.getKey(), TextUtils.join(",", header.getValue()));
}
client.setFollowRedirects(request.isFollowRedirects());
int status = client.executeMethod(method);
@@ -213,7 +288,20 @@ public class InputStreamBinder extends IInputStreamService.Stub {
if (status >= HTTP_STATUS_CODE_OK && status < HTTP_STATUS_CODE_MULTIPLE_CHOICES) {
return method.getResponseBodyAsStream();
} else {
throw new IllegalStateException(EXCEPTION_HTTP_REQUEST_FAILED, new IllegalStateException(String.valueOf(status)));
StringBuilder total = new StringBuilder();
InputStream inputStream = method.getResponseBodyAsStream();
// If response body is available
if (inputStream != null) {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
String line = reader.readLine();
while (line != null) {
total.append(line).append('\n');
line = reader.readLine();
}
Log_OC.e(TAG, total.toString());
}
throw new IllegalStateException(EXCEPTION_HTTP_REQUEST_FAILED,
new IllegalStateException(String.valueOf(status), new Throwable(total.toString())));
}
}
@@ -227,6 +315,10 @@ public class InputStreamBinder extends IInputStreamService.Stub {
}
private boolean validateToken(String hash, String token) {
if (hash.isEmpty() || !hash.contains("$")) {
throw new IllegalStateException(EXCEPTION_INVALID_TOKEN);
}
String salt = hash.split("\\$")[1]; // TODO extract "$"
String newHash = EncryptionUtils.generateSHA512(token, salt);
@@ -0,0 +1,161 @@
/*
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* Copyright (C) 2019 Chris Narkiewicz, EZ Aquarii
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.nextcloud.client.preferences;
public interface AppPreferences {
boolean instantPictureUploadEnabled();
boolean instantVideoUploadEnabled();
/**
* Gets the selected file extension position the user selected to do the
* last upload of a url file shared from other app.
*
* @return selectedPos the selected file extension position.
*/
int getUploadUrlFileExtensionUrlSelectedPos();
/**
* Saves the selected file extension position the user selected to do the
* last upload of a url file shared from other app.
*
* @param selectedPos the selected file extension position.
*/
void setUploadUrlFileExtensionUrlSelectedPos(int selectedPos);
/**
* Gets the selected map file extension position the user selected to
* do the last upload of a url file shared from other app.
*
* @return selectedPos the selected file extension position.
*/
int getUploadMapFileExtensionUrlSelectedPos();
/**
* Saves the selected map file extension position the user selected to
* do the last upload of a url file shared from other app.
*
* @param selectedPos the selected file extension position.
*/
void setUploadMapFileExtensionUrlSelectedPos(int selectedPos);
/**
* Gets the last local path where the user selected to do an upload from.
*
* @return path Absolute path to a folder, as previously stored by
* {@link #setUploadFromLocalLastPath(String)}, or empty String if never saved before.
*/
String getUploadFromLocalLastPath();
/**
* Saves the path where the user selected to do the last local upload of a file from.
*
* @param path Absolute path to a folder.
*/
void setUploadFromLocalLastPath(String path);
/**
* Gets the path where the user selected to do the last upload of a file shared from other app.
*
* @return path Absolute path to a folder, as previously stored by {@link #setLastUploadPath(String)},
* or empty String if never saved before.
*/
String getLastUploadPath();
/**
* Saves the path where the user selected to do the last upload of a file shared from other app.
*
* @param path Absolute path to a folder.
*/
void setLastUploadPath(String path);
/**
* Gets the auto upload paths flag last set.
*
* @return ascending order the legacy cleaning flag, default is false
*/
boolean isAutoUploadPathsUpdateEnabled();
/**
* Saves the legacy cleaning flag which the user has set last.
*
* @param pathUpdate flag if it is a auto upload path update
*/
void setAutoUploadPathsUpdateEnabled(boolean pathUpdate);
/**
* Gets the auto upload split out flag last set.
*
* @return ascending order the legacy cleaning flag, default is false
*/
boolean isAutoUploadSplitEntriesEnabled();
/**
* Saves the flag for split entries magic
*
* @param splitOut flag if it is a auto upload path update
*/
void setAutoUploadSplitEntriesEnabled(boolean splitOut);
boolean isAutoUploadInitialized();
void setAutoUploadInit(boolean autoUploadInit);
boolean isShowDetailedTimestampEnabled();
void setShowDetailedTimestampEnabled(boolean showDetailedTimestamp);
boolean isShowMediaScanNotifications();
void setShowMediaScanNotifications(boolean showMediaScanNotification);
/**
* Gets the uploader behavior which the user has set last.
*
* @return uploader behavior the uploader behavior
*/
int getUploaderBehaviour();
/**
* Saves the uploader behavior which the user has set last.
*
* @param uploaderBehaviour the uploader behavior
*/
void setUploaderBehaviour(int uploaderBehaviour);
float getGridColumns();
void setGridColumns(float gridColumns);
long getLockTimestamp();
void setLockTimestamp(long timestamp);
/**
* Gets the last seen version code right before updating.
*
* @return grid columns grid columns
*/
int getLastSeenVersionCode();
/**
* Saves the version code as the last seen version code.
*
* @param versionCode the app's version code
*/
void setLastSeenVersionCode(int versionCode);
void removeLegacyPreferences();
}
@@ -3,21 +3,21 @@
*
* @author David A. Velasco
* Copyright (C) 2016 ownCloud Inc.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.db;
package com.nextcloud.client.preferences;
import android.accounts.Account;
import android.content.Context;
@@ -28,7 +28,7 @@ import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.ui.activity.ComponentsGetter;
import com.owncloud.android.ui.activity.Preferences;
import com.owncloud.android.ui.activity.SettingsActivity;
import com.owncloud.android.utils.FileSortOrder;
import static com.owncloud.android.ui.fragment.OCFileListFragment.FOLDER_LAYOUT_LIST;
@@ -36,16 +36,18 @@ import static com.owncloud.android.ui.fragment.OCFileListFragment.FOLDER_LAYOUT_
/**
* Helper to simplify reading of Preferences all around the app
*/
public final class PreferenceManager {
public final class PreferenceManager implements AppPreferences {
/**
* Constant to access value of last path selected by the user to upload a file shared from other app.
* Value handled by the app without direct access in the UI.
*/
private static final String AUTO_PREF__LAST_UPLOAD_PATH = "last_upload_path";
private static final String AUTO_PREF__UPLOAD_FROM_LOCAL_LAST_PATH = "upload_from_local_last_path";
private static final String AUTO_PREF__UPLOAD_FILE_EXTENSION_MAP_URL = "prefs_upload_file_extension_map_url";
private static final String AUTO_PREF__UPLOAD_FILE_EXTENSION_URL = "prefs_upload_file_extension_url";
private static final String AUTO_PREF__UPLOADER_BEHAVIOR = "prefs_uploader_behaviour";
private static final String AUTO_PREF__GRID_COLUMNS = "grid_columns";
private static final String AUTO_PREF__SHOW_DETAILED_TIMESTAMP = "detailed_timestamp";
public static final String AUTO_PREF__LAST_SEEN_VERSION_CODE = "lastSeenVersionCode";
private static final String PREF__INSTANT_UPLOADING = "instant_uploading";
private static final String PREF__INSTANT_VIDEO_UPLOADING = "instant_video_uploading";
@@ -64,8 +66,18 @@ public final class PreferenceManager {
private static final String PREF__AUTO_UPLOAD_INIT = "autoUploadInit";
private static final String PREF__FOLDER_SORT_ORDER = "folder_sort_order";
private static final String PREF__FOLDER_LAYOUT = "folder_layout";
public static final String PREF__LOCK_TIMESTAMP = "lock_timestamp";
private static final String PREF__SHOW_MEDIA_SCAN_NOTIFICATIONS = "show_media_scan_notifications";
private PreferenceManager() {
private final SharedPreferences preferences;
public static AppPreferences fromContext(Context context) {
SharedPreferences prefs = getDefaultSharedPreferences(context.getApplicationContext());
return new PreferenceManager(prefs);
}
PreferenceManager(SharedPreferences preferences) {
this.preferences = preferences;
}
public static void setKeysReInit(Context context) {
@@ -84,12 +96,14 @@ public final class PreferenceManager {
return getDefaultSharedPreferences(context).getString(PREF__PUSH_TOKEN, "");
}
public static boolean instantPictureUploadEnabled(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_UPLOADING, false);
@Override
public boolean instantPictureUploadEnabled() {
return preferences.getBoolean(PREF__INSTANT_UPLOADING, false);
}
public static boolean instantVideoUploadEnabled(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_VIDEO_UPLOADING, false);
@Override
public boolean instantVideoUploadEnabled() {
return preferences.getBoolean(PREF__INSTANT_VIDEO_UPLOADING, false);
}
public static boolean instantPictureUploadPathUseSubfolders(Context context) {
@@ -121,69 +135,44 @@ public final class PreferenceManager {
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("show_hidden_files_pref", false);
}
/**
* Gets the selected file extension position the user selected to do the last upload of a url file shared from other
* app.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return selectedPos the selected file extension position.
*/
public static int getUploadUrlFileExtensionUrlSelectedPos(Context context) {
return getDefaultSharedPreferences(context).getInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_URL, 0);
@Override
public int getUploadUrlFileExtensionUrlSelectedPos() {
return preferences.getInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_URL, 0);
}
/**
* Saves the selected file extension position the user selected to do the last upload of a url file shared from
* other app.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param selectedPos the selected file extension position.
*/
public static void setUploadUrlFileExtensionUrlSelectedPos(Context context, int selectedPos) {
saveIntPreference(context, AUTO_PREF__UPLOAD_FILE_EXTENSION_URL, selectedPos);
@Override
public void setUploadUrlFileExtensionUrlSelectedPos(int selectedPos) {
preferences.edit().putInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_URL, selectedPos).apply();
}
/**
* Gets the selected map file extension position the user selected to do the last upload of a url file shared
* from other app.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return selectedPos the selected file extension position.
*/
public static int getUploadMapFileExtensionUrlSelectedPos(Context context) {
return getDefaultSharedPreferences(context).getInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_MAP_URL, 0);
@Override
public int getUploadMapFileExtensionUrlSelectedPos() {
return preferences.getInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_MAP_URL, 0);
}
/**
* Saves the selected map file extension position the user selected to do the last upload of a url file shared from
* other app.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param selectedPos the selected file extension position.
*/
public static void setUploadMapFileExtensionUrlSelectedPos(Context context, int selectedPos) {
saveIntPreference(context, AUTO_PREF__UPLOAD_FILE_EXTENSION_MAP_URL, selectedPos);
@Override
public void setUploadMapFileExtensionUrlSelectedPos(int selectedPos) {
preferences.edit().putInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_MAP_URL, selectedPos).apply();
}
/**
* Gets the path where the user selected to do the last upload of a file shared from other app.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return path Absolute path to a folder, as previously stored by {@link #setLastUploadPath(Context, String)},
* or empty String if never saved before.
*/
public static String getLastUploadPath(Context context) {
return getDefaultSharedPreferences(context).getString(AUTO_PREF__LAST_UPLOAD_PATH, "");
@Override
public String getUploadFromLocalLastPath() {
return preferences.getString(AUTO_PREF__UPLOAD_FROM_LOCAL_LAST_PATH, "");
}
/**
* Saves the path where the user selected to do the last upload of a file shared from other app.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param path Absolute path to a folder.
*/
public static void setLastUploadPath(Context context, String path) {
saveStringPreference(context, AUTO_PREF__LAST_UPLOAD_PATH, path);
@Override
public void setUploadFromLocalLastPath(String path) {
preferences.edit().putString(AUTO_PREF__UPLOAD_FROM_LOCAL_LAST_PATH, path).apply();
}
@Override
public String getLastUploadPath() {
return preferences.getString(AUTO_PREF__LAST_UPLOAD_PATH, "");
}
@Override
public void setLastUploadPath(String path) {
preferences.edit().putString(AUTO_PREF__LAST_UPLOAD_PATH, path).apply();
}
/**
@@ -193,7 +182,7 @@ public final class PreferenceManager {
* @return lock lock preference value.
*/
public static String getLockPreference(Context context) {
return getDefaultSharedPreferences(context).getString(Preferences.PREFERENCE_LOCK, "");
return getDefaultSharedPreferences(context).getString(SettingsActivity.PREFERENCE_LOCK, "");
}
/**
@@ -203,7 +192,7 @@ public final class PreferenceManager {
* @return useFingerprint is lock via fingerprint preference.
*/
public static boolean isUseFingerprint(Context context) {
return getDefaultSharedPreferences(context).getBoolean(Preferences.PREFERENCE_USE_FINGERPRINT, false);
return getDefaultSharedPreferences(context).getBoolean(SettingsActivity.PREFERENCE_USE_FINGERPRINT, false);
}
/**
@@ -211,7 +200,7 @@ public final class PreferenceManager {
*
* @param context Caller {@link Context}, used to access to preferences manager.
* @param folder Folder
* @return preference value, default is
* @return preference value, default is
* {@link com.owncloud.android.ui.fragment.OCFileListFragment#FOLDER_LAYOUT_LIST}
*/
public static String getFolderLayout(Context context, OCFile folder) {
@@ -235,19 +224,57 @@ public final class PreferenceManager {
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return sort order the sort order, default is {@link FileSortOrder#sort_a_to_z} (sort by name)
*/
public static FileSortOrder getSortOrder(Context context, OCFile folder) {
public static FileSortOrder getSortOrderByFolder(Context context, OCFile folder) {
return FileSortOrder.sortOrders.get(getFolderPreference(context, PREF__FOLDER_SORT_ORDER, folder,
FileSortOrder.sort_a_to_z.mName));
FileSortOrder.sort_a_to_z.name));
}
/**
* Set preferred folder sort order.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param sortOrder the sort order
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param sortOrder the sort order
*/
public static void setSortOrder(Context context, OCFile folder, FileSortOrder sortOrder) {
setFolderPreference(context, PREF__FOLDER_SORT_ORDER, folder, sortOrder.mName);
setFolderPreference(context, PREF__FOLDER_SORT_ORDER, folder, sortOrder.name);
}
public static FileSortOrder getSortOrderByType(Context context, FileSortOrder.Type type) {
return getSortOrderByType(context, type, FileSortOrder.sort_a_to_z);
}
/**
* Get preferred folder sort order.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return sort order the sort order, default is {@link FileSortOrder#sort_a_to_z} (sort by name)
*/
public static FileSortOrder getSortOrderByType(Context context, FileSortOrder.Type type,
FileSortOrder defaultOrder) {
Account account = AccountUtils.getCurrentOwnCloudAccount(context);
if (account == null) {
return defaultOrder;
}
ArbitraryDataProvider dataProvider = new ArbitraryDataProvider(context.getContentResolver());
String value = dataProvider.getValue(account.name, PREF__FOLDER_SORT_ORDER + "_" + type);
return value.isEmpty() ? defaultOrder : FileSortOrder.sortOrders.get(value);
}
/**
* Set preferred folder sort order.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param sortOrder the sort order
*/
public static void setSortOrder(Context context, FileSortOrder.Type type, FileSortOrder sortOrder) {
Account account = AccountUtils.getCurrentOwnCloudAccount(context);
ArbitraryDataProvider dataProvider = new ArbitraryDataProvider(context.getContentResolver());
dataProvider.storeOrUpdateKeyValue(account.name, PREF__FOLDER_SORT_ORDER + "_" + type, sortOrder.name);
}
/**
@@ -267,14 +294,14 @@ public final class PreferenceManager {
if (account == null) {
return defaultValue;
}
ArbitraryDataProvider dataProvider = new ArbitraryDataProvider(context.getContentResolver());
FileDataStorageManager storageManager = ((ComponentsGetter)context).getStorageManager();
if (storageManager == null) {
storageManager = new FileDataStorageManager(account, context.getContentResolver());
}
String value = dataProvider.getValue(account.name, getKeyFromFolder(preferenceName, folder));
while (folder != null && value.isEmpty()) {
folder = storageManager.getFileById(folder.getParentId());
@@ -283,6 +310,29 @@ public final class PreferenceManager {
return value.isEmpty() ? defaultValue : value;
}
/**
* Get preference value for a view.
*
* @param context Context object.
* @param preferenceName Name of the preference to lookup.
* @param type view which view
* @param defaultValue Fallback value in case nothing is set.
* @return Preference value
*/
public static String getTypePreference(Context context, String preferenceName, String type, String defaultValue) {
Account account = AccountUtils.getCurrentOwnCloudAccount(context);
if (account == null) {
return defaultValue;
}
ArbitraryDataProvider dataProvider = new ArbitraryDataProvider(context.getContentResolver());
String value = dataProvider.getValue(account.name, preferenceName + "_" + type);
return value.isEmpty() ? defaultValue : value;
}
/**
* Set preference value for a folder.
*
@@ -300,12 +350,8 @@ public final class PreferenceManager {
private static String getKeyFromFolder(String preferenceName, OCFile folder) {
final String folderIdString = String.valueOf(folder != null ? folder.getFileId() :
FileDataStorageManager.ROOT_PARENT_ID);
return preferenceName + "_" + folderIdString;
}
public static boolean getAutoUploadInit(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__AUTO_UPLOAD_INIT, false);
return preferenceName + "_" + folderIdString;
}
/**
@@ -326,25 +372,34 @@ public final class PreferenceManager {
return getDefaultSharedPreferences(context).getBoolean(PREF__FIX_STORAGE_PATH, false);
}
/**
* Gets the auto upload paths flag last set.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return ascending order the legacy cleaning flag, default is false
*/
public static boolean getAutoUploadPathsUpdate(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__AUTO_UPLOAD_UPDATE_PATH, false);
@Override
public boolean isAutoUploadPathsUpdateEnabled() {
return preferences.getBoolean(PREF__AUTO_UPLOAD_UPDATE_PATH, false);
}
/**
* Gets the auto upload split out flag last set.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return ascending order the legacy cleaning flag, default is false
*/
public static boolean getAutoUploadSplitEntries(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__AUTO_UPLOAD_SPLIT_OUT, false);
@Override
public void setAutoUploadPathsUpdateEnabled(boolean pathUpdate) {
preferences.edit().putBoolean(PREF__AUTO_UPLOAD_UPDATE_PATH, pathUpdate).apply();
}
@Override
public boolean isAutoUploadSplitEntriesEnabled() {
return preferences.getBoolean(PREF__AUTO_UPLOAD_SPLIT_OUT, false);
}
@Override
public void setAutoUploadSplitEntriesEnabled(boolean splitOut) {
preferences.edit().putBoolean(PREF__AUTO_UPLOAD_SPLIT_OUT, splitOut).apply();
}
@Override
public boolean isAutoUploadInitialized() {
return preferences.getBoolean(PREF__AUTO_UPLOAD_INIT, false);
}
@Override
public void setAutoUploadInit(boolean autoUploadInit) {
preferences.edit().putBoolean(PREF__AUTO_UPLOAD_INIT, autoUploadInit).apply();
}
/**
@@ -365,88 +420,72 @@ public final class PreferenceManager {
saveBooleanPreference(context, PREF__FIX_STORAGE_PATH, storagePathFix);
}
public static void setAutoUploadInit(Context context, boolean autoUploadInit) {
saveBooleanPreference(context, PREF__AUTO_UPLOAD_INIT, autoUploadInit);
@Override
public int getUploaderBehaviour() {
return preferences.getInt(AUTO_PREF__UPLOADER_BEHAVIOR, 1);
}
/**
* Saves the legacy cleaning flag which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param pathUpdate flag if it is a auto upload path update
*/
public static void setAutoUploadPathsUpdate(Context context, boolean pathUpdate) {
saveBooleanPreference(context, PREF__AUTO_UPLOAD_UPDATE_PATH, pathUpdate);
}
/**
* Saves the flag for split entries magic
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param splitOut flag if it is a auto upload path update
*/
public static void setAutoUploadSplitEntries(Context context, boolean splitOut) {
saveBooleanPreference(context, PREF__AUTO_UPLOAD_SPLIT_OUT, splitOut);
}
/**
* Gets the uploader behavior which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return uploader behavior the uploader behavior
*/
public static int getUploaderBehaviour(Context context) {
return getDefaultSharedPreferences(context).getInt(AUTO_PREF__UPLOADER_BEHAVIOR, 1);
}
/**
* Saves the uploader behavior which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param uploaderBehaviour the uploader behavior
*/
public static void setUploaderBehaviour(Context context, int uploaderBehaviour) {
saveIntPreference(context, AUTO_PREF__UPLOADER_BEHAVIOR, uploaderBehaviour);
@Override
public void setUploaderBehaviour(int uploaderBehaviour) {
preferences.edit().putInt(AUTO_PREF__UPLOADER_BEHAVIOR, uploaderBehaviour).apply();
}
/**
* Gets the grid columns which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return grid columns grid columns
*/
public static float getGridColumns(Context context) {
return getDefaultSharedPreferences(context).getFloat(AUTO_PREF__GRID_COLUMNS, 4.0f);
@Override
public float getGridColumns() {
return preferences.getFloat(AUTO_PREF__GRID_COLUMNS, 4.0f);
}
/**
* Saves the grid columns which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param gridColumns the uploader behavior
*/
public static void setGridColumns(Context context, float gridColumns) {
saveFloatPreference(context, AUTO_PREF__GRID_COLUMNS, gridColumns);
@Override
public void setGridColumns(float gridColumns) {
preferences.edit().putFloat(AUTO_PREF__GRID_COLUMNS, gridColumns).apply();
}
/**
* Gets the last seen version code right before updating.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return grid columns grid columns
*/
public static int getLastSeenVersionCode(Context context) {
return getDefaultSharedPreferences(context).getInt(AUTO_PREF__LAST_SEEN_VERSION_CODE, 0);
@Override
public int getLastSeenVersionCode() {
return preferences.getInt(AUTO_PREF__LAST_SEEN_VERSION_CODE, 0);
}
/**
* Saves the version code as the last seen version code.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param versionCode the app's version code
*/
public static void setLastSeenVersionCode(Context context, int versionCode) {
saveIntPreference(context, AUTO_PREF__LAST_SEEN_VERSION_CODE, versionCode);
@Override
public void setLastSeenVersionCode(int versionCode) {
preferences.edit().putInt(AUTO_PREF__LAST_SEEN_VERSION_CODE, versionCode).apply();
}
public long getLockTimestamp() {
return preferences.getLong(PREF__LOCK_TIMESTAMP, 0);
}
public void setLockTimestamp(long timestamp) {
preferences.edit().putLong(PREF__LOCK_TIMESTAMP, timestamp).apply();
}
@Override
public boolean isShowDetailedTimestampEnabled() {
return preferences.getBoolean(AUTO_PREF__SHOW_DETAILED_TIMESTAMP, false);
}
@Override
public void setShowDetailedTimestampEnabled(boolean showDetailedTimestamp) {
preferences.edit().putBoolean(AUTO_PREF__SHOW_DETAILED_TIMESTAMP, showDetailedTimestamp).apply();
}
@Override
public boolean isShowMediaScanNotifications() {
return preferences.getBoolean(PREF__SHOW_MEDIA_SCAN_NOTIFICATIONS, true);
}
@Override
public void setShowMediaScanNotifications(boolean value) {
preferences.edit().putBoolean(PREF__SHOW_MEDIA_SCAN_NOTIFICATIONS, value).apply();
}
private static void saveBooleanPreference(Context context, String key, boolean value) {
@@ -475,7 +514,30 @@ public final class PreferenceManager {
appPreferences.putFloat(key, value).apply();
}
private static void saveLongPreference(Context context, String key, long value) {
SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
appPreferences.putLong(key, value).apply();
}
public static SharedPreferences getDefaultSharedPreferences(Context context) {
return android.preference.PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());
}
@Override
public void removeLegacyPreferences() {
preferences.edit()
.remove("instant_uploading")
.remove("instant_video_uploading")
.remove("instant_upload_path")
.remove("instant_upload_path_use_subfolders")
.remove("instant_upload_on_wifi")
.remove("instant_upload_on_charging")
.remove("instant_video_upload_path")
.remove("instant_video_upload_path_use_subfolders")
.remove("instant_video_upload_on_wifi")
.remove("instant_video_uploading")
.remove("instant_video_upload_on_charging")
.remove("prefs_instant_behaviour")
.apply();
}
}
+52 -60
View File
@@ -4,16 +4,16 @@
* @author masensio
* @author David A. Velasco
* Copyright (C) 2015 ownCloud Inc.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -35,16 +35,13 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.StrictMode;
import android.support.annotation.RequiresApi;
import android.support.annotation.StringRes;
import android.support.multidex.MultiDexApplication;
import android.support.v4.util.Pair;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.WindowManager;
import com.evernote.android.job.JobManager;
import com.evernote.android.job.JobRequest;
import com.nextcloud.client.preferences.AppPreferences;
import com.nextcloud.client.preferences.PreferenceManager;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.authentication.PassCodeManager;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
@@ -56,7 +53,6 @@ import com.owncloud.android.datamodel.SyncedFolderProvider;
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
import com.owncloud.android.datastorage.DataStorageProvider;
import com.owncloud.android.datastorage.StoragePoint;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.jobs.MediaFoldersDetectionJob;
import com.owncloud.android.jobs.NCJobCreator;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
@@ -64,7 +60,7 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory.Policy;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.ui.activity.ContactsPreferenceActivity;
import com.owncloud.android.ui.activity.Preferences;
import com.owncloud.android.ui.activity.SettingsActivity;
import com.owncloud.android.ui.activity.SyncedFoldersActivity;
import com.owncloud.android.ui.activity.WhatsNewActivity;
import com.owncloud.android.ui.notifications.NotificationUtils;
@@ -81,6 +77,11 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.util.Pair;
import androidx.multidex.MultiDexApplication;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFERENCE_CONTACTS_AUTOMATIC_BACKUP;
@@ -95,6 +96,7 @@ import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFER
public class MainApp extends MultiDexApplication {
public static final OwnCloudVersion OUTDATED_SERVER_VERSION = OwnCloudVersion.nextcloud_12;
public static final OwnCloudVersion MINIMUM_SUPPORTED_SERVER_VERSION = OwnCloudVersion.nextcloud_10;
private static final String TAG = MainApp.class.getSimpleName();
@@ -111,7 +113,9 @@ public class MainApp extends MultiDexApplication {
private static boolean mOnlyOnDevice;
private SharedPreferences appPrefs;
private SharedPreferences sharedPreferences;
private AppPreferences preferences;
@SuppressWarnings("unused")
private boolean mBound;
@@ -125,12 +129,12 @@ public class MainApp extends MultiDexApplication {
new SecurityUtils();
DisplayUtils.useCompatVectorIfNeeded();
appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
fixStoragePath();
MainApp.storagePath = appPrefs.getString(Preferences.PreferenceKeys.STORAGE_PATH,
getApplicationContext().getFilesDir().getAbsolutePath());
MainApp.storagePath = sharedPreferences.getString(SettingsActivity.PreferenceKeys.STORAGE_PATH,
getApplicationContext().getFilesDir().getAbsolutePath());
boolean isSamlAuth = AUTH_ON.equals(getString(R.string.auth_method_saml_web_sso));
@@ -147,8 +151,7 @@ public class MainApp extends MultiDexApplication {
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
if (BuildConfig.DEBUG || getApplicationContext().getResources().getBoolean(R.bool.logger_enabled) ||
appPrefs.getBoolean(Preferences.PREFERENCE_EXPERT_MODE, false)) {
if (BuildConfig.DEBUG || getApplicationContext().getResources().getBoolean(R.bool.logger_enabled)) {
// use app writable dir, no permissions needed
Log_OC.startLogging(getAppContext());
Log_OC.d("Debug", "start logging");
@@ -180,7 +183,6 @@ public class MainApp extends MultiDexApplication {
.build()
.schedule();
// register global protection with pass code
registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
@@ -242,22 +244,22 @@ public class MainApp extends MultiDexApplication {
if (!PreferenceManager.getStoragePathFix(this)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
StoragePoint[] storagePoints = DataStorageProvider.getInstance().getAvailableStoragePoints();
String storagePath = appPrefs.getString(Preferences.PreferenceKeys.STORAGE_PATH, "");
String storagePath = sharedPreferences.getString(SettingsActivity.PreferenceKeys.STORAGE_PATH, "");
if (TextUtils.isEmpty(storagePath)) {
if (PreferenceManager.getLastSeenVersionCode(this) != 0) {
if (preferences.getLastSeenVersionCode() != 0) {
// We already used the app, but no storage is set - fix that!
appPrefs.edit().putString(Preferences.PreferenceKeys.STORAGE_PATH,
Environment.getExternalStorageDirectory().getAbsolutePath()).commit();
appPrefs.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
sharedPreferences.edit().putString(SettingsActivity.PreferenceKeys.STORAGE_PATH,
Environment.getExternalStorageDirectory().getAbsolutePath()).commit();
sharedPreferences.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
} else {
// find internal storage path that's indexable
boolean set = false;
for (StoragePoint storagePoint : storagePoints) {
if (storagePoint.getStorageType().equals(StoragePoint.StorageType.INTERNAL) &&
storagePoint.getPrivacyType().equals(StoragePoint.PrivacyType.PUBLIC)) {
appPrefs.edit().putString(Preferences.PreferenceKeys.STORAGE_PATH,
storagePoint.getPath()).commit();
appPrefs.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
sharedPreferences.edit().putString(SettingsActivity.PreferenceKeys.STORAGE_PATH,
storagePoint.getPath()).commit();
sharedPreferences.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
set = true;
break;
}
@@ -266,9 +268,9 @@ public class MainApp extends MultiDexApplication {
if (!set) {
for (StoragePoint storagePoint : storagePoints) {
if (storagePoint.getPrivacyType().equals(StoragePoint.PrivacyType.PUBLIC)) {
appPrefs.edit().putString(Preferences.PreferenceKeys.STORAGE_PATH,
storagePoint.getPath()).commit();
appPrefs.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
sharedPreferences.edit().putString(SettingsActivity.PreferenceKeys.STORAGE_PATH,
storagePoint.getPath()).commit();
sharedPreferences.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
set = true;
break;
}
@@ -278,15 +280,15 @@ public class MainApp extends MultiDexApplication {
}
PreferenceManager.setStoragePathFix(this, true);
} else {
appPrefs.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
sharedPreferences.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
PreferenceManager.setStoragePathFix(this, true);
}
} else {
if (TextUtils.isEmpty(storagePath)) {
appPrefs.edit().putString(Preferences.PreferenceKeys.STORAGE_PATH,
Environment.getExternalStorageDirectory().getAbsolutePath()).commit();
sharedPreferences.edit().putString(SettingsActivity.PreferenceKeys.STORAGE_PATH,
Environment.getExternalStorageDirectory().getAbsolutePath()).commit();
}
appPrefs.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
sharedPreferences.edit().remove(PreferenceManager.PREF__KEYS_MIGRATION).commit();
PreferenceManager.setStoragePathFix(this, true);
}
}
@@ -302,7 +304,8 @@ public class MainApp extends MultiDexApplication {
Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
splitOutAutoUploadEntries();
} else {
PreferenceManager.setAutoUploadSplitEntries(getAppContext(), true);
AppPreferences preferences = PreferenceManager.fromContext(getAppContext());
preferences.setAutoUploadSplitEntriesEnabled(true);
}
}
@@ -387,7 +390,7 @@ public class MainApp extends MultiDexApplication {
notificationManager.createNotificationChannel(channel);
}
}
public static Context getAppContext() {
return MainApp.mContext;
@@ -405,9 +408,9 @@ public class MainApp extends MultiDexApplication {
MainApp.storagePath = path;
}
// Methods to obtain Strings referring app_name
// From AccountAuthenticator
// public static final String ACCOUNT_TYPE = "owncloud";
// Methods to obtain Strings referring app_name
// From AccountAuthenticator
// public static final String ACCOUNT_TYPE = "owncloud";
public static String getAccountType(Context context) {
return context.getResources().getString(R.string.account_type);
}
@@ -446,7 +449,7 @@ public class MainApp extends MultiDexApplication {
return getAppContext().getResources().getString(R.string.authority);
}
// From ProviderMeta
// From ProviderMeta
// public static final String DB_FILE = "owncloud.db";
public static String getDBFile() {
return getAppContext().getResources().getString(R.string.db_file);
@@ -508,23 +511,9 @@ public class MainApp extends MultiDexApplication {
private static void updateToAutoUpload() {
Context context = getAppContext();
if (PreferenceManager.instantPictureUploadEnabled(context) ||
PreferenceManager.instantVideoUploadEnabled(context)){
// remove legacy shared preferences
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit();
editor.remove("instant_uploading")
.remove("instant_video_uploading")
.remove("instant_upload_path")
.remove("instant_upload_path_use_subfolders")
.remove("instant_upload_on_wifi")
.remove("instant_upload_on_charging")
.remove("instant_video_upload_path")
.remove("instant_video_upload_path_use_subfolders")
.remove("instant_video_upload_on_wifi")
.remove("instant_video_uploading")
.remove("instant_video_upload_on_charging")
.remove("prefs_instant_behaviour").apply();
AppPreferences preferences = PreferenceManager.fromContext(context);
if (preferences.instantPictureUploadEnabled() || preferences.instantVideoUploadEnabled()){
preferences.removeLegacyPreferences();
// show info pop-up
try {
@@ -549,7 +538,8 @@ public class MainApp extends MultiDexApplication {
private static void updateAutoUploadEntries() {
// updates entries to reflect their true paths
Context context = getAppContext();
if (!PreferenceManager.getAutoUploadPathsUpdate(context)) {
AppPreferences preferences = PreferenceManager.fromContext(context);
if (!preferences.isAutoUploadPathsUpdateEnabled()) {
SyncedFolderProvider syncedFolderProvider =
new SyncedFolderProvider(MainApp.getAppContext().getContentResolver());
syncedFolderProvider.updateAutoUploadPaths(mContext);
@@ -558,7 +548,8 @@ public class MainApp extends MultiDexApplication {
private static void splitOutAutoUploadEntries() {
Context context = getAppContext();
if (!PreferenceManager.getAutoUploadSplitEntries(context)) {
AppPreferences preferences = PreferenceManager.fromContext(context);
if (!preferences.isAutoUploadSplitEntriesEnabled()) {
// magic to split out existing synced folders in two when needed
// otherwise, we migrate them to their proper type (image or video)
Log_OC.i(TAG, "Migrate synced_folders records for image/video split");
@@ -606,13 +597,14 @@ public class MainApp extends MultiDexApplication {
syncedFolderProvider.deleteSyncedFolder(id);
}
PreferenceManager.setAutoUploadSplitEntries(context, true);
preferences.setAutoUploadSplitEntriesEnabled(true);
}
}
private static void initiateExistingAutoUploadEntries() {
new Thread(() -> {
if (!PreferenceManager.getAutoUploadInit(getAppContext())) {
AppPreferences preferences = PreferenceManager.fromContext(getAppContext());
if (!preferences.isAutoUploadInitialized()) {
SyncedFolderProvider syncedFolderProvider =
new SyncedFolderProvider(MainApp.getAppContext().getContentResolver());
@@ -622,7 +614,7 @@ public class MainApp extends MultiDexApplication {
}
}
PreferenceManager.setAutoUploadInit(getAppContext(), true);
preferences.setAutoUploadInit(true);
}
}).start();
@@ -19,16 +19,17 @@ package com.owncloud.android.authentication;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.AccountManager;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
/*
* Base class for implementing an Activity that is used to help implement an AbstractAccountAuthenticator.
* If the AbstractAccountAuthenticator needs to use an activity to handle the request then it can have the activity extend
* Base class for implementing an Activity that is used to help implement an AbstractAccountAuthenticator.
* If the AbstractAccountAuthenticator needs to use an activity to handle the request then it can have the activity extend
* AccountAuthenticatorActivity. The AbstractAccountAuthenticator passes in the response to the intent using the following:
* intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
*
* The activity then sets the result that is to be handed to the response via setAccountAuthenticatorResult(android.os.Bundle).
* This result will be sent as the result of the request when the activity finishes. If this is never set or if it is set to null
*
* The activity then sets the result that is to be handed to the response via setAccountAuthenticatorResult(android.os.Bundle).
* This result will be sent as the result of the request when the activity finishes. If this is never set or if it is set to null
* then error AccountManager.ERROR_CODE_CANCELED will be called on the response.
*/
@@ -41,7 +42,7 @@ public class AccountAuthenticatorActivity extends AppCompatActivity {
/**
* Set the result that is to be sent as the result of the request that caused this Activity to be launched.
* If result is null or this method is never called then the request will be canceled.
*
*
* @param result this is returned as the result of the AbstractAccountAuthenticator request
*/
public final void setAccountAuthenticatorResult(Bundle result) {
@@ -64,7 +65,7 @@ public class AccountAuthenticatorActivity extends AppCompatActivity {
mAccountAuthenticatorResponse.onRequestContinued();
}
}
/**
* Sends the result or a Constants.ERROR_CODE_CANCELED error if a result isn't present.
*/
@@ -23,24 +23,36 @@ import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import com.owncloud.android.MainApp;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.UserInfo;
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
import com.owncloud.android.ui.activity.ManageAccountsActivity;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* Helper class for dealing with accounts.
*/
public final class AccountUtils {
private static final String TAG = AccountUtils.class.getSimpleName();
private static final String PREF_SELECT_OC_ACCOUNT = "select_oc_account";
public static final int ACCOUNT_VERSION = 1;
//public static final int ACCOUNT_VERSION_WITH_PROPER_ID = 2;
public static final int ACCOUNT_VERSION_WITH_PROPER_ID = 2;
public static final String ACCOUNT_USES_STANDARD_PASSWORD = "ACCOUNT_USES_STANDARD_PASSWORD";
private AccountUtils() {
@@ -50,10 +62,10 @@ public final class AccountUtils {
/**
* Can be used to get the currently selected ownCloud {@link Account} in the
* application preferences.
*
*
* @param context The current application {@link Context}
* @return The ownCloud {@link Account} currently saved in preferences, or the first
* {@link Account} available, if valid (still registered in the system as ownCloud
* @return The ownCloud {@link Account} currently saved in preferences, or the first
* {@link Account} available, if valid (still registered in the system as ownCloud
* account). If none is available and valid, returns null.
*/
public static @Nullable Account getCurrentOwnCloudAccount(Context context) {
@@ -96,7 +108,7 @@ public final class AccountUtils {
return accountManager.getAccountsByType(MainApp.getAccountType(context));
}
public static boolean exists(Account account, Context context) {
Account[] ocAccounts = getAccounts(context);
@@ -132,7 +144,7 @@ public final class AccountUtils {
return null;
}
}
/**
* Returns owncloud account identified by accountName or null if it does not exist.
* @param context the context
@@ -176,24 +188,172 @@ public final class AccountUtils {
/**
* Access the version of the OC server corresponding to an account SAVED IN THE ACCOUNTMANAGER
*
* @param account ownCloud account
* @return Version of the OC server corresponding to account, according to the data saved
* in the system AccountManager
* @param account ownCloud account
* @return Version of the OC server corresponding to account, according to the data saved
* in the system AccountManager
*/
public static @NonNull
OwnCloudVersion getServerVersion(Account account) {
OwnCloudVersion serverVersion = OwnCloudVersion.nextcloud_10;
OwnCloudVersion serverVersion = MainApp.MINIMUM_SUPPORTED_SERVER_VERSION;
if (account != null) {
AccountManager accountMgr = AccountManager.get(MainApp.getAppContext());
String serverVersionStr = accountMgr.getUserData(account, Constants.KEY_OC_VERSION);
if (serverVersionStr != null) {
serverVersion = new OwnCloudVersion(serverVersionStr);
}
}
return serverVersion;
}
public static boolean hasSearchSupport(Account account) {
return getServerVersion(account).isSearchSupported();
}
/**
* Update the accounts in AccountManager to meet the current version of accounts expected by the app, if needed.
* <p>
* Introduced to handle a change in the structure of stored account names needed to allow different OC servers in
* the same domain, but not in the same path.
*
* @param context Used to access the AccountManager.
*/
public static void updateAccountVersion(Context context) {
Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(context);
AccountManager accountMgr = AccountManager.get(context);
if (currentAccount != null) {
String currentAccountVersion = accountMgr.getUserData(currentAccount, Constants.KEY_OC_ACCOUNT_VERSION);
if (!String.valueOf(ACCOUNT_VERSION_WITH_PROPER_ID).equalsIgnoreCase(currentAccountVersion)) {
Log_OC.i(TAG, "Upgrading accounts to account version #" + ACCOUNT_VERSION_WITH_PROPER_ID);
Account[] ocAccounts = accountMgr.getAccountsByType(MainApp.getAccountType(context));
String serverUrl;
String username;
String displayName;
String newAccountName;
Account newAccount;
GetRemoteUserInfoOperation remoteUserNameOperation = new GetRemoteUserInfoOperation();
for (Account account : ocAccounts) {
// build new account name
serverUrl = accountMgr.getUserData(account, Constants.KEY_OC_BASE_URL);
// update user name
try {
OwnCloudAccount ocAccount = new OwnCloudAccount(account, context);
OwnCloudClient client = OwnCloudClientManagerFactory.getDefaultSingleton()
.getClientFor(ocAccount, context);
RemoteOperationResult result = remoteUserNameOperation.execute(client);
if (result.isSuccess()) {
UserInfo userInfo = (UserInfo) result.getData().get(0);
username = userInfo.id;
displayName = userInfo.displayName;
} else {
// skip account, try it next time
Log_OC.e(TAG, "Error while getting username for account: " + account.name);
continue;
}
} catch (Exception e) {
Log_OC.e(TAG, "Error while getting username: " + e.getMessage());
continue;
}
newAccountName = com.owncloud.android.lib.common.accounts.AccountUtils.
buildAccountName(Uri.parse(serverUrl), username);
// migrate to a new account, if needed
if (!newAccountName.equals(account.name)) {
newAccount = migrateAccount(context, currentAccount, accountMgr, serverUrl, newAccountName,
account);
} else {
// servers which base URL is in the root of their domain need no change
Log_OC.d(TAG, account.name + " needs no upgrade ");
newAccount = account;
}
accountMgr.setUserData(newAccount, Constants.KEY_DISPLAY_NAME, displayName);
accountMgr.setUserData(newAccount, Constants.KEY_USER_ID, username);
// at least, upgrade account version
Log_OC.d(TAG, "Setting version " + ACCOUNT_VERSION_WITH_PROPER_ID + " to " + newAccountName);
accountMgr.setUserData(newAccount, Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(ACCOUNT_VERSION_WITH_PROPER_ID));
}
}
}
}
@NonNull
private static Account migrateAccount(Context context, Account currentAccount, AccountManager accountMgr,
String serverUrl, String newAccountName, Account account) {
Log_OC.d(TAG, "Upgrading " + account.name + " to " + newAccountName);
// create the new account
Account newAccount = new Account(newAccountName, MainApp.getAccountType(context));
String password = accountMgr.getPassword(account);
accountMgr.addAccountExplicitly(newAccount, (password != null) ? password : "", null);
// copy base URL
accountMgr.setUserData(newAccount, Constants.KEY_OC_BASE_URL, serverUrl);
// copy server version
accountMgr.setUserData(
newAccount,
Constants.KEY_OC_VERSION,
accountMgr.getUserData(account, Constants.KEY_OC_VERSION)
);
// copy cookies
accountMgr.setUserData(
newAccount,
Constants.KEY_COOKIES,
accountMgr.getUserData(account, Constants.KEY_COOKIES)
);
// copy type of authentication
final String isSamlStr = accountMgr.getUserData(account, Constants.KEY_SUPPORTS_SAML_WEB_SSO);
if (Boolean.parseBoolean(isSamlStr)) {
accountMgr.setUserData(newAccount, Constants.KEY_SUPPORTS_SAML_WEB_SSO, "TRUE");
}
final String isOauthStr = accountMgr.getUserData(account, Constants.KEY_SUPPORTS_OAUTH2);
if (Boolean.parseBoolean(isOauthStr)) {
accountMgr.setUserData(newAccount, Constants.KEY_SUPPORTS_OAUTH2, "TRUE");
}
/* TODO - study if it's possible to run this method in a background thread to copy the authToken
if (isOAuth || isSaml) {
accountMgr.setAuthToken(newAccount, mAuthTokenType, mAuthToken);
}
*/
// don't forget the account saved in preferences as the current one
if (currentAccount.name.equals(account.name)) {
AccountUtils.setCurrentOwnCloudAccount(context, newAccountName);
}
// remove the old account
accountMgr.removeAccount(account, null, null);
// will assume it succeeds, not a big deal otherwise
return newAccount;
}
/**
* Checks if an account owns the file (file's ownerId is the same as account name)
* @param file File to check
* @param account account to compare
* @return false if ownerId is not set or owner is a different account
*/
public static boolean accountOwnsFile(OCFile file, Account account) {
return !TextUtils.isEmpty(file.getOwnerId()) && account.name.split("@")[0].equals(file.getOwnerId());
}
}
@@ -40,6 +40,7 @@
package com.owncloud.android.authentication;
import android.Manifest;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.annotation.SuppressLint;
@@ -50,6 +51,7 @@ import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
@@ -59,13 +61,6 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils;
@@ -90,6 +85,9 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
import com.blikoon.qrcodescanner.QrCodeActivity;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener;
@@ -115,6 +113,7 @@ import com.owncloud.android.operations.GetServerInfoOperation;
import com.owncloud.android.operations.OAuth2GetAccessToken;
import com.owncloud.android.services.OperationsService;
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.FirstRunActivity;
import com.owncloud.android.ui.components.CustomEditText;
import com.owncloud.android.ui.dialog.CredentialsDialogFragment;
@@ -124,14 +123,22 @@ import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ErrorMessageAdapter;
import com.owncloud.android.utils.PermissionUtil;
import java.io.InputStream;
import java.net.URLDecoder;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
@@ -191,6 +198,10 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
public static final int NO_ICON = 0;
public static final String EMPTY_STRING = "";
private static final int REQUEST_CODE_QR_SCAN = 101;
public static final int REQUEST_CODE_FIRST_RUN = 102;
/// parameters from EXTRAs in starter Intent
private byte mAction;
private Account mAccount;
@@ -203,7 +214,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private AccountManager mAccountMgr;
private Uri mNewCapturedUriFromOAuth2Redirection;
/// Server PRE-Fragment elements
/// Server PRE-Fragment elements
private CustomEditText mHostUrlInput;
private View mRefreshButton;
private TextView mServerStatusView;
@@ -217,7 +228,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private GetServerInfoOperation.ServerInfo mServerInfo = new GetServerInfoOperation.ServerInfo();
/// Authentication PRE-Fragment elements
/// Authentication PRE-Fragment elements
private CheckBox mOAuth2Check;
private TextView mOAuthAuthEndpointText;
private TextView mOAuthTokenEndpointText;
@@ -237,7 +248,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private boolean mIsFirstAuthAttempt;
/// Identifier of operation in progress which result shouldn't be lost
/// Identifier of operation in progress which result shouldn't be lost
private long mWaitingForOpId = Long.MAX_VALUE;
private String basicTokenType;
@@ -261,10 +272,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
//Log_OC.e(TAG, "onCreate init");
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
Uri data = getIntent().getData();
boolean directLogin = data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme));
if (savedInstanceState == null && !directLogin) {
FirstRunActivity.runIfNeeded(this);
}
basicTokenType = AccountTypeUtils.getAuthTokenTypePass(MainApp.getAccountType(this));
oauthTokenType = AccountTypeUtils.getAuthTokenTypeAccessToken(MainApp.getAccountType(this));
samlTokenType = AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType(this));
@@ -320,21 +333,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
/// initialize general UI elements
initOverallUi();
findViewById(R.id.centeredRefreshButton).setOnClickListener(new View.OnClickListener() {
findViewById(R.id.centeredRefreshButton).setOnClickListener(v -> checkOcServer());
@Override
public void onClick(View v) {
checkOcServer();
}
});
findViewById(R.id.embeddedRefreshButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
checkOcServer();
}
});
findViewById(R.id.embeddedRefreshButton).setOnClickListener(v -> checkOcServer());
/// initialize block to be moved to single Fragment to check server and get info about it
@@ -379,7 +380,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mLoginWebView.getSettings().setAllowFileAccess(false);
mLoginWebView.getSettings().setJavaScriptEnabled(true);
mLoginWebView.getSettings().setDomStorageEnabled(true);
if (useGenericUserAgent) {
mLoginWebView.getSettings().setUserAgentString(MainApp.getNextcloudUserAgent());
} else {
@@ -404,41 +405,35 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
// show snackbar after 60s to switch back to old login method
if (showLegacyLogin) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
DisplayUtils.createSnackbar(mLoginWebView, R.string.fallback_weblogin_text, Snackbar.LENGTH_INDEFINITE)
.setActionTextColor(getResources().getColor(R.color.primary_dark))
.setAction(R.string.fallback_weblogin_back, new View.OnClickListener() {
@Override
public void onClick(View v) {
mLoginWebView.setVisibility(View.INVISIBLE);
webViewLoginMethod = false;
new Handler().postDelayed(() -> DisplayUtils.createSnackbar(mLoginWebView,
R.string.fallback_weblogin_text,
Snackbar.LENGTH_INDEFINITE)
.setActionTextColor(getResources().getColor(R.color.white))
.setAction(R.string.fallback_weblogin_back, v -> {
mLoginWebView.setVisibility(View.INVISIBLE);
webViewLoginMethod = false;
setContentView(R.layout.account_setup);
setContentView(R.layout.account_setup);
// initialize general UI elements
initOverallUi();
// initialize general UI elements
initOverallUi();
mPasswordInputLayout.setVisibility(View.VISIBLE);
mUsernameInputLayout.setVisibility(View.VISIBLE);
mUsernameInput.requestFocus();
mOAuth2Check.setVisibility(View.INVISIBLE);
mAuthStatusView.setVisibility(View.INVISIBLE);
mServerStatusView.setVisibility(View.INVISIBLE);
mTestServerButton.setVisibility(View.INVISIBLE);
forceOldLoginMethod = true;
mOkButton.setVisibility(View.VISIBLE);
mPasswordInputLayout.setVisibility(View.VISIBLE);
mUsernameInputLayout.setVisibility(View.VISIBLE);
mUsernameInput.requestFocus();
mOAuth2Check.setVisibility(View.INVISIBLE);
mAuthStatusView.setVisibility(View.INVISIBLE);
mServerStatusView.setVisibility(View.INVISIBLE);
mTestServerButton.setVisibility(View.INVISIBLE);
forceOldLoginMethod = true;
mOkButton.setVisibility(View.VISIBLE);
initServerPreFragment(null);
initServerPreFragment(null);
mHostUrlInput.setText(baseURL);
mHostUrlInput.setText(baseURL);
checkOcServer();
}
}).show();
}
}, 60 * 1000);
checkOcServer();
}).show(), 60 * 1000);
}
}
@@ -512,9 +507,15 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
LoginUrlInfo loginUrlInfo = parseLoginDataUrl(prefix, dataString);
if (loginUrlInfo != null) {
mServerInfo.mBaseUrl = AuthenticatorUrlUtils.normalizeUrlSuffix(loginUrlInfo.serverAddress);
webViewUser = loginUrlInfo.username;
webViewPassword = loginUrlInfo.password;
try {
mServerInfo.mBaseUrl = AuthenticatorUrlUtils.normalizeUrlSuffix(loginUrlInfo.serverAddress);
webViewUser = loginUrlInfo.username;
webViewPassword = loginUrlInfo.password;
} catch (Exception e) {
mServerStatusIcon = R.drawable.ic_alert;
mServerStatusText = "QR Code could not be read!";
showServerStatus();
}
checkOcServer();
}
}
@@ -573,9 +574,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
} else if (value.startsWith("server" + LOGIN_URL_DATA_KEY_VALUE_SEPARATOR)) {
loginUrlInfo.serverAddress = URLDecoder.decode(
value.substring(("server" + LOGIN_URL_DATA_KEY_VALUE_SEPARATOR).length()));
} else {
// error illegal URL element detected
throw new IllegalArgumentException("Illegal magic login URL element detected: " + value);
}
}
@@ -583,14 +581,19 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
private void initAuthTokenType() {
mAuthTokenType = getIntent().getExtras().getString(AccountAuthenticator.KEY_AUTH_TOKEN_TYPE);
Bundle extras = getIntent().getExtras();
mAuthTokenType = null;
if (extras != null) {
extras.getString(AccountAuthenticator.KEY_AUTH_TOKEN_TYPE);
}
if (mAuthTokenType == null) {
if (mAccount != null) {
boolean oAuthRequired = mAccountMgr.getUserData(mAccount, Constants.KEY_SUPPORTS_OAUTH2) != null;
boolean samlWebSsoRequired = mAccountMgr.getUserData
(mAccount, Constants.KEY_SUPPORTS_SAML_WEB_SSO) != null;
mAuthTokenType = chooseAuthTokenType(oAuthRequired, samlWebSsoRequired);
} else {
boolean oAuthSupported = AUTH_ON.equals(getString(R.string.auth_method_oauth2));
boolean samlWebSsoSupported = AUTH_ON.equals(getString(R.string.auth_method_saml_web_sso));
@@ -627,6 +630,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mOkButton = findViewById(R.id.buttonOK);
mOkButton.setOnClickListener(v -> onOkClick());
findViewById(R.id.scanQR).setOnClickListener(v -> onScan());
setupInstructionMessage();
mTestServerButton.setVisibility(mAction == ACTION_CREATE ? View.VISIBLE : View.GONE);
@@ -763,17 +768,14 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
// TODO find out if this is really necessary, or if it can done in a different way
findViewById(R.id.scroll).setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN &&
AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(
MainApp.getAccountType(getBaseContext())).equals(mAuthTokenType) &&
mHostUrlInput.hasFocus()) {
checkOcServer();
}
return false;
findViewById(R.id.scroll).setOnTouchListener((view, event) -> {
if (event.getAction() == MotionEvent.ACTION_DOWN &&
AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(
MainApp.getAccountType(getBaseContext())).equals(mAuthTokenType) &&
mHostUrlInput.hasFocus()) {
checkOcServer();
}
return false;
});
}
}
@@ -975,11 +977,20 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
@Override
protected void onNewIntent(Intent intent) {
Log_OC.d(TAG, "onNewIntent()");
if (intent.getBooleanExtra(FirstRunActivity.EXTRA_EXIT, false)) {
super.finish();
}
Uri data = intent.getData();
if (data != null && data.toString().startsWith(getString(R.string.oauth2_redirect_uri))) {
mNewCapturedUriFromOAuth2Redirection = data;
}
if (data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme))) {
parseAndLoginFromWebView(data.toString());
}
if (intent.getBooleanExtra(EXTRA_USE_PROVIDER_AS_WEBLOGIN, false)) {
webViewLoginMethod = true;
setContentView(R.layout.account_setup_webview);
@@ -1295,9 +1306,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
/// be gentle with the user
IndeterminateProgressDialog dialog =
IndeterminateProgressDialog.newInstance(R.string.auth_trying_to_login, true);
dialog.show(getSupportFragmentManager(), WAIT_DIALOG_TAG);
IndeterminateProgressDialog dialog = IndeterminateProgressDialog.newInstance(R.string.auth_trying_to_login,
true);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(dialog, WAIT_DIALOG_TAG);
ft.commitAllowingStateLoss();
/// validate credentials accessing the root folder
OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password);
@@ -1339,7 +1352,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
uri = uriBuilder.build();
Log_OC.d(TAG, "Starting browser to view " + uri.toString());
Intent i = new Intent(Intent.ACTION_VIEW, uri);
startActivity(i);
DisplayUtils.startIntentIfAppAvailable(i, this, R.string.no_browser_available);
}
@@ -1371,7 +1385,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
if (operation instanceof GetServerInfoOperation) {
if (operation.hashCode() == mWaitingForOpId) {
onGetServerInfoFinish(result);
} // else nothing ; only the last check operation is considered;
} // else nothing ; only the last check operation is considered;
// multiple can be started if the user amends a URL quickly
} else if (operation instanceof OAuth2GetAccessToken) {
@@ -1456,7 +1470,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
// 1. connection succeeded, and we know if it's SSL or not
// 2. server is installed
// 3. we got the server version
// 4. we got the authentication method required by the server
// 4. we got the authentication method required by the server
mServerInfo = (GetServerInfoOperation.ServerInfo) (result.getData().get(0));
// show outdated warning
@@ -1756,6 +1770,14 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
if (success) {
finish();
AccountUtils.setCurrentOwnCloudAccount(this, mAccount.name);
Intent i = new Intent(this, FileDisplayActivity.class);
i.setAction(FileDisplayActivity.RESTART);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
} else {
// init webView again
if (mLoginWebView != null) {
@@ -1776,7 +1798,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
} else if (result.isServerFail() || result.isException()) {
/// server errors or exceptions in authorization take to requiring a new check of
/// server errors or exceptions in authorization take to requiring a new check of
/// the server
mServerIsChecked = true;
mServerIsValid = false;
@@ -1803,9 +1825,31 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
} else { // authorization fail due to client side - probably wrong credentials
if (webViewLoginMethod) {
mLoginWebView = findViewById(R.id.login_webview);
initWebViewLogin(mServerInfo.mBaseUrl + WEB_LOGIN, true, false);
DisplayUtils.showSnackMessage(this, mLoginWebView, R.string.auth_access_failed, result.getLogMessage());
if (mLoginWebView != null) {
initWebViewLogin(mServerInfo.mBaseUrl + WEB_LOGIN, true, false);
DisplayUtils.showSnackMessage(this, mLoginWebView, R.string.auth_access_failed,
result.getLogMessage());
} else {
DisplayUtils.showSnackMessage(this, R.string.auth_access_failed, result.getLogMessage());
// init webView again
if (mLoginWebView != null) {
mLoginWebView.setVisibility(View.GONE);
}
setContentView(R.layout.account_setup);
initOverallUi();
CustomEditText serverAddressField = findViewById(R.id.hostUrlInput);
serverAddressField.setText(mServerInfo.mBaseUrl);
findViewById(R.id.oauth_onOff_check).setVisibility(View.GONE);
findViewById(R.id.server_status_text).setVisibility(View.GONE);
mAuthStatusView = findViewById(R.id.auth_status_text);
showAuthStatus();
}
} else {
updateAuthStatusIconAndText(result);
showAuthStatus();
@@ -1837,13 +1881,13 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
if (AccountTypeUtils.getAuthTokenTypeAccessToken(accountType).equals(mAuthTokenType)) {
response.putString(AccountManager.KEY_AUTHTOKEN, mAuthToken);
// the next line is necessary, notifications are calling directly to the
// the next line is necessary, notifications are calling directly to the
// AuthenticatorActivity to update, without AccountManager intervention
mAccountMgr.setAuthToken(mAccount, mAuthTokenType, mAuthToken);
} else if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(accountType).equals(mAuthTokenType)) {
response.putString(AccountManager.KEY_AUTHTOKEN, mAuthToken);
// the next line is necessary; by now, notifications are calling directly to the
// the next line is necessary; by now, notifications are calling directly to the
// AuthenticatorActivity to update, without AccountManager intervention
mAccountMgr.setAuthToken(mAccount, mAuthTokenType, mAuthToken);
@@ -1876,6 +1920,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
* TODO Decide how to name the OAuth accounts
*/
@SuppressFBWarnings("DMI")
@SuppressLint("TrulyRandom")
private boolean createAccount(RemoteOperationResult authResult) {
String accountType = MainApp.getAccountType(this);
@@ -1896,7 +1941,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
username = webViewUser;
}
if (isOAuth) {
username = "OAuth_user" + (new java.util.Random(System.currentTimeMillis())).nextLong();
username = "OAuth_user" + new SecureRandom().nextLong();
}
String accountName = com.owncloud.android.lib.common.accounts.AccountUtils.buildAccountName(uri, username);
@@ -1925,10 +1970,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
}
// include account version with the new account
mAccountMgr.setUserData(mAccount, Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(AccountUtils.ACCOUNT_VERSION));
/// add the new account as default in preferences, if there is none already
Account defaultAccount = AccountUtils.getCurrentOwnCloudAccount(this);
if (defaultAccount == null) {
@@ -1938,7 +1979,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
/// prepare result to return to the Authenticator
// TODO check again what the Authenticator makes with it; probably has the same
// TODO check again what the Authenticator makes with it; probably has the same
// effect as addAccountExplicitly, but it's not well done
final Intent intent = new Intent();
intent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, accountType);
@@ -1947,7 +1988,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
if (isOAuth || isSaml) {
mAccountMgr.setAuthToken(mAccount, mAuthTokenType, mAuthToken);
}
/// add user data to the new account; TODO probably can be done in the last parameter
/// add user data to the new account; TODO probably can be done in the last parameter
// addAccountExplicitly, or in KEY_USERDATA
mAccountMgr.setUserData(mAccount, Constants.KEY_OC_VERSION, mServerInfo.mVersion.getVersion());
mAccountMgr.setUserData(mAccount, Constants.KEY_OC_BASE_URL, mServerInfo.mBaseUrl);
@@ -1957,11 +1998,18 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
UserInfo userInfo = (UserInfo) authResult.getData().get(0);
mAccountMgr.setUserData(mAccount, Constants.KEY_DISPLAY_NAME, userInfo.getDisplayName());
mAccountMgr.setUserData(mAccount, Constants.KEY_USER_ID, userInfo.getId());
mAccountMgr.setUserData(mAccount, Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(AccountUtils.ACCOUNT_VERSION_WITH_PROPER_ID));
} catch (ClassCastException c) {
Log_OC.w(TAG, "Couldn't get display name for " + username);
mAccountMgr.setUserData(mAccount, Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(AccountUtils.ACCOUNT_VERSION));
Log_OC.w(TAG, "Couldn't get display name and user id for " + username);
}
} else {
Log_OC.w(TAG, "Couldn't get display name for " + username);
mAccountMgr.setUserData(mAccount, Constants.KEY_OC_ACCOUNT_VERSION,
Integer.toString(AccountUtils.ACCOUNT_VERSION));
Log_OC.w(TAG, "Couldn't get display name and user id for " + username);
}
if (isSaml) {
@@ -1977,6 +2025,40 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
}
public void onScan() {
if (PermissionUtil.checkSelfPermission(this, Manifest.permission.CAMERA)) {
startQRScanner();
} else {
PermissionUtil.requestCameraPermission(this);
}
}
private void startQRScanner() {
Intent i = new Intent(this, QrCodeActivity.class);
startActivityForResult(i, REQUEST_CODE_QR_SCAN);
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[],
@NonNull int[] grantResults) {
switch (requestCode) {
case PermissionUtil.PERMISSIONS_CAMERA: {
// If request is cancelled, result arrays are empty.
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// permission was granted
startQRScanner();
} else {
// permission denied
return;
}
return;
}
default:
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
/**
/**
* Updates the content and visibility state of the icon and text associated
@@ -2053,7 +2135,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
/**
* Called when the 'action' button in an IME is pressed ('enter' in software keyboard).
*
*
* Used to trigger the authentication check when the user presses 'enter' after writing the
* password, or to throw the server test when the only field on screen is the URL input field.
*/
@@ -2192,7 +2274,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
public void onSavedCertificate() {
Fragment fd = getSupportFragmentManager().findFragmentByTag(SAML_DIALOG_TAG);
if (fd == null) {
// if SAML dialog is not shown,
// if SAML dialog is not shown,
// the SslDialog was shown due to an SSL error in the server check
checkOcServer();
}
@@ -2255,10 +2337,27 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
)) {
mOperationsServiceBinder = (OperationsServiceBinder) service;
doOnResumeAndBound();
Uri data = getIntent().getData();
if (data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme))) {
String prefix = getString(R.string.login_data_own_scheme) + PROTOCOL_SUFFIX + "login/";
LoginUrlInfo loginUrlInfo = parseLoginDataUrl(prefix, data.toString());
if (loginUrlInfo != null) {
try {
mServerInfo.mBaseUrl = AuthenticatorUrlUtils.normalizeUrlSuffix(loginUrlInfo.serverAddress);
webViewUser = loginUrlInfo.username;
webViewPassword = loginUrlInfo.password;
doOnResumeAndBound();
} catch (Exception e) {
mServerStatusIcon = R.drawable.ic_alert;
mServerStatusText = "QR Code could not be read!";
showServerStatus();
}
}
} else {
doOnResumeAndBound();
}
}
}
@Override
@@ -2301,4 +2400,24 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
public void doNegativeAuthenticationDialogClick() {
mIsFirstAuthAttempt = true;
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
if (requestCode == REQUEST_CODE_QR_SCAN) {
if (data == null) {
return;
}
String result = data.getStringExtra("com.blikoon.qrcodescanner.got_qr_scan_relult");
if (!result.startsWith(getString(R.string.login_data_own_scheme))) {
mServerStatusIcon = R.drawable.ic_alert;
mServerStatusText = "QR Code could not be read!";
showServerStatus();
return;
}
parseAndLoginFromWebView(result);
}
}
}
@@ -1,4 +1,4 @@
/**
/*
* ownCloud Android client application
*
* @author masensio on 09/02/2015.
@@ -43,11 +43,11 @@ public class AuthenticatorAsyncTask extends AsyncTask<Object, Void, RemoteOpera
private static final String REMOTE_PATH = "/";
private static final boolean SUCCESS_IF_ABSENT = false;
private Context mContext;
private WeakReference<Context> mWeakContext;
private final WeakReference<OnAuthenticatorTaskListener> mListener;
public AuthenticatorAsyncTask(Activity activity) {
mContext = activity.getApplicationContext();
mWeakContext = new WeakReference<>(activity.getApplicationContext());
mListener = new WeakReference<>((OnAuthenticatorTaskListener)activity);
}
@@ -55,21 +55,18 @@ public class AuthenticatorAsyncTask extends AsyncTask<Object, Void, RemoteOpera
protected RemoteOperationResult doInBackground(Object... params) {
RemoteOperationResult result;
if (params!= null && params.length==2) {
if (params != null && params.length == 2 && mWeakContext.get() != null) {
String url = (String)params[0];
Context context = mWeakContext.get();
OwnCloudCredentials credentials = (OwnCloudCredentials)params[1];
// Client
Uri uri = Uri.parse(url);
OwnCloudClient client = OwnCloudClientFactory.createOwnCloudClient(uri, mContext, true);
OwnCloudClient client = OwnCloudClientFactory.createOwnCloudClient(uri, context, true);
client.setCredentials(credentials);
// Operation - try credentials
ExistenceCheckRemoteOperation operation = new ExistenceCheckRemoteOperation(
REMOTE_PATH,
mContext,
SUCCESS_IF_ABSENT
);
ExistenceCheckRemoteOperation operation = new ExistenceCheckRemoteOperation(REMOTE_PATH, SUCCESS_IF_ABSENT);
result = operation.execute(client);
if (operation.wasRedirected()) {
@@ -0,0 +1,29 @@
package com.owncloud.android.authentication;
import android.net.Uri;
import android.os.Bundle;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.utils.ThemeUtils;
public class DeepLinkLoginActivity extends AuthenticatorActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.deep_link_login);
Uri data = getIntent().getData();
if (data != null) {
String prefix = getString(R.string.login_data_own_scheme) + PROTOCOL_SUFFIX + "login/";
LoginUrlInfo loginUrlInfo = parseLoginDataUrl(prefix, data.toString());
TextView loginText = findViewById(R.id.loginInfo);
loginText.setTextColor(ThemeUtils.fontColor(this));
loginText.setText(String.format("Login with %1$s to %2$s", loginUrlInfo.username,
loginUrlInfo.serverAddress));
}
}
}
@@ -27,11 +27,11 @@ import android.os.PowerManager;
import android.view.Window;
import android.view.WindowManager;
import com.nextcloud.client.preferences.PreferenceManager;
import com.owncloud.android.MainApp;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.ui.activity.PassCodeActivity;
import com.owncloud.android.ui.activity.Preferences;
import com.owncloud.android.ui.activity.RequestCredentialsActivity;
import com.owncloud.android.ui.activity.SettingsActivity;
import com.owncloud.android.utils.DeviceCredentialUtils;
import java.util.HashSet;
@@ -50,12 +50,11 @@ public final class PassCodeManager {
// other activities may be exempted, if needed
}
private static final int PASS_CODE_TIMEOUT = 1000;
private static final int PASS_CODE_TIMEOUT = 5000;
// keeping a "low" positive value is the easiest way to prevent the pass code is requested on rotations
private static PassCodeManager passCodeManagerInstance;
private Long timestamp = 0L;
private int visibleActivitiesCounter;
public static PassCodeManager getPassCodeManager() {
@@ -79,7 +78,8 @@ public final class PassCodeManager {
}
public void onActivityStarted(Activity activity) {
if (!exemptOfPasscodeActivities.contains(activity.getClass()) && passCodeShouldBeRequested()) {
Long timestamp = PreferenceManager.fromContext(activity).getLockTimestamp();
if (!exemptOfPasscodeActivities.contains(activity.getClass()) && passCodeShouldBeRequested(timestamp)) {
Intent i = new Intent(MainApp.getAppContext(), PassCodeActivity.class);
i.setAction(PassCodeActivity.ACTION_CHECK);
@@ -88,8 +88,7 @@ public final class PassCodeManager {
}
if (!exemptOfPasscodeActivities.contains(activity.getClass()) &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && deviceCredentialsShouldBeRequested(activity) &&
!DeviceCredentialUtils.tryEncrypt(activity)) {
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && deviceCredentialsShouldBeRequested(timestamp, activity)) {
Intent i = new Intent(MainApp.getAppContext(), RequestCredentialsActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
activity.startActivityForResult(i, PASSCODE_ACTIVITY);
@@ -102,7 +101,7 @@ public final class PassCodeManager {
if (visibleActivitiesCounter > 0) {
visibleActivitiesCounter--;
}
setUnlockTimestamp();
setUnlockTimestamp(activity);
PowerManager powerMgr = (PowerManager) activity.getSystemService(Context.POWER_SERVICE);
if ((passCodeIsEnabled() || deviceCredentialsAreEnabled(activity)) && powerMgr != null
&& !powerMgr.isScreenOn()) {
@@ -110,26 +109,26 @@ public final class PassCodeManager {
}
}
private void setUnlockTimestamp() {
timestamp = System.currentTimeMillis();
private void setUnlockTimestamp(Activity activity) {
PreferenceManager.fromContext(activity).setLockTimestamp(System.currentTimeMillis());
}
private boolean passCodeShouldBeRequested() {
private boolean passCodeShouldBeRequested(Long timestamp) {
return (System.currentTimeMillis() - timestamp) > PASS_CODE_TIMEOUT &&
visibleActivitiesCounter <= 0 && passCodeIsEnabled();
visibleActivitiesCounter <= 0 && passCodeIsEnabled();
}
private boolean passCodeIsEnabled() {
return PreferenceManager.getLockPreference(MainApp.getAppContext()).equals(Preferences.LOCK_PASSCODE);
return SettingsActivity.LOCK_PASSCODE.equals(PreferenceManager.getLockPreference(MainApp.getAppContext()));
}
private boolean deviceCredentialsShouldBeRequested(Activity activity) {
private boolean deviceCredentialsShouldBeRequested(Long timestamp, Activity activity) {
return (System.currentTimeMillis() - timestamp) > PASS_CODE_TIMEOUT && visibleActivitiesCounter <= 0 &&
deviceCredentialsAreEnabled(activity);
deviceCredentialsAreEnabled(activity);
}
private boolean deviceCredentialsAreEnabled(Activity activity) {
return PreferenceManager.getLockPreference(MainApp.getAppContext()).equals(Preferences.LOCK_DEVICE_CREDENTIALS)
return SettingsActivity.LOCK_DEVICE_CREDENTIALS.equals(PreferenceManager.getLockPreference(MainApp.getAppContext()))
|| Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
(PreferenceManager.isUseFingerprint(MainApp.getAppContext())
&& DeviceCredentialUtils.areCredentialsAvailable(activity));
@@ -24,9 +24,16 @@ package com.owncloud.android.datamodel;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
/**
* Decrypted class representation of metadata json of folder metadata.
*/
@Getter
@Setter
@AllArgsConstructor
public class DecryptedFolderMetadata {
private Metadata metadata;
private Map<String, DecryptedFile> files;
@@ -36,170 +43,47 @@ public class DecryptedFolderMetadata {
this.files = new HashMap<>();
}
public DecryptedFolderMetadata(Metadata metadata, Map<String, DecryptedFile> files) {
this.metadata = metadata;
this.files = files;
}
public Metadata getMetadata() {
return metadata;
}
public void setMetadata(Metadata metadata) {
this.metadata = metadata;
}
public Map<String, DecryptedFile> getFiles() {
return files;
}
public void setFiles(Map<String, DecryptedFile> files) {
this.files = files;
}
@Getter
@Setter
public static class Metadata {
private Map<Integer, String> metadataKeys; // each keys is encrypted on its own, decrypt on use
private Sharing sharing;
private int version;
public Map<Integer, String> getMetadataKeys() {
return metadataKeys;
}
public void setMetadataKeys(Map<Integer, String> metadataKeys) {
this.metadataKeys = metadataKeys;
}
public Sharing getSharing() {
return sharing;
}
public void setSharing(Sharing sharing) {
this.sharing = sharing;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
@Override
public String toString() {
return String.valueOf(version);
}
}
@Getter
@Setter
public static class Encrypted {
private Map<Integer, String> metadataKeys;
public Map<Integer, String> getMetadataKeys() {
return metadataKeys;
}
public void setMetadataKeys(Map<Integer, String> metadataKeys) {
this.metadataKeys = metadataKeys;
}
}
@Getter
@Setter
public static class Sharing {
private Map<String, String> recipient;
private String signature;
public Map<String, String> getRecipient() {
return recipient;
}
public void setRecipient(Map<String, String> recipient) {
this.recipient = recipient;
}
public String getSignature() {
return signature;
}
public void setSignature(String signature) {
this.signature = signature;
}
}
@Getter
@Setter
public static class DecryptedFile {
private Data encrypted;
private String initializationVector;
private String authenticationTag;
private int metadataKey;
public Data getEncrypted() {
return encrypted;
}
public void setEncrypted(Data encrypted) {
this.encrypted = encrypted;
}
public String getInitializationVector() {
return initializationVector;
}
public void setInitializationVector(String initializationVector) {
this.initializationVector = initializationVector;
}
public String getAuthenticationTag() {
return authenticationTag;
}
public void setAuthenticationTag(String authenticationTag) {
this.authenticationTag = authenticationTag;
}
public int getMetadataKey() {
return metadataKey;
}
public void setMetadataKey(int metadataKey) {
this.metadataKey = metadataKey;
}
}
@Getter
@Setter
public static class Data {
private String key;
private String filename;
private String mimetype;
private int version;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getMimetype() {
return mimetype;
}
public void setMimetype(String mimetype) {
this.mimetype = mimetype;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
}
}
@@ -22,54 +22,23 @@ package com.owncloud.android.datamodel;
import org.parceler.Parcel;
@Parcel public class DecryptedPushMessage {
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Parcel
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
/*
* Push data from server, https://github.com/nextcloud/notifications/blob/master/docs/push-v2.md#encrypted-subject-data
*/
public class DecryptedPushMessage {
public String app;
public String type;
public String subject;
public String id;
public DecryptedPushMessage(String app, String type, String subject, String id) {
this.app = app;
this.type = type;
this.subject = subject;
this.id = id;
}
public DecryptedPushMessage() {
}
public String getApp() {
return app;
}
public void setApp(String app) {
this.app = app;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public int nid;
}
@@ -23,71 +23,26 @@ package com.owncloud.android.datamodel;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
/**
* Encrypted class representation of metadata json of folder metadata
*/
@Getter
@Setter
@AllArgsConstructor
public class EncryptedFolderMetadata {
private DecryptedFolderMetadata.Metadata metadata;
private Map<String, EncryptedFile> files;
public EncryptedFolderMetadata(DecryptedFolderMetadata.Metadata metadata, Map<String, EncryptedFile> files) {
this.metadata = metadata;
this.files = files;
}
public DecryptedFolderMetadata.Metadata getMetadata() {
return metadata;
}
public void setMetadata(DecryptedFolderMetadata.Metadata metadata) {
this.metadata = metadata;
}
public Map<String, EncryptedFile> getFiles() {
return files;
}
public void setFiles(Map<String, EncryptedFile> files) {
this.files = files;
}
@Getter
@Setter
public static class EncryptedFile {
private String encrypted;
private String initializationVector;
private String authenticationTag;
private int metadataKey;
public String getEncrypted() {
return encrypted;
}
public void setEncrypted(String encrypted) {
this.encrypted = encrypted;
}
public String getInitializationVector() {
return initializationVector;
}
public void setInitializationVector(String initializationVector) {
this.initializationVector = initializationVector;
}
public String getAuthenticationTag() {
return authenticationTag;
}
public void setAuthenticationTag(String authenticationTag) {
this.authenticationTag = authenticationTag;
}
public int getMetadataKey() {
return metadataKey;
}
public void setMetadataKey(int metadataKey) {
this.metadataKey = metadataKey;
}
}
}
@@ -1,19 +1,19 @@
/*
* Nextcloud Android client application
*
*
* Copyright (C) 2017 Tobias Kaminsky
* Copyright (C) 2017 Nextcloud.
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or 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/>.
*/
@@ -23,7 +23,6 @@ import android.content.ContentResolver;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.support.annotation.NonNull;
import com.owncloud.android.db.ProviderMeta;
import com.owncloud.android.lib.common.ExternalLink;
@@ -33,6 +32,8 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import java.util.ArrayList;
import java.util.List;
import androidx.annotation.NonNull;
/**
* Database provider for handling the persistence aspects of {@link com.owncloud.android.lib.common.ExternalLink}s.
*/
@@ -1,18 +1,18 @@
/*
* ownCloud Android client application
*
*
* Copyright (C) 2012 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -33,15 +33,15 @@ import android.database.Cursor;
import android.net.Uri;
import android.os.RemoteException;
import android.provider.MediaStore;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import com.owncloud.android.MainApp;
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
import com.owncloud.android.lib.common.network.WebdavEntry;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
import com.owncloud.android.lib.resources.files.RemoteFile;
import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation;
import com.owncloud.android.lib.resources.files.model.RemoteFile;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
@@ -53,6 +53,7 @@ import com.owncloud.android.utils.MimeTypeUtil;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -61,51 +62,37 @@ import java.util.List;
import java.util.Locale;
import java.util.Set;
import androidx.annotation.Nullable;
import lombok.Getter;
import lombok.Setter;
@Getter
public class FileDataStorageManager {
private static final String TAG = FileDataStorageManager.class.getSimpleName();
public static final int ROOT_PARENT_ID = 0;
private ContentResolver mContentResolver;
private ContentProviderClient mContentProviderClient;
private Account mAccount;
private static final String AND = "=? AND ";
private static final String FAILED_TO_INSERT_MSG = "Fail to insert insert file to database ";
private static final String SENDING_TO_FILECONTENTPROVIDER_MSG = "Sending %d operations to FileContentProvider";
private static final String EXCEPTION_MSG = "Exception in batch of operations ";
private static final String TAG = FileDataStorageManager.class.getSimpleName();
public static final int ROOT_PARENT_ID = 0;
private ContentResolver contentResolver;
private ContentProviderClient contentProviderClient;
@Setter private Account account;
public FileDataStorageManager(Account account, ContentResolver cr) {
mContentProviderClient = null;
mContentResolver = cr;
mAccount = account;
contentProviderClient = null;
contentResolver = cr;
this.account = account;
}
public FileDataStorageManager(Account account, ContentProviderClient cp) {
mContentProviderClient = cp;
mContentResolver = null;
mAccount = account;
contentProviderClient = cp;
contentResolver = null;
this.account = account;
}
public void setAccount(Account account) {
mAccount = account;
}
public Account getAccount() {
return mAccount;
}
public ContentResolver getContentResolver() {
return mContentResolver;
}
public ContentProviderClient getContentProviderClient() {
return mContentProviderClient;
}
public OCFile getFileByPath(String path) {
Cursor c = getFileCursorForValue(ProviderTableMeta.FILE_PATH, path);
OCFile file = null;
@@ -119,7 +106,6 @@ public class FileDataStorageManager {
return file;
}
public @Nullable
OCFile getFileById(long id) {
Cursor c = getFileCursorForValue(ProviderTableMeta._ID, String.valueOf(id));
@@ -130,7 +116,7 @@ public class FileDataStorageManager {
c.close();
return file;
}
public OCFile getFileByLocalPath(String path) {
Cursor c = getFileCursorForValue(ProviderTableMeta.FILE_STORAGE_PATH, path);
OCFile file = null;
@@ -172,7 +158,7 @@ public class FileDataStorageManager {
public List<OCFile> getFolderImages(OCFile folder, boolean onlyOnDevice) {
List<OCFile> ret = new ArrayList<>();
if (folder != null) {
// TODO better implementation, filtering in the access to database instead of here
List<OCFile> tmp = getFolderContent(folder, onlyOnDevice);
@@ -205,30 +191,31 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_IS_ENCRYPTED, file.isEncrypted());
cv.put(ProviderTableMeta.FILE_STORAGE_PATH, file.getStoragePath());
}
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE, file.getLastSyncDateForProperties());
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, file.getLastSyncDateForData());
cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.isAvailableOffline() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag());
cv.put(ProviderTableMeta.FILE_ETAG_ON_SERVER, file.getEtagOnServer());
cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, file.isSharedViaLink() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, file.isSharedWithSharee() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink());
cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions());
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.isUpdateThumbnailNeeded());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
cv.put(ProviderTableMeta.FILE_UNREAD_COMMENTS_COUNT, file.getUnreadCommentsCount());
cv.put(ProviderTableMeta.FILE_OWNER_ID, file.getOwnerId());
cv.put(ProviderTableMeta.FILE_OWNER_DISPLAY_NAME, file.getOwnerDisplayName());
boolean sameRemotePath = fileExists(file.getRemotePath());
if (sameRemotePath ||
fileExists(file.getFileId())) { // for renamed files; no more delete and create
OCFile oldFile;
if (sameRemotePath) {
oldFile = getFileByPath(file.getRemotePath());
OCFile oldFile = getFileByPath(file.getRemotePath());
file.setFileId(oldFile.getFileId());
} else {
oldFile = getFileById(file.getFileId());
}
overridden = true;
@@ -274,7 +261,7 @@ public class FileDataStorageManager {
* @return the parent file
*/
public OCFile saveFileWithParent(OCFile file, Context context) {
if (file.getParentId() == 0 && !file.getRemotePath().equals("/")) {
if (file.getParentId() == 0 && !"/".equals(file.getRemotePath())) {
String remotePath = file.getRemotePath();
String parentPath = remotePath.substring(0, remotePath.lastIndexOf(file.getFileName()));
@@ -283,7 +270,7 @@ public class FileDataStorageManager {
OCFile returnFile;
if (parentFile == null) {
// remote request
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(parentPath);
ReadFileRemoteOperation operation = new ReadFileRemoteOperation(parentPath);
RemoteOperationResult result = operation.execute(getAccount(), context);
if (result.isSuccess()) {
OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile) result.getData().get(0));
@@ -359,16 +346,17 @@ public class FileDataStorageManager {
// prepare operations to remove files in the given folder
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + "=?";
String[] whereArgs;
String[] whereArgs = new String[2];
for (OCFile file : filesToRemove) {
if (file.getParentId() == folder.getFileId()) {
whereArgs = new String[]{mAccount.name, file.getRemotePath()};
whereArgs[0] = account.name;
whereArgs[1] = file.getRemotePath();
if (file.isFolder()) {
operations.add(ContentProviderOperation.newDelete(
ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_DIR, file.getFileId()))
.withSelection(where, whereArgs).build());
File localFolder = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file));
File localFolder = new File(FileStorageUtils.getDefaultSavePathFor(account.name, file));
if (localFolder.exists()) {
removeLocalFolder(localFolder);
}
@@ -414,7 +402,7 @@ public class FileDataStorageManager {
if (results != null) {
long newId;
Iterator<OCFile> filesIt = updatedFiles.iterator();
OCFile file = null;
OCFile file;
for (ContentProviderResult result : results) {
if (filesIt.hasNext()) {
file = filesIt.next();
@@ -445,18 +433,22 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_NAME, folder.getFileName());
cv.put(ProviderTableMeta.FILE_PARENT, folder.getParentId());
cv.put(ProviderTableMeta.FILE_PATH, folder.getRemotePath());
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE, folder.getLastSyncDateForProperties());
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, folder.getLastSyncDateForData());
cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, folder.isAvailableOffline() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_ETAG, folder.getEtag());
cv.put(ProviderTableMeta.FILE_ETAG_ON_SERVER, folder.getEtagOnServer());
cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, folder.isSharedViaLink() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, folder.isSharedWithSharee() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, folder.getPublicLink());
cv.put(ProviderTableMeta.FILE_PERMISSIONS, folder.getPermissions());
cv.put(ProviderTableMeta.FILE_REMOTE_ID, folder.getRemoteId());
cv.put(ProviderTableMeta.FILE_FAVORITE, folder.getIsFavorite());
cv.put(ProviderTableMeta.FILE_FAVORITE, folder.isFavorite());
cv.put(ProviderTableMeta.FILE_IS_ENCRYPTED, folder.isEncrypted());
cv.put(ProviderTableMeta.FILE_UNREAD_COMMENTS_COUNT, folder.getUnreadCommentsCount());
cv.put(ProviderTableMeta.FILE_OWNER_ID, folder.getOwnerId());
cv.put(ProviderTableMeta.FILE_OWNER_DISPLAY_NAME, folder.getOwnerDisplayName());
return cv;
}
@@ -474,22 +466,27 @@ public class FileDataStorageManager {
if (!file.isFolder()) {
cv.put(ProviderTableMeta.FILE_STORAGE_PATH, file.getStoragePath());
}
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE, file.getLastSyncDateForProperties());
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, file.getLastSyncDateForData());
cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.isAvailableOffline() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag());
cv.put(ProviderTableMeta.FILE_ETAG_ON_SERVER, file.getEtagOnServer());
cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, file.isSharedViaLink() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, file.isSharedWithSharee() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink());
cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions());
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.isUpdateThumbnailNeeded());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
cv.put(ProviderTableMeta.FILE_FAVORITE, file.getIsFavorite());
cv.put(ProviderTableMeta.FILE_FAVORITE, file.isFavorite());
cv.put(ProviderTableMeta.FILE_IS_ENCRYPTED, file.isEncrypted());
cv.put(ProviderTableMeta.FILE_MOUNT_TYPE, file.getMountType().ordinal());
cv.put(ProviderTableMeta.FILE_HAS_PREVIEW, file.isPreviewAvailable() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_UNREAD_COMMENTS_COUNT, file.getUnreadCommentsCount());
cv.put(ProviderTableMeta.FILE_OWNER_ID, file.getOwnerId());
cv.put(ProviderTableMeta.FILE_OWNER_DISPLAY_NAME, file.getOwnerDisplayName());
return cv;
}
@@ -505,7 +502,7 @@ public class FileDataStorageManager {
// ""+file.getFileId());
Uri file_uri = ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_FILE, file.getFileId());
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + "=?";
String[] whereArgs = new String[]{mAccount.name, file.getRemotePath()};
String[] whereArgs = new String[]{account.name, file.getRemotePath()};
int deleted = 0;
if (getContentProviderClient() != null) {
try {
@@ -557,10 +554,10 @@ public class FileDataStorageManager {
}
private boolean removeFolderInDb(OCFile folder) {
Uri folder_uri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_DIR, "" + folder.getFileId()); // URI
Uri folder_uri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_DIR, String.valueOf(folder.getFileId())); // URI
// for recursive deletion
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + "=?";
String[] whereArgs = new String[]{mAccount.name, folder.getRemotePath()};
String[] whereArgs = new String[]{account.name, folder.getRemotePath()};
int deleted = 0;
if (getContentProviderClient() != null) {
try {
@@ -576,7 +573,7 @@ public class FileDataStorageManager {
private boolean removeLocalFolder(OCFile folder) {
boolean success = true;
String localFolderPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, folder);
String localFolderPath = FileStorageUtils.getDefaultSavePathFor(account.name, folder);
File localFolder = new File(localFolderPath);
if (localFolder.exists()) {
// stage 1: remove the local files already registered in the files database
@@ -600,7 +597,7 @@ public class FileDataStorageManager {
}
}
// stage 2: remove the folder itself and any local file inside out of sync;
// stage 2: remove the folder itself and any local file inside out of sync;
// for instance, after clearing the app cache or reinstalling
success &= removeLocalFolder(localFolder);
}
@@ -646,7 +643,7 @@ public class FileDataStorageManager {
ProviderTableMeta.CONTENT_URI,
null,
ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + " LIKE ? ",
new String[]{mAccount.name, file.getRemotePath() + "%"},
new String[]{account.name, file.getRemotePath() + "%"},
ProviderTableMeta.FILE_PATH + " ASC "
);
} catch (RemoteException e) {
@@ -658,16 +655,16 @@ public class FileDataStorageManager {
ProviderTableMeta.CONTENT_URI,
null,
ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + " LIKE ? ",
new String[]{mAccount.name, file.getRemotePath() + "%"},
new String[]{account.name, file.getRemotePath() + "%"},
ProviderTableMeta.FILE_PATH + " ASC "
);
}
/// 2. prepare a batch of update operations to change all the descendants
ArrayList<ContentProviderOperation> operations = new ArrayList<>(c.getCount());
String defaultSavePath = FileStorageUtils.getSavePath(mAccount.name);
List<String> originalPathsToTriggerMediaScan = new ArrayList<String>();
List<String> newPathsToTriggerMediaScan = new ArrayList<String>();
String defaultSavePath = FileStorageUtils.getSavePath(account.name);
List<String> originalPathsToTriggerMediaScan = new ArrayList<>();
List<String> newPathsToTriggerMediaScan = new ArrayList<>();
if (c.moveToFirst()) {
int lengthOfOldPath = file.getRemotePath().length();
int lengthOfOldStoragePath = defaultSavePath.length() + lengthOfOldPath;
@@ -717,8 +714,8 @@ public class FileDataStorageManager {
Log_OC.e(TAG, "Fail to update " + file.getFileId() + " and descendants in database", e);
}
/// 4. move in local file system
String originalLocalPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
/// 4. move in local file system
String originalLocalPath = FileStorageUtils.getDefaultSavePathFor(account.name, file);
String targetLocalPath = defaultSavePath + targetPath;
File localFile = new File(originalLocalPath);
boolean renamed = false;
@@ -750,10 +747,10 @@ public class FileDataStorageManager {
public void copyLocalFile(OCFile file, String targetPath) {
if (file != null && file.fileExists() && !OCFile.ROOT_PATH.equals(file.getFileName())) {
String localPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
String localPath = FileStorageUtils.getDefaultSavePathFor(account.name, file);
File localFile = new File(localPath);
boolean copied = false;
String defaultSavePath = FileStorageUtils.getSavePath(mAccount.name);
String defaultSavePath = FileStorageUtils.getSavePath(account.name);
if (localFile.exists()) {
File targetFile = new File(defaultSavePath + targetPath);
File targetFolder = targetFile.getParentFile();
@@ -859,7 +856,7 @@ public class FileDataStorageManager {
}
} while (c.moveToNext());
}
c.close();
}
@@ -869,7 +866,7 @@ public class FileDataStorageManager {
private OCFile createRootDir() {
OCFile file = new OCFile(OCFile.ROOT_PATH);
file.setMimetype(MimeType.DIRECTORY);
file.setMimeType(MimeType.DIRECTORY);
file.setParentId(FileDataStorageManager.ROOT_PARENT_ID);
saveFile(file);
return file;
@@ -884,7 +881,7 @@ public class FileDataStorageManager {
cmp_key + AND
+ ProviderTableMeta.FILE_ACCOUNT_OWNER
+ "=?",
new String[]{value, mAccount.name}, null);
new String[]{value, account.name}, null);
} else {
try {
c = getContentProviderClient().query(
@@ -892,7 +889,7 @@ public class FileDataStorageManager {
null,
cmp_key + AND
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?",
new String[]{value, mAccount.name}, null);
new String[]{value, account.name}, null);
} catch (RemoteException e) {
Log_OC.e(TAG, "Couldn't determine file existance, assuming non existance: " + e.getMessage(), e);
return false;
@@ -904,7 +901,7 @@ public class FileDataStorageManager {
}
private Cursor getFileCursorForValue(String key, String value) {
Cursor c = null;
Cursor c;
if (getContentResolver() != null) {
c = getContentResolver()
.query(ProviderTableMeta.CONTENT_URI,
@@ -912,14 +909,14 @@ public class FileDataStorageManager {
key + AND
+ ProviderTableMeta.FILE_ACCOUNT_OWNER
+ "=?",
new String[]{value, mAccount.name}, null);
new String[]{value, account.name}, null);
} else {
try {
c = getContentProviderClient().query(
ProviderTableMeta.CONTENT_URI,
null,
key + AND + ProviderTableMeta.FILE_ACCOUNT_OWNER
+ "=?", new String[]{value, mAccount.name},
+ "=?", new String[]{value, account.name},
null);
} catch (RemoteException e) {
Log_OC.e(TAG, "Could not get file details: " + e.getMessage(), e);
@@ -947,13 +944,13 @@ public class FileDataStorageManager {
file.setFileId(c.getLong(c.getColumnIndex(ProviderTableMeta._ID)));
file.setParentId(c.getLong(c.getColumnIndex(ProviderTableMeta.FILE_PARENT)));
file.setEncryptedFileName(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ENCRYPTED_NAME)));
file.setMimetype(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_CONTENT_TYPE)));
file.setMimeType(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_CONTENT_TYPE)));
file.setStoragePath(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_STORAGE_PATH)));
if (file.getStoragePath() == null) {
// try to find existing file and bind it with current account;
// with the current update of SynchronizeFolderOperation, this won't be
// necessary anymore after a full synchronization of the account
File f = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file));
File f = new File(FileStorageUtils.getDefaultSavePathFor(account.name, file));
if (f.exists()) {
file.setStoragePath(f.getAbsolutePath());
file.setLastSyncDateForData(f.lastModified());
@@ -966,14 +963,14 @@ public class FileDataStorageManager {
c.getColumnIndex(ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA)));
file.setLastSyncDateForProperties(c.getLong(c.getColumnIndex(ProviderTableMeta.FILE_LAST_SYNC_DATE)));
file.setLastSyncDateForData(c.getLong(c.getColumnIndex(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA)));
file.setAvailableOffline(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_KEEP_IN_SYNC)) == 1);
file.setEtag(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG)));
file.setShareViaLink(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_SHARED_VIA_LINK)) == 1);
file.setShareWithSharee(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_SHARED_WITH_SHAREE)) == 1);
file.setEtagOnServer(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG_ON_SERVER)));
file.setSharedViaLink(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_SHARED_VIA_LINK)) == 1);
file.setSharedWithSharee(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_SHARED_WITH_SHAREE)) == 1);
file.setPublicLink(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_PUBLIC_LINK)));
file.setPermissions(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_PERMISSIONS)));
file.setRemoteId(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_REMOTE_ID)));
file.setNeedsUpdateThumbnail(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1);
file.setUpdateThumbnailNeeded(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1);
file.setDownloading(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_IS_DOWNLOADING)) == 1);
file.setEtagInConflict(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG_IN_CONFLICT)));
file.setFavorite(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_FAVORITE)) == 1);
@@ -983,7 +980,12 @@ public class FileDataStorageManager {
}
file.setMountType(WebdavEntry.MountType.values()[c.getInt(
c.getColumnIndex(ProviderTableMeta.FILE_MOUNT_TYPE))]);
file.setPreviewAvailable(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_HAS_PREVIEW)) == 1);
file.setUnreadCommentsCount(c.getInt(c.getColumnIndex(ProviderTableMeta.FILE_UNREAD_COMMENTS_COUNT)));
file.setOwnerId(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_OWNER_ID)));
file.setOwnerDisplayName(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_OWNER_DISPLAY_NAME)));
}
return file;
}
@@ -1000,16 +1002,14 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.OCSHARES_SHARED_DATE, share.getSharedDate());
cv.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE, share.getExpirationDate());
cv.put(ProviderTableMeta.OCSHARES_TOKEN, share.getToken());
cv.put(
ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
share.getSharedWithDisplayName()
);
cv.put(ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME, share.getSharedWithDisplayName());
cv.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY, share.isFolder() ? 1 : 0);
cv.put(ProviderTableMeta.OCSHARES_USER_ID, share.getUserId());
cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getRemoteId());
cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED, share.isPasswordProtected() ? 1 : 0);
cv.put(ProviderTableMeta.OCSHARES_NOTE, share.getNote());
cv.put(ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD, share.isHideFileDownload());
if (shareExistsForRemoteId(share.getRemoteId())) {// for renamed files; no more delete and create
overriden = true;
@@ -1109,7 +1109,7 @@ public class FileDataStorageManager {
null,
key + AND
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?",
new String[]{value, mAccount.name},
new String[]{value, account.name},
null
);
} else {
@@ -1118,7 +1118,7 @@ public class FileDataStorageManager {
ProviderTableMeta.CONTENT_URI_SHARE,
null,
key + AND + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?",
new String[]{value, mAccount.name},
new String[]{value, account.name},
null
);
} catch (RemoteException e) {
@@ -1139,7 +1139,7 @@ public class FileDataStorageManager {
* @return First {@link OCShare} instance found in DB bound to the file in 'path'
*/
public OCShare getFirstShareByPathAndType(String path, ShareType type, String shareWith) {
Cursor cursor = null;
Cursor cursor;
if (shareWith == null) {
shareWith = "";
}
@@ -1156,13 +1156,13 @@ public class FileDataStorageManager {
selectionArgs = new String[]{
path,
Integer.toString(type.getValue()),
mAccount.name
account.name
};
} else {
selectionArgs = new String[]{
path,
Integer.toString(type.getValue()),
mAccount.name,
account.name,
shareWith
};
}
@@ -1211,10 +1211,12 @@ public class FileDataStorageManager {
share.setToken(c.getString(c.getColumnIndex(ProviderTableMeta.OCSHARES_TOKEN)));
share.setSharedWithDisplayName(
c.getString(c.getColumnIndex(ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME)));
share.setIsFolder(c.getInt(c.getColumnIndex(ProviderTableMeta.OCSHARES_IS_DIRECTORY)) == 1);
share.setFolder(c.getInt(c.getColumnIndex(ProviderTableMeta.OCSHARES_IS_DIRECTORY)) == 1);
share.setUserId(c.getLong(c.getColumnIndex(ProviderTableMeta.OCSHARES_USER_ID)));
share.setIdRemoteShared(c.getLong(c.getColumnIndex(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED)));
share.setIsPasswordProtected(c.getInt(c.getColumnIndex(ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED)) == 1);
share.setRemoteId(c.getLong(c.getColumnIndex(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED)));
share.setPasswordProtected(c.getInt(c.getColumnIndex(ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED)) == 1);
share.setNote(c.getString(c.getColumnIndex(ProviderTableMeta.OCSHARES_NOTE)));
share.setHideFileDownload(c.getInt(c.getColumnIndex(ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD)) == 1);
}
return share;
}
@@ -1225,7 +1227,7 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, false);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, "");
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?";
String[] whereArgs = new String[]{mAccount.name};
String[] whereArgs = new String[]{account.name};
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
@@ -1245,7 +1247,7 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, false);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, "");
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PARENT + "=?";
String[] whereArgs = new String[]{mAccount.name, String.valueOf(folder.getFileId())};
String[] whereArgs = new String[]{account.name, String.valueOf(folder.getFileId())};
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
@@ -1265,7 +1267,7 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, false);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, "");
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + "=?";
String[] whereArgs = new String[]{mAccount.name, filePath};
String[] whereArgs = new String[]{account.name, filePath};
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
@@ -1281,7 +1283,7 @@ public class FileDataStorageManager {
private void cleanShares() {
String where = ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
String[] whereArgs = new String[]{mAccount.name};
String[] whereArgs = new String[]{account.name};
if (getContentResolver() != null) {
getContentResolver().delete(ProviderTableMeta.CONTENT_URI_SHARE, where, whereArgs);
@@ -1313,16 +1315,14 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.OCSHARES_SHARED_DATE, share.getSharedDate());
cv.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE, share.getExpirationDate());
cv.put(ProviderTableMeta.OCSHARES_TOKEN, share.getToken());
cv.put(
ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
share.getSharedWithDisplayName()
);
cv.put(ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME, share.getSharedWithDisplayName());
cv.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY, share.isFolder() ? 1 : 0);
cv.put(ProviderTableMeta.OCSHARES_USER_ID, share.getUserId());
cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getRemoteId());
cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED, share.isPasswordProtected() ? 1 : 0);
cv.put(ProviderTableMeta.OCSHARES_NOTE, share.getNote());
cv.put(ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD, share.isHideFileDownload());
if (shareExistsForRemoteId(share.getRemoteId())) {
// updating an existing file
@@ -1386,28 +1386,22 @@ public class FileDataStorageManager {
if (!file.isFolder()) {
cv.put(ProviderTableMeta.FILE_STORAGE_PATH, file.getStoragePath());
}
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE, file.getLastSyncDateForProperties());
cv.put(
ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA,
file.getLastSyncDateForData()
);
cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.isAvailableOffline() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag());
cv.put(ProviderTableMeta.FILE_ETAG_ON_SERVER, file.getEtagOnServer());
cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, file.isSharedViaLink() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, file.isSharedWithSharee() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink());
cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions());
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_FAVORITE, file.getIsFavorite());
cv.put(
ProviderTableMeta.FILE_UPDATE_THUMBNAIL,
file.needsUpdateThumbnail() ? 1 : 0
);
cv.put(
ProviderTableMeta.FILE_IS_DOWNLOADING,
file.isDownloading() ? 1 : 0
);
cv.put(ProviderTableMeta.FILE_FAVORITE, file.isFavorite());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.isUpdateThumbnailNeeded() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading() ? 1 : 0);
cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
boolean existsByPath = fileExists(file.getRemotePath());
@@ -1454,7 +1448,7 @@ public class FileDataStorageManager {
Uri share_uri = ProviderTableMeta.CONTENT_URI_SHARE;
String where = ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + AND +
ProviderTableMeta._ID + "=?";
String[] whereArgs = new String[]{mAccount.name, Long.toString(share.getId())};
String[] whereArgs = new String[]{account.name, Long.toString(share.getId())};
if (getContentProviderClient() != null) {
try {
getContentProviderClient().delete(share_uri, where, whereArgs);
@@ -1525,7 +1519,7 @@ public class FileDataStorageManager {
public void removeSharesForFile(String remotePath) {
resetShareFlagInAFile(remotePath);
ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
ArrayList<ContentProviderOperation> operations = new ArrayList<>();
operations = prepareRemoveSharesInFile(remotePath, operations);
// apply operations in batch
if (operations.size() > 0) {
@@ -1547,7 +1541,7 @@ public class FileDataStorageManager {
public void saveSharesInFolder(ArrayList<OCShare> shares, OCFile folder) {
resetShareFlagsInFolder(folder);
ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
ArrayList<ContentProviderOperation> operations = new ArrayList<>();
operations = prepareRemoveSharesInFolder(folder, operations);
if (shares != null) {
@@ -1584,9 +1578,10 @@ public class FileDataStorageManager {
List<OCShare> shares, ArrayList<ContentProviderOperation> operations) {
if (shares != null) {
ContentValues cv;
// prepare operations to insert or update files to save in the given folder
for (OCShare share : shares) {
ContentValues cv = new ContentValues();
cv = new ContentValues();
cv.put(ProviderTableMeta.OCSHARES_FILE_SOURCE, share.getFileSource());
cv.put(ProviderTableMeta.OCSHARES_ITEM_SOURCE, share.getItemSource());
cv.put(ProviderTableMeta.OCSHARES_SHARE_TYPE, share.getShareType().getValue());
@@ -1596,23 +1591,18 @@ public class FileDataStorageManager {
cv.put(ProviderTableMeta.OCSHARES_SHARED_DATE, share.getSharedDate());
cv.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE, share.getExpirationDate());
cv.put(ProviderTableMeta.OCSHARES_TOKEN, share.getToken());
cv.put(
ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
share.getSharedWithDisplayName()
);
cv.put(ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME, share.getSharedWithDisplayName());
cv.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY, share.isFolder() ? 1 : 0);
cv.put(ProviderTableMeta.OCSHARES_USER_ID, share.getUserId());
cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getRemoteId());
cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, mAccount.name);
cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, account.name);
cv.put(ProviderTableMeta.OCSHARES_IS_PASSWORD_PROTECTED, share.isPasswordProtected() ? 1 : 0);
cv.put(ProviderTableMeta.OCSHARES_NOTE, share.getNote());
cv.put(ProviderTableMeta.OCSHARES_HIDE_DOWNLOAD, share.isHideFileDownload());
// adding a new share resource
operations.add(
ContentProviderOperation.newInsert(ProviderTableMeta.CONTENT_URI_SHARE).
withValues(cv).
build()
);
operations.add(ContentProviderOperation.newInsert(
ProviderTableMeta.CONTENT_URI_SHARE).withValues(cv).build());
}
}
return operations;
@@ -1623,7 +1613,7 @@ public class FileDataStorageManager {
if (folder != null) {
String where = ProviderTableMeta.OCSHARES_PATH + AND
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
String[] whereArgs = new String[]{"", mAccount.name};
String[] whereArgs = new String[]{"", account.name};
List<OCFile> files = getFolderContent(folder, false);
@@ -1645,7 +1635,7 @@ public class FileDataStorageManager {
String where = ProviderTableMeta.OCSHARES_PATH + AND
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
String[] whereArgs = new String[]{filePath, mAccount.name};
String[] whereArgs = new String[]{filePath, account.name};
preparedOperations.add(
ContentProviderOperation.newDelete(ProviderTableMeta.CONTENT_URI_SHARE).
@@ -1664,31 +1654,30 @@ public class FileDataStorageManager {
+ " (" + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR "
+ ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR "
+ ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR "
+ ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR "
+ ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? ) ";
String[] whereArgs = new String[]{filePath, accountName,
Integer.toString(ShareType.USER.getValue()),
Integer.toString(ShareType.GROUP.getValue()),
Integer.toString(ShareType.EMAIL.getValue()),
Integer.toString(ShareType.FEDERATED.getValue())};
Integer.toString(ShareType.FEDERATED.getValue()),
Integer.toString(ShareType.ROOM.getValue())};
Cursor cursor = null;
if (getContentResolver() != null) {
cursor = getContentResolver().query(
ProviderTableMeta.CONTENT_URI_SHARE,
null, where, whereArgs, null);
cursor = getContentResolver().query(ProviderTableMeta.CONTENT_URI_SHARE, null, where, whereArgs, null);
} else {
try {
cursor = getContentProviderClient().query(
ProviderTableMeta.CONTENT_URI_SHARE,
null, where, whereArgs, null);
cursor = getContentProviderClient().query(ProviderTableMeta.CONTENT_URI_SHARE, null, where,
whereArgs, null);
} catch (RemoteException e) {
Log_OC.e(TAG, "Could not get list of shares with: " + e.getMessage(), e);
cursor = null;
}
}
ArrayList<OCShare> shares = new ArrayList<OCShare>();
OCShare share = null;
ArrayList<OCShare> shares = new ArrayList<>();
OCShare share;
if (cursor != null) {
if (cursor.moveToFirst()) {
do {
@@ -1844,7 +1833,7 @@ public class FileDataStorageManager {
ProviderTableMeta.CONTENT_URI_FILE,
new String[]{ProviderTableMeta._ID},
whereForDescencentsInConflict,
new String[]{mAccount.name, parentPath + "%"},
new String[]{account.name, parentPath + "%"},
null
);
} else {
@@ -1853,7 +1842,7 @@ public class FileDataStorageManager {
ProviderTableMeta.CONTENT_URI_FILE,
new String[]{ProviderTableMeta._ID},
whereForDescencentsInConflict,
new String[]{mAccount.name, parentPath + "%"},
new String[]{account.name, parentPath + "%"},
null
);
} catch (RemoteException e) {
@@ -1868,7 +1857,7 @@ public class FileDataStorageManager {
cv,
ProviderTableMeta.FILE_ACCOUNT_OWNER + AND +
ProviderTableMeta.FILE_PATH + "=?",
new String[]{mAccount.name, parentPath}
new String[]{account.name, parentPath}
);
} else {
try {
@@ -1877,7 +1866,7 @@ public class FileDataStorageManager {
cv,
ProviderTableMeta.FILE_ACCOUNT_OWNER + AND +
ProviderTableMeta.FILE_PATH + "=?"
, new String[]{mAccount.name, parentPath}
, new String[]{account.name, parentPath}
);
} catch (RemoteException e) {
Log_OC.e(TAG, "Failed saving conflict in database " + e.getMessage(), e);
@@ -1905,13 +1894,13 @@ public class FileDataStorageManager {
// Prepare capabilities data
ContentValues cv = new ContentValues();
cv.put(ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME, mAccount.name);
cv.put(ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME, account.name);
cv.put(ProviderTableMeta.CAPABILITIES_VERSION_MAYOR, capability.getVersionMayor());
cv.put(ProviderTableMeta.CAPABILITIES_VERSION_MINOR, capability.getVersionMinor());
cv.put(ProviderTableMeta.CAPABILITIES_VERSION_MICRO, capability.getVersionMicro());
cv.put(ProviderTableMeta.CAPABILITIES_VERSION_STRING, capability.getVersionString());
cv.put(ProviderTableMeta.CAPABILITIES_VERSION_EDITION, capability.getVersionEdition());
cv.put(ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL, capability.getCorePollinterval());
cv.put(ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL, capability.getCorePollInterval());
cv.put(ProviderTableMeta.CAPABILITIES_SHARING_API_ENABLED, capability.getFilesSharingApiEnabled().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_ENABLED,
capability.getFilesSharingPublicEnabled().getValue());
@@ -1934,7 +1923,7 @@ public class FileDataStorageManager {
capability.getFilesSharingFederationOutgoing().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_INCOMING,
capability.getFilesSharingFederationIncoming().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_FILES_BIGFILECHUNKING, capability.getFilesBigFileChuncking().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_FILES_BIGFILECHUNKING, capability.getFilesBigFileChunking().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_FILES_UNDELETE, capability.getFilesUndelete().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_FILES_VERSIONING, capability.getFilesVersioning().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_FILES_DROP, capability.getFilesFileDrop().getValue());
@@ -1950,18 +1939,25 @@ public class FileDataStorageManager {
.getValue());
cv.put(ProviderTableMeta.CAPABILITIES_SERVER_BACKGROUND_PLAIN, capability.getServerBackgroundPlain()
.getValue());
cv.put(ProviderTableMeta.CAPABILITIES_ACTIVITY, capability.isActivityEnabled().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_ACTIVITY, capability.getActivity().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT, capability.getRichDocuments().getValue());
cv.put(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT_MIMETYPE_LIST,
TextUtils.join(",", capability.getRichDocumentsMimeTypeList()));
cv.put(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT_DIRECT_EDITING, capability.getRichDocumentsDirectEditing()
.getValue());
cv.put(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT_TEMPLATES, capability.getRichDocumentsTemplatesAvailable()
.getValue());
if (capabilityExists(mAccount.name)) {
if (capabilityExists(account.name)) {
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI_CAPABILITIES, cv,
ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + "=?",
new String[]{mAccount.name});
new String[]{account.name});
} else {
try {
getContentProviderClient().update(ProviderTableMeta.CONTENT_URI_CAPABILITIES,
cv, ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + "=?",
new String[]{mAccount.name});
new String[]{account.name});
} catch (RemoteException e) {
Log_OC.e(TAG, FAILED_TO_INSERT_MSG + e.getMessage(), e);
}
@@ -1983,7 +1979,7 @@ public class FileDataStorageManager {
long new_id = Long.parseLong(result_uri.getPathSegments()
.get(1));
capability.setId(new_id);
capability.setAccountName(mAccount.name);
capability.setAccountName(account.name);
}
}
@@ -2024,7 +2020,7 @@ public class FileDataStorageManager {
}
public OCCapability getCapability(String accountName) {
OCCapability capability = null;
OCCapability capability;
Cursor c = getCapabilityCursorForAccount(accountName);
if (c.moveToFirst()) {
@@ -2053,7 +2049,7 @@ public class FileDataStorageManager {
.getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_STRING)));
capability.setVersionEdition(c.getString(c
.getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_EDITION)));
capability.setCorePollinterval(c.getInt(c
capability.setCorePollInterval(c.getInt(c
.getColumnIndex(ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL)));
capability.setFilesSharingApiEnabled(CapabilityBooleanType.fromValue(c.getInt(c
.getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_API_ENABLED))));
@@ -2079,7 +2075,7 @@ public class FileDataStorageManager {
.getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_OUTGOING))));
capability.setFilesSharingFederationIncoming(CapabilityBooleanType.fromValue(c.getInt(c
.getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_INCOMING))));
capability.setFilesBigFileChuncking(CapabilityBooleanType.fromValue(c.getInt(c
capability.setFilesBigFileChunking(CapabilityBooleanType.fromValue(c.getInt(c
.getColumnIndex(ProviderTableMeta.CAPABILITIES_FILES_BIGFILECHUNKING))));
capability.setFilesUndelete(CapabilityBooleanType.fromValue(c.getInt(c
.getColumnIndex(ProviderTableMeta.CAPABILITIES_FILES_UNDELETE))));
@@ -2106,6 +2102,17 @@ public class FileDataStorageManager {
c.getInt(c.getColumnIndex(ProviderTableMeta.CAPABILITIES_SERVER_BACKGROUND_PLAIN))));
capability.setActivity(CapabilityBooleanType.fromValue(
c.getInt(c.getColumnIndex(ProviderTableMeta.CAPABILITIES_ACTIVITY))));
capability.setRichDocuments(CapabilityBooleanType.fromValue(c.getInt(
c.getColumnIndex(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT))));
capability.setRichDocumentsDirectEditing(CapabilityBooleanType.fromValue(c.getInt(
c.getColumnIndex(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT_DIRECT_EDITING))));
capability.setRichDocumentsTemplatesAvailable(CapabilityBooleanType.fromValue(c.getInt(
c.getColumnIndex(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT_TEMPLATES))));
String mimetypes = c.getString(c.getColumnIndex(ProviderTableMeta.CAPABILITIES_RICHDOCUMENT_MIMETYPE_LIST));
if (mimetypes == null) {
mimetypes = "";
}
capability.setRichDocumentsMimeTypeList(Arrays.asList(mimetypes.split(",")));
}
return capability;
}
@@ -2214,7 +2221,7 @@ public class FileDataStorageManager {
public void deleteAllFiles() {
String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?";
String[] whereArgs = new String[]{mAccount.name};
String[] whereArgs = new String[]{account.name};
if (getContentResolver() != null) {
getContentResolver().delete(ProviderTableMeta.CONTENT_URI_FILE, where, whereArgs);
@@ -2223,7 +2230,7 @@ public class FileDataStorageManager {
try {
getContentProviderClient().delete(ProviderTableMeta.CONTENT_URI_FILE, where, whereArgs);
} catch (RemoteException e) {
Log_OC.e(TAG, "Exception in deleteAllFiles for account " + mAccount.name + ": " + e.getMessage(), e);
Log_OC.e(TAG, "Exception in deleteAllFiles for account " + account.name + ": " + e.getMessage(), e);
}
}
}
@@ -2,8 +2,10 @@
* Nextcloud Android client application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2017 Mario Danic
* Copyright (C) 2017 Nextcloud
* Copyright (C) 2018 Andy Scherzinger
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -20,13 +22,20 @@
*/
package com.owncloud.android.datamodel;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Model for filesystem data from the database.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class FileSystemDataSet {
private int id;
private String localPath;
private long modifiedAt;
@@ -35,83 +44,4 @@ public class FileSystemDataSet {
private long foundAt;
private long syncedFolderId;
@Nullable private String crc32;
public FileSystemDataSet() {
}
public FileSystemDataSet(int id, String localPath, long modifiedAt, boolean folder,
boolean sentForUpload, long foundAt, long syncedFolderId, @Nullable String crc32) {
this.id = id;
this.localPath = localPath;
this.modifiedAt = modifiedAt;
this.folder = folder;
this.sentForUpload = sentForUpload;
this.foundAt = foundAt;
this.syncedFolderId = syncedFolderId;
this.crc32 = crc32;
}
public String getCrc32() {
return crc32;
}
public void setCrc32(String crc32) {
this.crc32 = crc32;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getLocalPath() {
return localPath;
}
public void setLocalPath(String localPath) {
this.localPath = localPath;
}
public long getModifiedAt() {
return modifiedAt;
}
public void setModifiedAt(long modifiedAt) {
this.modifiedAt = modifiedAt;
}
public boolean isFolder() {
return folder;
}
public void setFolder(boolean folder) {
this.folder = folder;
}
public long getFoundAt() {
return foundAt;
}
public void setFoundAt(long foundAt) {
this.foundAt = foundAt;
}
public boolean isSentForUpload() {
return sentForUpload;
}
public void setSentForUpload(boolean sentForUpload) {
this.sentForUpload = sentForUpload;
}
public long getSyncedFolderId() {
return syncedFolderId;
}
public void setSyncedFolderId(long syncedFolderId) {
this.syncedFolderId = syncedFolderId;
}
}
@@ -21,6 +21,8 @@ package com.owncloud.android.datamodel;
import android.util.SparseArray;
import lombok.Getter;
/**
* Types of media folder.
*/
@@ -29,7 +31,7 @@ public enum MediaFolderType {
IMAGE(1),
VIDEO(2);
private Integer id;
@Getter private Integer id;
private static SparseArray<MediaFolderType> reverseMap = new SparseArray<>(3);
@@ -46,8 +48,4 @@ public enum MediaFolderType {
public static MediaFolderType getById(Integer id) {
return reverseMap.get(id);
}
public Integer getId() {
return id;
}
}
@@ -2,7 +2,9 @@
* Nextcloud Android client application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2018 Mario Danic
* Copyright (C) 2018 Andy Scherzinger
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -22,35 +24,15 @@ package com.owncloud.android.datamodel;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter @Setter
@NoArgsConstructor
@AllArgsConstructor
public class MediaFoldersModel {
private List<String> imageMediaFolders;
private List<String> videoMediaFolders;
/**
* default constructor.
*/
public MediaFoldersModel() {
// keep default constructor for GSON
}
public MediaFoldersModel(List<String> imageMediaFolders, List<String> videoMediaFolders) {
this.imageMediaFolders = imageMediaFolders;
this.videoMediaFolders = videoMediaFolders;
}
public List<String> getImageMediaFolders() {
return imageMediaFolders;
}
public void setImageMediaFolders(List<String> imageMediaFolders) {
this.imageMediaFolders = imageMediaFolders;
}
public List<String> getVideoMediaFolders() {
return videoMediaFolders;
}
public void setVideoMediaFolders(List<String> videoMediaFolders) {
this.videoMediaFolders = videoMediaFolders;
}
}
Loaded 100 of 517 files, more files were not shown because too many files have changed in this diff. Show more