Commit graph

15740 commits

Author SHA1 Message Date
nextcloud-android-bot
9583fc87ec Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
Signed-off-by: nextcloud-android-bot <android@nextcloud.com>
2020-08-27 15:52:23 +00:00
Torsten Grote
27f48b331f
Instrumentation tests for DocumentsProvider
Note there's still some FIXMEs in the tests that hint at bugs discovered
by the tests.

Also this is very incomplete, but a good beginning for further tests.

Signed-off-by: Torsten Grote <t@grobox.de>
2020-08-27 11:18:14 -03:00
Torsten Grote
1fdea37c2b
Improve DocumentsProvider implementation
The initial goal was to make all operations completely synchronous,
so failures can be detected by apps using our DocumentsProvider.

However, `#openDocument()` could not be made fully synchronous,
because we need to wait for the ParcelFileDescriptor we are returning to
close before we can upload a file.
Nextcloud works with locally cached files that only get synchronized to
remote storage.

Things I have tried:

* Use the Handler from the calling I/O Thread:
  not guaranteed to have a prepared Looper,
  so can't always create Handler on that Thread
* Extend ParcelFileDescriptor and override its close() methods:
  For some reason they don't get called when the stream gets closed
* notify the content URI when the upload is complete,
  so callers can wait for the notification:
  works, but is non-standard.
  Other DPs are not doing it,
  so it requires Nextcloud specific code on caller side
  and is still hacky:
  what happens if notification doesn't come? Timeout, but for how long?
* use other ways to get a ParcelFileDescriptor on the file:
  couldn't find anything that would interface with Nextcloud's
  current architecture

Signed-off-by: Torsten Grote <t@grobox.de>
2020-08-27 11:18:13 -03:00
tobiasKaminsky
6fcc95d117
compute space: take downloaded folder into account
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-27 15:38:27 +02:00
Tobias Kaminsky
da2352974c
Merge pull request #6774 from nextcloud/noNullOnDataSet
arbitrary data set: store "" instead of null
2020-08-27 15:31:40 +02:00
Tobias Kaminsky
c149813e2b
Merge pull request #6805 from nextcloud/ezaquarii/fix-unresponsive-audio-player-controls-with-linear-layout
Fix unresponsive preview player controls
2020-08-27 15:31:12 +02:00
Tobias Kaminsky
8a5d58a64e
Merge pull request #6725 from grote/is-child-performance
Improve performance of DocumentsProvider#isChildDocument()
2020-08-27 15:29:15 +02:00
Tobias Kaminsky
d50d8a4577
Merge pull request #6816 from nextcloud/dependabot/gradle/androidx.test-core-1.3.0
Bump core from 1.2.0 to 1.3.0
2020-08-27 15:12:41 +02:00
Tobias Kaminsky
2a4d466627
Merge pull request #6811 from nextcloud/dependabot/gradle/androidx.test-orchestrator-1.3.0
Bump orchestrator from 1.2.0 to 1.3.0
2020-08-27 15:07:58 +02:00
Tobias Kaminsky
41fcb90bf2
Merge pull request #6735 from nextcloud/semver-vs-marketing
Update CONTRIBUTING.md
2020-08-27 13:42:00 +02:00
Nextcloud bot
9183e3c9d1
[tx-robot] updated from transifex 2020-08-27 03:31:06 +00:00
tobiasKaminsky
2a0f14231a
Reduce extend of FileActivity, use DrawerActivity instead
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-26 15:14:21 +02:00
tobiasKaminsky
12f827e063
Use two chars for avatars
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-26 10:41:27 +02:00
Tobias Kaminsky
8fc2bcdab0
Merge pull request #6807 from merttumer/master
Fix insert image file picker only opens once
2020-08-26 09:10:30 +02:00
Nextcloud bot
6b80669000
[tx-robot] updated from transifex 2020-08-26 03:31:16 +00:00
dependabot-preview[bot]
2b7031d198
Bump core from 1.2.0 to 1.3.0
Bumps core from 1.2.0 to 1.3.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-26 01:15:52 +00:00
dependabot-preview[bot]
d1a9bb27c9
Bump orchestrator from 1.2.0 to 1.3.0
Bumps orchestrator from 1.2.0 to 1.3.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-26 01:14:01 +00:00
dependabot-preview[bot]
2be2b9f393
Bump constraintlayout from 2.0.0 to 2.0.1
Bumps constraintlayout from 2.0.0 to 2.0.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-26 01:13:18 +00:00
merttumer
e37635e602
Fix insert image file picker only opens once
When no image is selected from the intent we should set onReceiveValue to null and uploadMessage to null otherwise it does not open after closing it without selecting an image.
2020-08-25 22:51:12 +03:00
Chris Narkiewicz
6feedf881f
Start audio player using foreground service API on Android 26+
On API 26+ (Oreo, 8.0) running background services is restricted
by power saving mechanisms, causing occasional IllegalStateException
when service intent is rejected by the OS.

Migrate to startForegroundService API to mitigate this problem.
Audio player service is foreground by design.

Fixes #6665

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2020-08-25 18:55:13 +01:00
Chris Narkiewicz
6e6f8303a8
Fix unresponsive preview player controls
Media controls view were covered by a ScrollView
stealing all touch events. By changing it to FrameLayout,
touch events can reach media controls.

Content embedded inside ScrollView should not
exceed screen boundaries. If so - content must
be changed.

This fixes immediate problem with unresponsive media controls
reported in #6796 and #6782.

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2020-08-25 18:24:58 +01:00
Torsten Grote
e8870334d2
Improve performance of DocumentsProvider#isChildDocument()
The old solution iterates through all parents of the child until it
finds the given parent or the storage root.
This has been show to be very expensive in empirical tests.

Therefore, this commit introduces a more efficient solution that simply
compares the file paths of child and given parent.
It also ensures that parent and child belong to the same account.

Reviewers need to take extra care that this change does not introduce
security issues by claiming a document is a child of a parent when it is
really not.

Signed-off-by: Torsten Grote <t@grobox.de>
2020-08-25 09:32:48 -03:00
tobiasKaminsky
a79a780129
arbitrary data set: store "" instead of null
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-25 08:43:32 +02:00
dependabot-preview[bot]
1fec59e719
Merge pull request #6801 from nextcloud/dependabot/gradle/com.pinterest-ktlint-0.38.1 2020-08-25 05:47:40 +00:00
dependabot-preview[bot]
493f77f060
Bump ktlint from 0.38.0 to 0.38.1
Bumps [ktlint](https://github.com/pinterest/ktlint) from 0.38.0 to 0.38.1.
- [Release notes](https://github.com/pinterest/ktlint/releases)
- [Changelog](https://github.com/pinterest/ktlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pinterest/ktlint/compare/0.38.0...0.38.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-25 01:13:12 +00:00
Tobias Kaminsky
a90cf6a364
Merge pull request #6786 from nextcloud/dependabot/gradle/com.pinterest-ktlint-0.38.0
Bump ktlint from 0.37.2 to 0.38.0
2020-08-24 10:09:55 +02:00
Tobias Kaminsky
ad7564b942
Merge pull request #6751 from grote/6726-documentsprovider-0-bytes
Reset last sync date of files written via DocumentsProvider
2020-08-24 09:51:10 +02:00
Tobias Kaminsky
3d083444fd
Merge pull request #6772 from nextcloud/crashOnBrokenThumbnail
return onError in onPostExecute (which runs on UI thread)
2020-08-24 09:32:13 +02:00
Tobias Kaminsky
e13b580611
Merge pull request #6775 from nextcloud/doNotPreviewHTML
do not preview html within our text view
2020-08-24 09:29:14 +02:00
Tobias Kaminsky
59e6722b11
Merge pull request #6771 from nextcloud/fixSyncConflictOnAutoUpload
Fix #5755
2020-08-24 09:02:14 +02:00
dependabot-preview[bot]
5c3fbf232c
Merge pull request #6787 from nextcloud/dependabot/gradle/androidx.constraintlayout-constraintlayout-2.0.0 2020-08-24 06:38:35 +00:00
tobiasKaminsky
f0f467d2a1
fix code formatting according to new ktlint
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-24 08:36:43 +02:00
Nextcloud bot
d20a006ad6
[tx-robot] updated from transifex 2020-08-24 03:32:28 +00:00
dependabot-preview[bot]
fd8c50fea7
Bump constraintlayout from 1.1.3 to 2.0.0
Bumps constraintlayout from 1.1.3 to 2.0.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 01:13:59 +00:00
dependabot-preview[bot]
3f0a4d0f44
Bump ktlint from 0.37.2 to 0.38.0
Bumps [ktlint](https://github.com/pinterest/ktlint) from 0.37.2 to 0.38.0.
- [Release notes](https://github.com/pinterest/ktlint/releases)
- [Changelog](https://github.com/pinterest/ktlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pinterest/ktlint/compare/0.37.2...0.38.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 01:13:35 +00:00
Nextcloud bot
0b3826fcf8
[tx-robot] updated from transifex 2020-08-23 03:33:15 +00:00
Nextcloud bot
ce041065c5
[tx-robot] updated from transifex 2020-08-22 03:30:14 +00:00
Torsten Grote
64ec705398
Reset last sync date of files written via DocumentsProvider
The sync operation detects changes by comparing timestamps in
milliseconds. However, the local modification time only has a precision
of seconds (even though given in milliseconds).
When the DocumentsProvider is used programmatically, operations such as
a create and a subsequent write can happen within the same second
causing the sync operation to not detect the change and therefore
failing to upload a file causing data loss.

This commit also moves the file close listener to the thread used by the
DocumentsStorageProvider as this is more appropriate than the UI thread.

Fixes #6726

Signed-off-by: Torsten Grote <t@grobox.de>
2020-08-21 09:15:19 -03:00
tobiasKaminsky
856916e658
do not preview html within our text view
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-21 11:44:57 +02:00
tobiasKaminsky
c50798cd24
return onError in onPostExecute (which runs on UI thread)
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-21 10:46:11 +02:00
dependabot-preview[bot]
de38e90acb
Merge pull request #6764 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.11.2 2020-08-21 07:33:04 +00:00
Tobias Kaminsky
6c043bff77
Merge pull request #6763 from nextcloud/dependabot/gradle/org.conscrypt-conscrypt-android-2.5.0
Bump conscrypt-android from 2.4.0 to 2.5.0
2020-08-21 09:32:50 +02:00
tobiasKaminsky
23b05f3a56
Fix #5755
- use correct name collision info by synced folder
- syncedFolder.getNameCollisionPolicyInt -> returns int
- syncedFolder.getNameColllisionPolicy -> returns enum
- remove not needed backgroundJobManager from FilesSyncWork.kt

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-21 09:21:32 +02:00
Nextcloud bot
bf460b7451
[tx-robot] updated from transifex 2020-08-21 03:31:44 +00:00
dependabot-preview[bot]
da01fff04f
Bump detekt-gradle-plugin from 1.11.1 to 1.11.2
Bumps detekt-gradle-plugin from 1.11.1 to 1.11.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-20 15:04:06 +00:00
dependabot-preview[bot]
916c503a2f
Bump conscrypt-android from 2.4.0 to 2.5.0
Bumps [conscrypt-android](https://github.com/google/conscrypt) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/google/conscrypt/releases)
- [Commits](https://github.com/google/conscrypt/compare/2.4.0...2.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-20 15:03:02 +00:00
Andy Scherzinger
dcf7455e57
Merge pull request #6760 from nextcloud/passwortToShare
Fix crash on setting password
2020-08-20 14:00:11 +02:00
tobiasKaminsky
886d42dc0f
Fix crash on setting password
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-08-20 12:30:18 +02:00
Tobias Kaminsky
800da337e9
Merge pull request #6744 from nextcloud/mnemonicTest
fix mnemonic test
2020-08-20 10:39:10 +02:00
Nextcloud bot
b75b151906
[tx-robot] updated from transifex 2020-08-20 03:33:56 +00:00