* 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>
* use FragmentComponentManagers findActivity method provided by hilt (closesbitfireAT/davx5#106)
* WebCalFragment CalendarViewHolder: Pass Fragment instead of FragmentManager so that requireActivity() can be used
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Removed update related to from JtxSyncManager
updateRelatedTo is now done implicitely in the sync content provider for every inserted or updated icalobject/relatedto
* Update ical4android
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] initialization code to make tests non-flaky
* init code as junit rule and remove flaky annotations
* remove exception for flaky tests in Github test workflow
* ensure correct class rule execution order
* Sync adapter: share single HttpClient between all SyncManagers (should fixbitfireAT/davx5#99)
* HttpClient: use producer for CertManager
* Call setAccountVisibility only when necessary
* Fix tests
* Use Hilt for DI
* Use Hilt for settings providers
* Use Hilt for login credentials fragment
* Use Hilt instead of ServiceLoader for intro fragments
* Rewrite from Koin to Hilt
* Tests
* Use more Hilt modules for service loading (account drawer, intro fragments)
* Lint
* WebDAV provider: don't listen to changes in onCreate (causes problems with Hilt and tests)
* Add intent filter for caldav(s)://, carddav(s):// and davx5:// schemes
* Define intent-filter only for standard and gplay flavors
* Merge manifest; remove Espresso tests (further tests should be added)
* Lint
ClosesbitfireAT/davx5#77
* Service detection: update properties of already existing collections which are not in homesets
* Trigger service detection after creating a collection because the server may change properties
* jtx sync: query tasks/journals only when supported
Should fixbitfireAT/davx5#78
* Set InputType for proxy_host and proxy_port programmatically
Since AndroidX it is no longer sufficient to simply specify
android:inputType in settings_app.xml.
* Drop custom IntEditTextPreference.kt
Doesn't appear to be necessary anymore.
* Updated queryCapabilities to use the same code as in TasksSyncManager
Might solve #59
* Added try-catch block for sync-method
updated min version for JtxBoard in TaskProvider.kt
Should solve #59
* removed syncResult.databaseError = true
* Changed wrong file before
* Created TasksSyncUtils to put notifyProviderTooOld method
* Cleaned up imports
* Added Version check in JtxSyncAdapterService.kt, required TaskProvider.checkVersion to be public
* Minor changes
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Make "Battery optimization whitelisting" a global DAVx5 setting
* Make "Keep in foreground" setting dependent of "Battery optimization whitelisting" setting
* if foreground service is enabled, remind user to enable battery optimization whitelisting too, before starting the foreground service
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
- WebDAV service detection: accept compliance class 2 or 3, because they both imply class 1 (there are servers which don't show class 1 although they MUST)
- WebDAV random access: fix division by zero when file size reported by HEAD is zero
With the recent move to GitHub, the AboutInfo override for dav4jvm was
broken as it still used com_gitlab_bitfireAT__dav4jvm whereas it is now:
```
$ ./gradlew findLibraries | grep dav4jvm
bitfireAT/dav4jvm (f1d9354a41) -> com_github_bitfireAT__dav4jvm
Manually requested license: mpl_2_0
```
Since the autogenerated dav4jvm AboutInfo looks fine (see attached
screenshot), remove the override.
- Android 8 to 10: use all DNS servers; prioritize resolvers of active connections
(before: use only DNS servers of "active" connection, which may be a VPN connection without servers)
- Android 10+: use new DnsResolver API so that we don't need to know DNS servers anymore (also supports DoT etc.)