* Add Fastmail OAuth login implementation
* [CI] Run tests on API level 36, too
* Add Fastmail OAuth login support
* Remove logging and move companion object to bottom
* Remove FastmailLogin and GoogleLogin to OAuthLogin and OAuthGoogle
- Remove FastmailLogin class
- Refactor GoogleLogin class to OAuthGoogle object
- Update AndroidManifest.xml to use ${applicationId} for OAuth redirect URI
- Add OAuthFastmail object for Fastmail OAuth integration
- Update GoogleLoginModel and FastmailLoginModel to use OAuthGoogle and OAuthFastmail respectively
- Add OAuthIntegration object for shared OAuth functionality
* Update Fastmail authentication error message and add redirect URI documentation
* Add error handling for refresh token exception
* Update sync stats to store sync data type instead of authority
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use a real authority in the tests
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Replace authority with syncDataType in sync managers
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Minor changes
- import index
- edit comments
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use lowercase localised strings for datatypes
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Pass sync data type extra as string
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove unknown datatype
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Move datatype name strings to collection screen section
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Update string usages
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Update test
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Add any type annotations to arrays
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Implemented sort order
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed column name
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Implemented sort order
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed column name
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Improved issues
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add test for WebDavDocumentDao.getChildren for ORDER BY
* Converted getChildren into a raw query
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fix formatting of SQL query in WebDavDocumentDao
* Refactoring
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Drop comment
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Changed default sort to show directories first
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed tests
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Switched to query constructor instead of in-place
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Changed log method
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add DocumentSortByMapper to handle orderBy mapping for WebDavDocument queries
* Rename DavDocumentsProviderTest to DocumentSortByMapperTest and update test method name
* Refactor sorting and mapping
* Add "order by name" as last criterion
* Remove default sort order constant from DocumentSortByMapper and use WebDavDocumentDao.DEFAULT_ORDER instead
* Adapt comments
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Move distributor set/get to PushRegistrationManager
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Handle unsubscription after manual distributor change before resubscribing
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Minor changes
* Update distributor check to use method of the own class
* Use mutex and add KDoc
* UnifiedPush registration: add service type to "message for distributor"
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* SyncManager: Handle CancellationException in sync process
* Wrap remote resource operations with runInterruptible; provide suspending SyncException wrappers
* Update more sync methods to use runInterruptible only for the HTTP request itself
* Make downloadRemote methods suspendable and use runInterruptible for better concurrency handling
* Update code style
* Fix tests
* Refactor SyncException to use runBlocking for wrapping resources
* Introduce coroutine dispatcher for sync operations
* Make `logSyncTimeBlocking` and `insertOrReplace` suspend functions
* Suspend first bunch of SyncManager methods; move sync dispatcher usage to SyncManager
* [WIP] Fix tests
TODO: extract test framework changes to separate PR
* Remove mainDispatcher from SyncManagerTest
* Remove explicit coroutineScope naming
* Move LoggerModule to di package and add TestLoggerModule
* Remove main dispatcher injection and use runTest directly
* Add verbose logging module for tests
* Add test for UnifiedPushService.onUnregistered