* RefreshCollectionsWorker: use runInterruptible instead of interrupting manually
* SyncWorker: use CoroutineWorker + runInterruptible
* Use global SyncWorkDispatcher that guarantees classLoader to be set
* Set SyncWorkDispatcher for whole SyncWorker's doWork
* Remove obsolete test
* SyncManager: add structured concurrency again
* Use up to <number of processors> threads for synchronization
---------
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
- Rewrite DetectConfigurationFragment to Compose
- Use coroutines and runInterruptible instead of Thread
- Only cancel service detection when back is pressed
* RandomAccessCallback.Wrapper: support multiple state machine instances at same time
- support multiple state machine instances at same time
- provide explicit Exception/error code when the remote server doesn't support ranged requests
* Only use RandomAccessCallback when server explicitly advertises range requests
---------
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* Minor changes
- update kdoc
- rename method and variables
* Add proxy parents to related resource detection
* Rename argument, query ResourceType
* Remove unnecessary utility method
* Change parentOf to extension function; Always return URL with trailing slash
* Use calendar-proxy-read/write ResourceType from new dav4jvm
* Use max. two levels of recursion to detect shared Google calendars
* Revise test and adapt method
* Simplify HttpUrl.parent()
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* LoginActivity: refactor menu to MenuProvider; LoginModel: add contact group type
* Take LoginModel group method into account when creating the account; Nextcloud login: set preferred contact group type
* Replace onActivityResult by contract
* Add Nextcloud option to default login screen
* Decouple NextcloudLoginFlowComposable from model
* UI and model changes
* Single-line URL field
* Add progress indicator and other secondary UI
* Using result launcher
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Minor re-ordering
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] Add timeout for RandomAccessCallback
* Use state machine to handle timeout
* Use sealed class for states, guard callback access with correct states
* Use tags instead of uniqueWorkNames for work queries.
* Also include address book accounts, when querying sync status.
Give address book account sync workers their parent (main account) sync workers tag too, such that they will be included at the query for sync status of their parent account.
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Low storage: don't show notification anymore, adapt info message
- The impact of low storage is not as critical anymore that a notification is required.
- Info message adapted
* Update "account settings: ignore VPN" strings
* Update "No internet" string
- use Google Play In-App Review API for private feedback on -gplay (fall back to email)
- start email intent again when "beta feedback" is selected in navigation drawer
* [WIP] Animate invisibility
* Reordered for cleaner look
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed animation
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Reduced animation time for going to visible to 0
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Remove logging
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* Doubled bottom padding
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Account activity: increase margin for two FABs even more
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add tests for internetAvailable()
* Add tests for wifiAvailable()
* Add TODO for test case
* Add tests for internetAvailable() covering multiple network connections
* Minor KDoc
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
If a WebDAV server is misconfigured (for example, behind an HTTP proxy that
strips a URL prefix and doesn't correctly forward this to the WebDAV server)
then PROPFIND can return resources whose URLs don't match the request URL. These
are resolved by dav4jvm as HrefRelation.OTHER.
Currently this situation produces no output at all in DAVx5 (logs or app) and
the WebDAV share appears accessible but empty. It is possible to create files in
the share, but not to see them again afterwards!
Of course a misconfigured server isn't the WebDAV client's responsibility to
resolve, but adding a warning in the log provides an extra clue for anyone
trying to debug it.
* Use appropriate delayUntil value for retrying syncs on 503s.
Crop server suggested retryAfter value to self defined min/max values and use a reasonable default value if non-existent.
* Add tests for getDelayUntil
* Wait appropriate delay, before retrying sync after a soft error happened
* Increase max and default sync delays after soft errors
* Increase initial backoff time for SyncWorker retries
* Minor getDelayUntil changes
* Minor changes
- store delayUntil in seconds
- pass duration instead of timestamp to Thread.sleep
- other minor changes
* Use Instant instead of Long timestamps
* Correct calculation of blocking duration
* Indicate soft error occurred on 503 server message
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Update dependencies (including cert4android and vcard4android)
* Migrated to new version of ical4android
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Increased compileSdk
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Upgraded browser
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Only use `appInForeground` for `customCertsUi`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Removed unnecessary variable and fixed trust manager
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Cleaned up trust manager factory
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Update dependencies (including cert4android and vcard4android)
* Migrated to new version of ical4android
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Increased compileSdk
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Upgraded browser
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Only use `appInForeground` for `customCertsUi`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Removed unnecessary variable and fixed trust manager
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Cleaned up trust manager factory
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Minor changes
* Fixed build for SDK 34
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Migrated certificate trusting
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* NetworkConfigProvider: handle invalid trusted certificate
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* Add setting to ignore VPNs at connection detection
* Minor changes
- move methods to ConnectionUtils to keep SyncWorker class compact
- always use "ignore VPNs" as Boolean
- other minor changes
* Show ignore VPNs setting only below api lvl 23
* Change strings
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Sync error notification dismiss
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* FIXME
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added click intent
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Delayed error info
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added tag for max retries
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Reduced priority
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Removed max retries tag
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Using account name as tag
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added authority to notification tag
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added account type to notification tag
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Changed priority to min
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Upgrade AGP to 8.1.1
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Upgrade Kotlin and dependencies
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Downgrade browser
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added tooltip to sync collections fab
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Greyscale tint for collections sync FAB
* Always use TooltipCompat for FAB tooltips
ClosesbitfireAT/davx5#339
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
Hopefully fixesbitfireAT/davx5#308
* Add new setAndVerifyUserData extension function to AccountManager
* Use new setAndVerifyUserData extension function instead of insecure setUserData
* Update KDoc [skip CI]
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
- use Kotlin and CompletableDeferred instead of Java synchronization
- signal cancellation by completing CompletableDeferred instead of Thread.currentThread.interrupt()
* Upgraded AGP
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Enabled automatic locale config generation
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added fallback language
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added legacy service
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added `Accept-Language` header to custom tabs
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Nextcloud Login Flow/Google OAuth: also send language tag for default locale
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Updated Google login button
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Moved Google G logo file
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Changed background color
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Amend warning sign [skip CI]
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added refresh collections fab
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added listener for clicks on refresh collections fab
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Adjusted sizing
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Updated tooltip and description for collections sync
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed Snackbar
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added warning for null serviceId
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Changed refresh collections service id fetching method
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Tooltip updates on refresh collections list
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Migrate to ViewPager2; show "Refresh collections" for WebCal, too
* Added refresh collections fab
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added listener for clicks on refresh collections fab
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Adjusted sizing
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Updated tooltip and description for collections sync
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed Snackbar
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added warning for null serviceId
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Changed refresh collections service id fetching method
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Tooltip updates on refresh collections list
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Migrate to ViewPager2; show "Refresh collections" for WebCal, too
* Changed collections refresh action update method
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Use lambda syntax for observers
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
* Comment out failing test
* Check internet connection before syncing for API 23+
* [Skip CI] Amend comments
* Comment out whole test class
* Comment out whole test class
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Hide/Show auth settings instead of removing them prevents NPE
* Provide original OAuth login email as default value for GoogleLoginFragment started from account settings
* Account settings: explicitly trim empty user name to null
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added known base urls
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Change order
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Block sync framework until SyncWorker finishes
* Bump version code for 4.3.3 (previous version code was never released publicly)
* Fetch translations from Transifex
* Release internal version automatically [skip ci]
* Update periodic sync workers when "Sync only on WiFi" flag is changed (#282)
* Update periodic sync workers when "sync only on WiFi" flag is changed
* Remove BootCompletedReceiver which was only needed to repair sync intervals (not required with WorkManager anymore)
* Bump version code to 403030006 (stays 4.3.3)
* Use unique worker name, Java notify/wait and observeForever
* Remove observer when sync finished
* Catch and ignore, but log interruption exceptions
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Move GoogleOAuth members into GoogleLoginFragment
* Require login flow capable browser and notify user if missing
* Receive AppAuth redirects only in standard and gplay flavor
* Set davx5 as user-agent for AppAuth connection builder
* Re-authentication in Account settings
* Catch unauthorized exceptions at collection refresh and notify user to re-authenticate
* Suggest email address on account creation
* Set contact groups default setting as per-contact categories for oauth logins
* Add authentication to debug info, minor other changes
* Better error handling; don't pre-set group type
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* When renaming show a toast when account with new name exists already
* Replace toasts with snackbars
* Apply code styling hints
* Move lambdas out of parentheses
* Inject application instead of context
* Replace Toast with Snackbar
* Shorten messages shown in snackbars
* Show Toast in UI instead of model; use AndroidViewModel
* Move account name check out of lock; don't close activity if not successful
* Duplicate account name check: only check for our account type
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add new preselect_collections option and deprecate sync_all_collections option
* Optimize imports
* At refresh, decide on whether a collection should be preselected
* Add preselect_collections_blacklist setting and restriction
* Adhere to preselect_collections_blacklist setting
* Add preselect_collections values
* Also check for empty regex string and use new setting values
* Add unit tests
* Remove sync_all_collections setting and restriction
* Blacklist nextclouds recently contacted addressbook in restriction and setting by default
* Improve kdoc
* KDoc, changed setting names, minor code optimizations
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Update periodic sync workers when "sync only on WiFi" flag is changed
* Remove BootCompletedReceiver which was only needed to repair sync intervals (not required with WorkManager anymore)
* Make it clear that the first call of recursive method queryHomeSets is for the current-user-principal home set
* Update whitespace in kdoc
* Update kdoc
* Add last synced time to collection properties
* Show last synced time for every to the collection relevant authority
* Try finding the application name for given package name
* Resolve authority to package name before finding application label
* Use AndroidViewModel instead of ViewModel; change model LiveData to val
* Rewrite to Compose, use relative time description
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* AccountSettings: prevent redundant calls, move migrations to separate class
* Don't create AccountSettings while migrating
* Double thread sleep time to wait for sync framework to get disabled, and update logging
* Remove manual testing helper
* Fix tests
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Fixed toast threading
* Added `AndroidViewModel.context`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved to `AndroidViewModel`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Changed error invocation
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added back constructor inject
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Save Application with val instead of util method
* Use LiveData for error message
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Implement proper network check before manual sync
Do a proper connectivity check, to show a message to the user, about the sync being scheduled for when connectivity is available, before enqueueing the SyncWorker.
* Update the sync status in accounts adapter to include pending syncs
This is relevant for when a manual sync is triggered without connectivity.
* Replace Toast by Snackbar
* Replace ViewModel by AndroidViewModel
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
- disable per-app language preference for now (will be enabled again with bitfireAT/davx5#245)
- disable Jetifier (doesn't seem to be explicitly required for in-app rating API anymore)
- remove Locator dependency
- update ical4android
- add JetPack Compose dependencies
- use existing XML theme as Compose MdcTheme
- update AboutLibraries to newest version (uses Compose)
- embed AboutLibraries Compose into existing Fragment layout
ClosesbitfireAT/davx5#14
* extract WorkManager util functions and kdoc
* add PeriodicSyncWorker
* refactor and some kdoc
* use PeriodicSyncWorker and add todos
* allow SyncAdapter arguments to be passed to SyncWorker and have re-synchronization use SyncWorker
* handle sync cancellation in AccountSetting migration
* handle sync cancellation when account is renamed
* remove sync frameworks global sync setting and sync state awareness for the GUI
* Observe sync worker status in AccountListFragment
* Create setup for stepwise refactor of the sync adapters. This should keep the app from failing to build.
* Create new abstract BaseSyncer class for generic sync code. Adapt consumers and tests to use the new class.
* Move calender sync code to new CalenderSyncer class which is independent from the sync framework
* In CalendarSyncAdapterService pass sync requests from Sync Adapter Framework to SyncWorker
* Use CalenderSyncer in SyncWorker
* Move contacts sync code to new ContactsSyncer class.
* Move address book sync code to new AddressBookSyncer class
* Move jtx sync code to new JtxSyncer class
* Move tasks sync code to new TaskSyncer class
* Remove duplicate code in inherited sync adapters.
* Remove refactoring helper interface, duplicate generic sync code and some linting.
* Adapt tests for new Syncer class and move to the new package
* Remove remaining duplicate code in SyncAdapterService, add todos and edit kdoc.
* Move all the single line sync adapter services into one file.
* Remove concurrent sync runner code and its test, as we now use WorkManagers one time work requests.
* Remove SAF manual sync flag usage where unnecessary.
* Drop ability to prioritise collections for sync, as not used and hindering removal of sync adapter arguments.
* Pass simple string array to SyncWorker instead of bundle to simplify code.
* Restructure work query code.
* Get debug info from account settings and WorkManager.
* Write tests for PeriodicSyncWorker
* Test account creation will set a default sync interval for CardDAV and CalDAV
* Throw an exception if accountManager returns null for sync interval value
* Do proper interval check and add tests for AccountSettings
* Use work manager query to determine whether work is in a specific state
* [WIP] Add test to check that task provider is configured correctly on account creation
* Edit test checking that task sync is configured correctly on account creation with/without installed task app(s), by mocking TaskUtil
* Edit test such that it does not require a flaky flag
* Remove periodic sync when tasks app is uninstalled
* Bring back content triggered syncs
* Rename enqueueSyncWorker method to enqueue only for clarity
* Enable SyncAdapterFramework to cancel running SyncWorker
* Add test ensuring that SyncWorker.onStopped() interrupts the running sync thread
* Add retry policy sync on soft errors
* Check users sync conditions before enqueueing SyncWorker
* Add test for whether user sync conditions are treated correctly and kdoc
* Rename ambiguous shorthand "SAF" to "SyncFramework", as SAF usually means StorageAccessFramework
* Migration: Disable sync framework periodic syncs when interval is changed for specified authority
* Add Workers info to debug info
* Use WorkInfo.runAttemptCount to fail work after 20 soft errors
* Notify user if retry limit for soft errors has been reached
* Remove left over concurrency sync run tests prevention
* Migration: Continue to remove periodic sync framework syncs until user migration to PeriodicSyncWorker syncs is complete
* Kdoc and small changes
* Migration: Change to hard migration strategy
* Drop repairSyncIntervals method in favor of hard migration strategy
* Improve debug info of workers
* Remove sync framework periodic syncs, created by enabling content triggered syncs
* Change minimum sync interval to 15 min; minor other changes
* Fix tests
* Implement requested changes and update kdoc
* Add network connectivity restrictions to PeriodicSyncWorker
* Minor changes
* Move back sync classes to syncadapter package for now (can be separated later)
* Add KDoc
* Changes from review
* Rename test methods
* Add back global sync status warning
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Log warning if principal URL does not provide CalDAV/CardDAV service
* Unified log messages for identical cases
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Alter the SyncWorker sync request to allow passing sync arguments along
* Request sync in SettingsActivity via SyncWorker instead of ContentResolver
* Don't use catch-all arguments as worker arguments
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* check sync workers properly
* Move utils around
* Merge live data, instead of observing in view, to recalculate account list.
* Update LiveData with same value
* Remove unused context property.
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* provide owner url in jtx collection
* Updated contract, added owner displayname to collections sync
* Update ical4android
---------
Co-authored-by: Patrick Lang <72232737+patrickunterwegs@users.noreply.github.com>
* Displaying language with `displayName` instead of `displayLanguage`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added languages from `davdroid`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Fixed wrong locale tags
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Using Map instead of list for language loading
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Typo
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Changed language loading logic
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Improved docs
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Moved method from `LangUtils`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Using regex
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added test for `resourceQualifierToLanguageTag`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
---------
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* add principal table with dao
* add principal table with dao
* collection saves ownerId instead of owner URL
* save and refresh principals
* show display name of collection owner in GUI
* show only the owner name (preferably) or respective url
* remove principals which do not own any collections
* Don't mock AppDatabase
* ensure we are really dealing with a principal and save it even without its display name
* ensure owner label is hidden when neither owner-displayname nor owner-url are available
* save principal urls without trailing slash
* use a custom query to find principals without collections
* Some changes
- insertOrUpdateByUrl
- don't explicitly set id=0 when not necessary,
- make it work when there are already entries with trailing slahes
- added TODOs
* Small changes
- Update principal only if display name changed
- Rename methods
- Kdoc
- Tests
* stop using simple methods with vague names
* rename method insertOrUpdateOrGet to insertOrUpdate and leave existing kdoc for explanation
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* adapted JtxSyncManager, added new method in LocalJtxCollection
* minor code improvement
* inserting recurring entry as well, as the series might not have been processed yet
* version bump (preliminarily)
* version bump (preliminarily)
* Enabled automatic popup of the custom certificate dialog
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Use chaining instead of .let
---------
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* add test fixtures
* Use direct DB access instead of DaoTools
* minor changes and kdoc
* minor changes and kdoc
* remove obsolete DaoTools, SyncableDao and IdEntity classes
* KDoc
* use hashmap instead of list and added kdoc
* always load from database
* add a test and make test structur more flexible for future tests
* minor KDoc
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Reformat code
* Use sync-adapter URI to count jtx Board entries
* Debug info: restrict entry counts per withSyncAdapter URI and not over WHERE clause
* [WIP] refactor
* [WIP] refactor
* save, update and delete homesets one by one
* save, update and delete collections one by one
* cleaner code
* prevent jumps in row ids
* [WIP] small changes and kdoc
* remove duplicate code and add kdoc
* improve kdoc
* remove redundancy based on service type in resource finder
* tests setup
* handle cancellation
* add tests
* Don't use IdEntity for service detection anymore
* HomeSetDao: getByUrl requires a service (there may be two accounts with the same homeset URLs, for instance with different credentials)
* Deprecate DaoTools
* Minor changes
* Add TODO
* use self explanatory variables instead of a pair
* update kdoc
* add unfinished tests
* add test for updating a collection
* add test for preserving collection flags
* mark collections as homeless if not rediscovered in its homeset
* proper implementation of update and delete of homeless collections with test
* minor changes and kdoc
* Tests: adapt mock server 404
* KDoc
* get collections by service and url, deprecate getByUrl()
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added `GetETag.NAME` fetching when `PROPFIND`ing
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* `GetETag.eTag` is only taken if tag is not weak
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Using `GetETag` instead of `QuotedStringUtils` and ignoring weak eTags
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Updated `dav4jvm`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Fixed checks
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Use new dav4jvm where weak can't be null
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added mastodon icon
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added mastodon link to drawer
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added mastodon link action
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Mastodon icon tint
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added Mastodon icon to main
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* added language selection
* PermissionsFragment: Hide notification permission switch on Android < 13
* Retrieve locales with a function
* Added locales flavoring
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Moved locales functions to `locales.gradle`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added `locales_config.xml` generation
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Now gets generated automatically
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Added `android:localeConfig`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Updated submodules
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
* Using `logger` instead of `println`
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
Signed-off-by: Arnau Mora <arnyminer.z@gmail.com>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
Co-authored-by: Arnau Mora <arnyminer.z@gmail.com>
* rabase with dev branch
* added test for checking whether manual work-manager sync queues worker
* overwrite getForegroundInfo to show a "sync running" notification, to run expedited work on Android <12
* basic error state with sensible feedback from syncframework
* remove integer state flags and pass SyncResult as string
* Manual sync cancellation
* rabase with dev branch
* Minor changes
- add Jtx Board sync adapter to sync worker
- use new notification ID for sync worker
* status bar reflects sync of SyncWorker and sync framework correctly
* [WIP] custom hilt SyncComponent
* fix autoclose cast not available below api24
* SyncScope implementation using WeakReference
* Remove unnecessary logging call
* AddressBooksSyncAdapter.sync uses SyncWorker instead of ContentResolve to call requestSync
* add some code documentation
* move all utility objects into one package
* Also check SyncWorker state for accounts list sync status bar
* clean up imports
* Remove duplicate copyright notices
* Minor changes
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* LoginSetupActivity: allow http/https in intent filter
Initially introduced in 054f1ece61,
this `intent-filter` breaks login from the Nextcloud app, as we send the server URI as `http`/`https`.
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
* Update intent-filter for login flow on api lvl 33 (closesbitfireAT/davx5#172)
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove forced wifi-only sync when Data Saver is active
* move data saver warning to AppWarningsManager
* Minor changes
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* move warning notification logic into a warning class
* Move Warnings to UI package
* Minor changes
* Move "global sync disabled" warning to AccountListFragment, too
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* SyncManager: remove retry intent
* refactor DavService to RefreshCollectionsWorker now using WorkManager
* move DavResourceFinder to new service detection package
* Optimize imports
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] save task list access level to android task list for tasks.org to use
* Disrecommend using OpenTasks in selection dialog
* Update string, use matching ical4android
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* check for notify permission before notifying
* [WIP] add notification permission request
* Revert "check for notify permission before notifying"
This reverts commit ed8e046d73163bef5684622bd877f08b9ee781c6.
* add notification permission request
* [WIP] add notifications disabled card in accounts view
* add notifications disabled card in accounts view
* reorder permissions
* use dp instead of mm for image max height in permissions view
* stop using array to bundle notification permissions
* Use new permissions contract for PermissionsFragment
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] add managed restriction to force read-only addressbooks
* Honor app-wide read-only address book setting when syncing address books
* reflect status of force read-only address books setting in the GUI
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>