Tobias Kaminsky
08eea65da7
Merge pull request #11098 from nextcloud/chore/room-for-filelist
...
Use Room for filelist table reads
2022-12-16 11:13:39 +01:00
Álvaro Brey
6d4a65b45c
FolderPickerActivity: also disable action when trying to move or copy a folder to a descendant of itself
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 17:22:11 +01:00
Álvaro Brey
04ffe37d25
FolderPickerActivity: remove EXTRA_CURRENT_FOLDER argument
...
It was unused (as it never reached the OCFileListFragment, which always starts at /) but was
mistakenly pre-populating the `file` variable with a wrong folder
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 11:15:31 +01:00
Álvaro Brey
a824d9a7b5
FolderPickerActivity: properly compare subfolders
...
Need to use File as well, otherwise trailing slashes are different
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 11:15:31 +01:00
Álvaro Brey
3cfd729b3c
FolderPickerActivity: disable copy/move to the same folder
...
It's a no-op anyways, right now, and causes bad UX
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 11:15:25 +01:00
Álvaro Brey
414e573ee6
Fix build failure after update in library
...
NextcloudVersion now has @JvmStatic in all members, so getters do no longer exist
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 10:57:33 +01:00
Dariusz Olszewski
69344bd8fb
Remove TODOs as discussed
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
07f61fcfa2
Apply suggestion from code review - FileDataStorageManager
...
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Dariusz Olszewski <8277636+starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
1a669e4eb6
Apply suggestions from code review
...
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Dariusz Olszewski <8277636+starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
0fb3c92495
Fix compilation of tests (revert marking getFileByEncryptedRemotePath as @Nullable)
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
4df8946b5e
spotlessKotlinCheck
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
9cbaa00724
SpotBugs
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
8ec6e3a0af
Use Room/DAO for getFolderWithDescendants (used by moveLocalFile) and finally remove createFileInstance(cursor) - no longer needed
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
e76201d59f
Use Room/DAO for getGalleryItems and getAllFiles
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
8272facf41
Use Room/DAO for other getFileByX and fileExists
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
5d8bb3e8f5
Simplify getFileById - as suggested in review comment
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Álvaro Brey
dd8a70262e
FileEntity: fix parent and contentLength types
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
71180412f9
Use Room/DAO for getFileById
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
32a7120610
Old implementation of getFolderContent ordered results by file name
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
45b9006068
Convert NULL values for integer/long columns to 0 (SpotBugs)
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
1d44674d83
Seems that timestamps need Long rather than Int
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
092a3051df
Missing newline (detekt)
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Dariusz Olszewski
cdeff1696b
Use Room/DAO for getFolderContent
...
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-12-13 23:28:15 +01:00
Álvaro Brey
c0788b11b0
Merge pull request #11139 from nextcloud/doNotDeleteEncryptedFolder
...
Encrypted folder cannot be deleted, must first unset encryption
2022-12-13 16:57:42 +01:00
Álvaro Brey
66c617828a
Merge pull request #11124 from nextcloud/fix/upload-worker-infinite-loop
...
Fix infinite loop in upload worker
2022-12-12 13:14:20 +01:00
Álvaro Brey
396b920d4f
Merge pull request #11119 from nextcloud/fix/fullscreen-dialog-insets-android9
...
PreviewVideoFullscreenDialog: fix immersive mode logic
2022-12-12 12:46:27 +01:00
Tobias Kaminsky
b40f7f6e0b
Merge pull request #11122 from nextcloud/fixTemplateId
...
Template id must be long, as it is fileID, which can be very big
2022-12-06 08:15:19 +01:00
tobiasKaminsky
1d62ee7835
Encrypted folder cannot be deleted, must first unset encryption
...
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-12-05 09:43:40 +01:00
Álvaro Brey
f403b25599
SettingsActivity: Better error message when davdroid login fails
...
Server URI is not the only problem that can happen here.
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-02 12:36:14 +00:00
Álvaro Brey
aa938747ff
Merge pull request #11106 from nextcloud/throttleSetup
...
show only one setup dialog, prevents strange situation on double tapping
2022-12-02 11:31:56 +01:00
Álvaro Brey
84044905d1
UploadsStorageManager: remove in-memory limit for queries
...
Only added for FilesUploadWorker workaround that is no longer used
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-01 17:00:02 +01:00
Álvaro Brey
f425045a31
FilesUploadWorker: fix infinite loop when uploads failed
...
With the previous approach (uploadsStorageManager.gtCurrentAndPendingUploadsForAccount),
an upload that is, for example, waiting for wifi, would always be returned in the call,
thus the list would never be empty.
To avoid this but still process the uploads in pages to avoid OOM, we'll request them page-wise
from the StorageManager, with the pages ordered by ascending ID. This way we will only process each upload once,
but newly added uploads after we start will not be missed.
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-01 16:52:43 +01:00
Álvaro Brey
a3e21d719b
UploadsStorageManager: extract getUploadsPage from getUploads
...
First step for making it accessible from outside
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-01 16:17:22 +01:00
tobiasKaminsky
52497bb3e3
Template id must be long, as it is fileID, which can be very big
...
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-12-01 12:13:50 +01:00
Álvaro Brey
4a14602f0e
PreviewVideoFullscreenDialog: fix insets
...
This was breaking the window in Android 9 when going back twice from a fullscreen video.
Testing steps:
1. Open a video
2. Go to fullscreen
3. Close fullscreen
4. Press Back
This caused a white screen in Android 9 before this PR
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-01 11:04:24 +01:00
Álvaro Brey
5d4b7a6d04
Merge pull request #11113 from nextcloud/fix-crash-when-disabling-airplane-mode
...
Fix crash when disabling airplane mode
2022-11-30 09:33:56 +01:00
Chris Narkiewicz
45567fb6d4
Fix crash when disabling airplane mode
...
Fixes #11096
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2022-11-29 20:17:38 +00:00
Álvaro Brey
f74f59220c
Merge pull request #11089 from nextcloud/fix/video-fullscreen-buffer
...
Video preview: use fullscreen dialog for video instead of new activity
2022-11-29 13:33:10 +01:00
Álvaro Brey
3f990c3f21
PreviewVideoFullscreenDialog: workaround for rotated videos on sdk < 29
...
See comments in added code for explanation
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-28 19:22:49 +00:00
Álvaro Brey
bdc0fc71e5
PreviewVideoFullscreenDialog: use listeners to control transfer, and pause the video while transfer is happening
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-28 19:22:49 +00:00
Álvaro Brey
b55d5768de
Fix lint and spotbugs
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-28 19:22:49 +00:00
Álvaro Brey
bbb85513e1
Video preview: use fullscreen dialog for video instead of new activity
...
This allows transfering the playback directly between Player views, thus avoiding creating
a new ExoPlayer, re-starting the stream, having to pass playing status/current position, etc.
Additionally:
- Always enable buffering animation so it's clear when a video is loading
- Add padding to fullscreen duration numbers so they don't get cut off on rounded screens
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-28 19:22:49 +00:00
Tobias Kaminsky
397ba74274
use getParentFragmentManager
...
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
2022-11-28 14:18:09 +00:00
tobiasKaminsky
831bffe571
show only one setup dialog, prevents strange situation on double tapping
...
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-11-28 14:18:09 +00:00
Álvaro Brey
e85737f41d
Disable StrictMode by default
...
StrictMode is not a good fit for the state of our app, since we are way too far from async operations or correct threading.
As a result, we find ourselves disabling the strict mode manually every time we actually want to work on something, as otherwise the
logspam drowns everything else.
With this PR I propose to disable StrictMode unless a prop is set in the Gradle build, which will also control LeakCanary.
Running `./gradlew installGplayDebug -P perfAnalysis` will install the app with both LeakCanary and StrictMode enabled.
This allows us to analyze performance problems on demand, without making our daily work harder.
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-28 15:09:04 +01:00
tobiasKaminsky
393e34d28c
restart SettingsActivity after changing e2e settings
...
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-11-24 15:40:26 +01:00
tobiasKaminsky
3f82d37415
revert to master library
...
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-11-24 15:40:26 +01:00
tobiasKaminsky
f49252c87e
hide e2e options after removing local e2e setup
...
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-11-24 15:40:26 +01:00
Álvaro Brey
b110735dcc
NextcloudDatabase: enable automigration for new db version
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-24 15:40:26 +01:00
Álvaro Brey
0d098255d9
Pass through SetupEncryptionDF result to SettingsActivity
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-11-24 15:40:26 +01:00