- Move DebugInfoCrashHandler.kt to com.davx5.ose
- Move StandardLoginTypePage.kt to com.davx5.ose.ui.setup
- Move StandardLoginTypesProvider.kt to com.davx5.ose.ui.setup
- Move CustomCertManagerModule.kt to com.davx5.ose.di
- Move OseIntroPageFactory.kt to com.davx5.ose.ui.intro
- Move OseColorSchemesModule.kt to com.davx5.ose.di
- Move OseFlavorModule.kt to com.davx5.ose.di
- Move OpenSourceLicenseInfoProvider.kt to com.davx5.ose.ui.about
- Move OseTheme.kt to com.davx5.ose.ui
* Update IntroScreen colors
- Replace M3ColorScheme with MaterialTheme.colorScheme
- Update background and icon colors to use MaterialTheme
* Update color scheme references
- Replace `M3ColorScheme.primaryLight` with `MaterialTheme.colorScheme.primary` in `WelcomePage.kt` and `AccountsDrawerHandler.kt`.
* Update AppTheme to accept custom color schemes
- Add `lightColorScheme` and `darkColorScheme` parameters
- Replace hardcoded color schemes with the new parameters
* Add color scheme dependency injection
- Add `LightColorScheme` and `DarkColorScheme` qualifiers
- Create `OseColorSchemes` module for providing color schemes
- Update `AppTheme` to use injected color schemes
* Update glance material dependency to material3
- Update `androidx.glance.material` to `androidx.glance.material3`
- Adjust imports and usage in `IconSyncButtonWidget.kt` and `LabeledSyncButtonWidget.kt` to use `GlanceTheme` and `ColorProviders` for color schemes
- Replace deprecated `ColorProvider` with `GlanceTheme.colors` for primary and onPrimary colors
* Refactor widget receivers and widgets to use dependency injection more properly
- Update `LabeledSyncButtonWidgetReceiver` and `IconSyncButtonWidgetReceiver` to use Hilt for dependency injection.
- Inject `SyncWidgetModel`, `LightColorScheme`, and `DarkColorScheme` into both widget receivers.
- Remove the use of `EntryPoint` and `EntryPointAccessors` from `LabeledSyncButtonWidget` and `IconSyncButtonWidget`.
- Pass injected dependencies directly to the widget constructors.
* Rename ThemeColors to OseTheme
- Update imports and references to use OseTheme
- Rename object M3ColorScheme to OseTheme
* Move AppTheme to ui.composable package because it's a reusable Composable
* Update AboutApp to use dynamic version info instead of BuildConfig
- Pass versionName and versionCode from AboutModel to AboutApp
- Remove dependency on BuildConfig in AboutApp
- Update AboutApp_Preview with sample version info
* Update URI statistics parameters
- Update `withStatParams` to include package name and version
- Replace `BuildConfig.APPLICATION_ID` with `context.packageName`
- Add context parameter to `withStatParams` in various activities
* Don't depend on BuildConfig for application name and version
- Introduce `ProductIds` for managing product IDs and User-Agent
- Update various classes to use `ProductIds` for product ID generation
- Move `TextTable` class from `at.bitfire.davdroid` to `at.bitfire.davdroid.util`
* Refactor OAuth classes for dependency injection
- Convert `OAuthFastmail` and `OAuthGoogle` to injectable classes
- Update `FastmailLoginModel` and `GoogleLoginModel` to use injected instances
- Move `redirectUri` initialization to `OAuthIntegration` constructor
* Adapt DI
- Move CustomCertManagerModule to ose configuration
- Move coroutine scopes to scope package
* minor changes
* Remove custom certificate build config
- Remove `allowCustomCerts` build config field
- Replace `@Singleton` with `@Reusable` in CustomCertManagerModule
* Update imports and LogcatHandler initialization
- Update imports to use scoped dispatchers
- Replace BuildConfig.APPLICATION_ID with javaClass.name in LogcatHandler initialization
* Update IntroScreen colors
- Replace M3ColorScheme with MaterialTheme.colorScheme
- Update background and icon colors to use MaterialTheme
* Update color scheme references
- Replace `M3ColorScheme.primaryLight` with `MaterialTheme.colorScheme.primary` in `WelcomePage.kt` and `AccountsDrawerHandler.kt`.
* Update AppTheme to accept custom color schemes
- Add `lightColorScheme` and `darkColorScheme` parameters
- Replace hardcoded color schemes with the new parameters
* Add color scheme dependency injection
- Add `LightColorScheme` and `DarkColorScheme` qualifiers
- Create `OseColorSchemes` module for providing color schemes
- Update `AppTheme` to use injected color schemes
* Update glance material dependency to material3
- Update `androidx.glance.material` to `androidx.glance.material3`
- Adjust imports and usage in `IconSyncButtonWidget.kt` and `LabeledSyncButtonWidget.kt` to use `GlanceTheme` and `ColorProviders` for color schemes
- Replace deprecated `ColorProvider` with `GlanceTheme.colors` for primary and onPrimary colors
* Refactor widget receivers and widgets to use dependency injection more properly
- Update `LabeledSyncButtonWidgetReceiver` and `IconSyncButtonWidgetReceiver` to use Hilt for dependency injection.
- Inject `SyncWidgetModel`, `LightColorScheme`, and `DarkColorScheme` into both widget receivers.
- Remove the use of `EntryPoint` and `EntryPointAccessors` from `LabeledSyncButtonWidget` and `IconSyncButtonWidget`.
- Pass injected dependencies directly to the widget constructors.
* Rename ThemeColors to OseTheme
- Update imports and references to use OseTheme
- Rename object M3ColorScheme to OseTheme
* Move AppTheme to ui.composable package because it's a reusable Composable
* Update AboutApp to use dynamic version info instead of BuildConfig
- Pass versionName and versionCode from AboutModel to AboutApp
- Remove dependency on BuildConfig in AboutApp
- Update AboutApp_Preview with sample version info
* Update URI statistics parameters
- Update `withStatParams` to include package name and version
- Replace `BuildConfig.APPLICATION_ID` with `context.packageName`
- Add context parameter to `withStatParams` in various activities
* Don't depend on BuildConfig for application name and version
- Introduce `ProductIds` for managing product IDs and User-Agent
- Update various classes to use `ProductIds` for product ID generation
- Move `TextTable` class from `at.bitfire.davdroid` to `at.bitfire.davdroid.util`
* Refactor OAuth classes for dependency injection
- Convert `OAuthFastmail` and `OAuthGoogle` to injectable classes
- Update `FastmailLoginModel` and `GoogleLoginModel` to use injected instances
- Move `redirectUri` initialization to `OAuthIntegration` constructor
* Update IntroScreen colors
- Replace M3ColorScheme with MaterialTheme.colorScheme
- Update background and icon colors to use MaterialTheme
* Update color scheme references
- Replace `M3ColorScheme.primaryLight` with `MaterialTheme.colorScheme.primary` in `WelcomePage.kt` and `AccountsDrawerHandler.kt`.
* Update AppTheme to accept custom color schemes
- Add `lightColorScheme` and `darkColorScheme` parameters
- Replace hardcoded color schemes with the new parameters
* Add color scheme dependency injection
- Add `LightColorScheme` and `DarkColorScheme` qualifiers
- Create `OseColorSchemes` module for providing color schemes
- Update `AppTheme` to use injected color schemes
* Update glance material dependency to material3
- Update `androidx.glance.material` to `androidx.glance.material3`
- Adjust imports and usage in `IconSyncButtonWidget.kt` and `LabeledSyncButtonWidget.kt` to use `GlanceTheme` and `ColorProviders` for color schemes
- Replace deprecated `ColorProvider` with `GlanceTheme.colors` for primary and onPrimary colors
* Refactor widget receivers and widgets to use dependency injection more properly
- Update `LabeledSyncButtonWidgetReceiver` and `IconSyncButtonWidgetReceiver` to use Hilt for dependency injection.
- Inject `SyncWidgetModel`, `LightColorScheme`, and `DarkColorScheme` into both widget receivers.
- Remove the use of `EntryPoint` and `EntryPointAccessors` from `LabeledSyncButtonWidget` and `IconSyncButtonWidget`.
- Pass injected dependencies directly to the widget constructors.
* Rename ThemeColors to OseTheme
- Update imports and references to use OseTheme
- Rename object M3ColorScheme to OseTheme
* Move AppTheme to ui.composable package because it's a reusable Composable
* Always use Light Color Scheme for certain intro UI
- Inject `lightColorScheme` in `IntroActivity`
- Pass `lightColorScheme` to `IntroScreen`
- Use `lightColorScheme` for background and color in `IntroScreen` and `WelcomePage`
* Minor syntax
* Reuse CustomCertManager
- Update bitfire-cert4android to 75cc6913fd
- Refactor HttpClientBuilder to use Optional for customTrustManager and customHostnameVerifier
- Add CustomCertManagerModule for dependency injection
* Implement connection security manager for HTTP client
- Introduce `ConnectionSecurityManager` and `ConnectionSecurityContext` classes
- Refactor `HttpClientBuilder` to use the new security manager for SSL context setup
* [WIP] Cache SSLContext by certificate alias
- Add context cache using Guava CacheBuilder
- Cache SSLContext in getContext method
* Update comments in HttpClientBuilder.kt for clarity
* Update ConnectionSecurityManager to use SSLSocketFactory caching
* Refactor socket factory caching logic for better clarity
* Add tests
* Refactor socket factory cache to store only SSLSocketFactory
* Minor changes
- Change socketFactoryCache to use LinkedHashMap instead of ConcurrentHashMap
- Update cache key handling to use String? instead of Optional<String>
* Add tests for caching
* Add logging
* Indenting
* Minor simplification
* Fix tests
* Update loading method for Weblate
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add fetch script
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add test function
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add credits from Transifex
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add workflow for updating Weblate credits
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Improve styling
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Add line break at the end
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Filter Ricki in translation contributions
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Display Transifex translations
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Modify PRs, not the base branch
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fix paddings
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Rename weblateTranslations flow and loadWeblateTranslations function
* Rename variables and functions from `translations` to `translators`
* - Move AboutActivity.Model class to AboutModel
* Rename translators files
* Minor renaming
* Refactor sorting logic into `sortTranslators` function
* Rename script to fetch Weblate translators
* - Remove `AboutActivityTest` class
- Move `loadTransifexTranslators` function to `AboutModel`
- Update `loadWeblateTranslators` function in `AboutModel`
* Update Weblate workflow
* - Combine Weblate and Transifex translators into a single list
- Update AboutActivity to use the combined list
- Add tests for the new functionality
* Merge Transifex and Weblate translators by username, don't show language, add Engage widget
* Extract TranslationsTab
* AboutModel: update tests
* Add thanks message for translation contributors
* Move translation credits to Weblate
- Update `OpenSourceLicenseInfoProvider` path
- Add new strings for translations credits
- Update `TranslationsTab` with new strings
* Add Accept-Language, update Context
* Update Weblate Translators Workflow
- Allow workflow to run on specific branch for testing
- Remove unnecessary fetch-depth comment
* Update Weblate Translators Workflow (2)
* Remove workflow
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WebDAV] Refactor RenameDocumentOperation to Ktor
- Update imports to use Ktor-based classes
- Refactor `RenameDocumentOperation` to use Ktor HTTP client
- Add support for both HttpException types in `throwForDocumentProvider`
* Rewrite CopyDocumentOperation.kt to Ktor
* Refactor URLBuilder usage
- Update URLBuilder usage in RenameDocumentOperation.kt
- Update URLBuilder usage in CopyDocumentOperation.kt
- Update URLBuilder usage in MoveDocumentOperation.kt
* - Pass `ioDispatcher` to `runBlocking` in WebDAV operations
- Refactor timeout configuration in HttpClientBuilder for reusability
* Add logging to DocumentProviderUtils
- Introduce a logger instance
- Log URI when notifying folder changes
- Remove `android.builtInKotlin` from `gradle.properties`
- Update Hilt version to 2.59
- Remove Kotlin Android plugin from `libs.versions.toml` and build scripts
* Rename ResourceDownloader to ResourceRetriever (because it should support `data` URLs that don't have to be downloaded)
* Update `ResourceRetriever` to handle data URIs and HTTP/HTTPS URLs
* Handle invalid data URIs
* Remove `r` from lang names as per Fastlane requirement
* Add `lang_map` to fastlane resources
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Bump org.unifiedpush.android:connector in the app-dependencies group
Bumps the app-dependencies group with 1 update: org.unifiedpush.android:connector.
Updates `org.unifiedpush.android:connector` from 3.1.2 to 3.2.0
---
updated-dependencies:
- dependency-name: org.unifiedpush.android:connector
dependency-version: 3.2.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: app-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Cache configurations per job
* Use separate job for Dependency submission
* Use GRADLE_OPTS to enable build and configuration cache
* Test .android
* Cache .android for configuration cache
* Disable CodeQL for PRs
* Fix AVD path
* Nextcloud Login Flow: handle non-success status codes
* Update error message to use class name when localized message is null
* Update dav4jvm to get HTTP reason phrases in HttpException
* [WIP] Use Ktor for Nextcloud login flow
- Replace OkHttp with Ktor for HTTP requests
- Update URL handling to use Ktor's `Url` class
- Adjust `postForJson` method to use Ktor's HTTP client
- Refactor URL building logic for login flow initiation
* Use Ktor for Nextcloud login flow
- Migrate to Ktor's ContentNegotiation plugin for JSON handling
- Update dependencies and configuration for Ktor serialization
- Refactor `NextcloudLoginFlow` to use Ktor's JSON serialization
* Add tests
* Allow unit tests that mock/use HttpClient without Conscrypt
* KDoc
* Minor fixes
* Use toUrlOrNull from dav4jvm
* Don't change strings in this PR
* Update dav4jvm and synctools
* Update synctools (fixes#1797, closes#1859)
* Use `com.github.bitfireAT:synctools` because `com.github.bitfireat:synctools` is not available on Jitpack for this commit
* Remove the ignore annotation
* Turn inPendingState in to a hot state flow for the test duration
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Rename methods registering the sync state observer
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Update authentication domain parameter
- Rename `onlyHost` to `authDomain` in `fromAccount`
- Update `authenticate` method to use `domain` instead of `host`
- Clarify documentation for `authDomain` parameter
* More KDoc
* Fix other calls / tests
* Move companion object to end of class
* Update synctools
* Make DmfsTaskList final
* Use DmfsTaskList SyncState
* Drop fields now provided in DmfsTask and adapt constructors
* Use column constants from DmfsTask instead
* Use DmfsTask column constants
* Update synctools
* Don't handle scheduleTag
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Update synctools
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add ResourceDownloader and tests
- Introduce `ResourceDownloader` class for downloading external resources
- Add unit tests for `ResourceDownloader`
- Refactor `ContactsSyncManager` to use `ResourceDownloader`
* KDoc
- Add detailed documentation for `download` method
- Clarify authentication handling and return behavior
* Minor changes
Log warning instead of throwing IllegalStateException on multiple build calls
- Change `build()` to log a warning instead of throwing an exception on subsequent calls.
- Change `buildKtor()` to log a warning instead of throwing an exception on subsequent calls.
* Update WebDAV property names according to new dav4jvm naming scheme
* Use new supported-report-set; fix `MaxResourceSize` property reference in CalendarSyncManager
* Remove comment
- Update SyncManager to handle LocalStorageException with DeadObjectException cause
- Refactor Syncer to catch all exceptions and handle specific cases
Add @MustBeClosed annotation to buildKtor method
This commit adds the `@MustBeClosed` annotation to the `buildKtor` method in `HttpClientBuilder.kt` to indicate that the returned `HttpClient` instance must be closed by the caller. It also updates the test in `HttpClientBuilderTest.kt` to use the `use` function to ensure proper resource management.
* Increase logging level
* Adjust log levels for visibility in non-verbose logs
- Change log level from FINER to FINE in StreamingFileDescriptor
- Update log level from FINER to FINE in AccountSettingsMigration8
- Add note about log levels in LogManager documentation
* Fix KDoc typo
* Update comment
* Support viewing jtxBoard resources from debug info
* Correct value of EXTRA_LOCAL_RESOURCE_URI
* Correct comment
* Use the same intent for journals, notes, calendar and tasks
* State working task authorities explicitly
* Use edit action to not crash opentasks
* Use getViewIntentUriFor for jtx Board tasks
* Remove explicit tasks authority for jtx Board
* Remove explicit tasks authority for jtx Board
* Remove early return statement
* Dont handle jtxBoard tasks in LocalTask which is only for Dmfs tasks
* Add some kdoc to LocalTask and LocalJtxICalObject
* Use when with in list
* Add FLAG_GRANT_READ_URI_PERMISSION to the correct intent
* Correct line endings to from CRLF to LF
* Refactor ClientCertKeyManager and HttpClientBuilder
- Add logging to `ClientCertKeyManager` for better error handling.
- Update `HttpClientBuilder` to conditionally use custom trust manager and hostname verifier based on `allowCustomCerts` flag.
- Rename `customCertsUI` to `allowCustomCerts` in build configuration.
* Update trust manager and hostname verifier selection logic
- Improve logging and error handling in `ClientCertKeyManager`
* App settings: hide certificate settings when custom certificates are not allowed
* Typo
* Add AccountSettingsMigration21 to cancel pending address book syncs
* Add application context annotation
* Add log statement
* Increase account settings current version
* Add and update kdoc
* Call cancelSync via integration
* Optimize imports
* Update kdoc
* Updating log statement
* Also cancel calendar syncs
* Don't infer authority from account type
* Update kdoc
* Cancel only on Android 14+
* Cancel for all authorities and update kdoc
* Use cancelSync directly in migration
* Enable forever pending sync workaround by canceling sync adapter framework syncs on Android 14+
* Stop always returning false for pending sync state of sync adapter framework
* Cancel by request and empty bundle
* Cancel syncs for calendar, tasks, and contacts separately
* Minor edits to log statement and kdoc
* Add migration test; Update migration
* Log all extras instead of just upload flag
* Use lazy on syncFrameworkIntegration injection
* Multiple changes
- don't cancel address book accounts of all main accounts
- merge loops
* Add authority to log statement
* Replace complex state verification logic by status changed flow
* Cancel syncs account wide across all authorities
* Add some delay to allow dummy sync requests to be created
* Reduce wait until pending
* Drop Thread.sleep()
* Use a callback flow instead of mutable state flow
* Shorten first true filter
* Shorten remaining first true filter
* Merge HttpClient and HttpClientBuilder
- Remove `HttpClient` class and replace with `OkHttpClient`
- Update all references to `HttpClient` to use `OkHttpClient`
- Add new `HttpClientBuilder` class for building `OkHttpClient` instances
- Update all builder usages to use the new `HttpClientBuilder` class
* KDoc
* Integrate Conscrypt for TLS
- Add Conscrypt dependency
- Initialize Conscrypt in HttpClientBuilder
- Create ConscryptIntegration utility
* KDoc
* Make object a class, better test
* Update cert4android to the latest version (doesn't bundle Conscrypt anymore)
* Merge HttpClient and HttpClientBuilder
- Remove `HttpClient` class and replace with `OkHttpClient`
- Update all references to `HttpClient` to use `OkHttpClient`
- Add new `HttpClientBuilder` class for building `OkHttpClient` instances
- Update all builder usages to use the new `HttpClientBuilder` class
* KDoc
* Fix typo
* Also set OWNER_ACCOUNT when updating calendar because renaming account
* Add test
* Update comment clarifying content values
* Assume calendar provider is present and drop null checks
* Remove unnecessary AutoCloseable implementations and client.close() calls
- Remove AutoCloseable from NextcloudLoginFlow and DavResourceFinder
- Remove client.close() calls in various classes and tests
- Update HttpClient to remove close() method
* Fix test
* Fix annotations / KDoc
* Refactor sequence handling in calendar sync
- Move sequence update logic to SequenceUpdater
- Update LocalCalendar to use new SequenceUpdater
- Remove redundant methods from LocalCalendar
- Update tests and dependencies
* Minor KDoc
* [WIP] Proof of concept for syncing without `Event` data class
* Replace AndroidEvent2 with EventsContract
* Update synctools, refactor upload logic in `CalendarSyncManager`
* KDoc
* Update UID immediately in `ContactsSyncManager`, `CalendarSyncManager`, and `TasksSyncManager`
- Remove `OnSuccessContext.uid` from `GeneratedResource`
* Minor changes
* Handle multiple events in a single iCalendar
- Rename `processVEvent` to `processICalendar`
- Add default alarm for non-full-day events again
- Prevent NPE on null flags (used for debug info)
* Fix tests
* Define interfaces
* [WIP] Refactor sequence and UID handling in event uploads
- Refactor `generateUpload` method to return `GeneratedResource`.
- Update `SyncManager` to handle `GeneratedResource`.
- Implement sequence and UID management in `CalendarSyncManager`.
- Remove redundant `prepareForUpload` method from `LocalEvent`.
* Refactor sequence handling in uploads
- Move UID validation to `DavUtils.isGoodFileBaseName`
- Update sequence directly in iCalendar for group-scheduled events
- Rename `resourceBaseName` to `suggestedBaseName` for clarity
* Refactor sequence / UID handling in contact uploads
- Update `LocalAddress` interface to include `updateUid` method
- Modify `ContactsSyncManager` to handle UID generation and update
- Remove redundant UID handling in `LocalContact` and `LocalGroup`
- Adjust code style settings for right margin
* Remove redundant UID update from `ContactsSyncManager` and `CalendarSyncManager`
* Implement UID handling in `TasksSyncManager` for uploads
* Update JtxSyncManager
- Update `JtxSyncManager.kt` to implement the `generateUpload` function.
- Update `LocalJtxICalObject.kt` to include the `updateUid` method for updating UIDs in the collection.
* Remove deprecated `prepareForUpload` method from `LocalResource`
- Remove `prepareForUpload` implementations from `LocalContact`, `LocalEvent`, `LocalGroup`, and `LocalTask`
* Rename `isGoodFileBaseName` to `isGoodFileName` in `DavUtils`
* Fix tests
* Move UID generation logic to `DavUtils.generateUidIfNecessary`
- Use `DavUtils.fileNameFromUid` for generating file names
- Update `ContactsSyncManager`, `CalendarSyncManager`, `TasksSyncManager`, and `JtxSyncManager` to use new utility methods
* Add tests for DavUtils
* Some tests
* Refactor onSuccessfulUpload
* Update KDoc
* Logging
* Remove unnecessary LocalEvent method
* KDoc
* Simplify LocalResource interface
- Remove generic parameter from LocalResource interface
- Update all implementations to reflect the change
- Adjust related test cases and exception handling
* Fix tests
* Update view item on sync error string
* Remove view item action from notification
* Show button in debug info screen to jump to problematic event resource
* Move companion object to the end of activity class
* Add local resource dump to intent
* Add kdoc
* Add some comments for not yet implemented resources
* Don't export DebugInfoActivity
* Send intent instead of URI and launch from DebugInfoActivity
* Add option to view problematic contact
* Extract intent builder logic to another method
* Add option to view problematic contact
* Minor changes for readability
* Extract dump string creation to interface method
* Pass Uri instead of intent and create view local resource intent in DebugInfoActivity
* Use androids existing getContactLookupUri method
* Remove extra variable
* Remove obsolete val declaration
* Rename dump to summary
* Refactor code structure for local resource URI handling
* Update code structure to use getDebugSummary for local resource summaries
* Update exception handling in SyncNotificationManager
Change the catch block to handle all `Throwable` exceptions instead of just `OutOfMemoryError`. This ensures that any potential issues arising from providing information about the local resource are caught and ignored.
* Add "copy remote URL" action
* Use string resource
* Truncate contact, task, and event strings to 1000 characters
* Fix tests
* Minor changes
- Replace `ContactsContract.RawContacts` with `RawContacts` in `LocalContact.kt`
- Remove unnecessary newline in `LocalJtxICalObject.kt`
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Using `SecureTextField`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* `OutlinedSecureTextField` doesn't support `readOnly`
* fixed string conversions
* - Update AddWebdavMountScreen to use enabled instead of readOnly
- Ensure onKeyboardAction checks canContinue before proceeding
- Update UrlLogin and EmailLogin to ensure onKeyboardAction checks canContinue before proceeding
- Update InputDialogs to ensure confirmEnabled is checked before proceeding
* Use get() for deriving things from a mutable state
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Change context to default dispatcher on updating automatic sync when renaming account
* Minor changes
- add worker thread annotations
- use injected defaultDispatcher
* Add tests
* Apply withContext with default dispatcher on the whole rename method
Update dependencies and modify AboutActivity to use dynamic library loading
- Remove outdated aboutlibraries.json
- Update AboutActivity to dynamically load libraries using LocalContext
- Replace InvalidRemoteResourceException with InvalidICalendarException in sync managers
- Bump dependency versions for various libraries including mikepenz-aboutLibraries, okhttp, and unifiedpush
- Adjust build.gradle.kts and gradle/libs.versions.toml for new plugin and library versions
* Fix state matching logic in AndroidSyncFrameworkTest
- Add `fullMatch` parameter to control whether all expected states must be present
* Ensure non-optional expected state matches actual state
* Remove unused rule / variable
* Adapt test
- Update `onStatusChanged` to override the interface method.
- Replace custom assertion with `assertTrue` for state comparison.
* Use SensitiveString for passwords to prevent them from being logged by `toString()`
* Add test
* Fix other tests
* Credentials: equals / hashCode not needed anymore
* Add tests for equals
- Remove scheduleTag assignment in LocalGroup update method
- Refactor LocalGroupTest to use @Before and @After annotations
- Add new test case for update method in LocalGroupTest
* Configure Dependabot for Gradle dependencies
Add Gradle dependency management configuration to Dependabot.
* Update dependabot.yml to ignore specific Kotlin and KSP dependencies
* Finish activity after deleting
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added proper toast for when the account is deleted
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Simplify logic
* Missing fix
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* [WIP] Refactor LocalResource interface and implementations to use immutable properties and add deleteLocal method
* Use `Optional` for `fileName` in `clearDirty` methods, update syncManagers
* Update synctools
* Refactor LocalCalendar to use AndroidRecurringCalendar for event operations
* Use AndroidCalendar.findEvent
* Update SyncManager to process fileName, eTag, scheduleTag and flags
* SyncManager: make ETag and Schedule-Tag processing more understandable
* Make upload handling more clear
* Update synctools
* Fix bottom bar color on custom tabs
* Removed themind
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Refactor openDocument operation to use OsConstants for mode parsing
* RandomAccessCallbackWrapper: refactor so that it's only purpose is to avoid the memory leak
* Use main looper instead of a new thread per RandomAccessCallback
* Remove WebDAV access notification
* Remove nsk90-kstatemachine dependency
* Simplify fileDescriptor() method
* Use dedicated I/O thread again; use Kotlin `copyTo` for copying
* Handle `SecurityException` for `acquireContentProvider`
* Added optional `throwOnMissingPermissions` arg to `acquireContentProvider`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Set `throwOnMissingPermissions` to `true`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Adapt comments, remove now unnecessary try/catch in AccountSettingsMigration20
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Remove WebdavScope as it is no longer needed
* [WIP] DavDocumentsProviderImpl
* [WIP] Move DavDocumentsProvider to BaseDavDocumentsProvider and implementation to DavDocumentsProvider
* Adapt tests and DI
* [WIP] Implement Command pattern
* Finish Command pattern, add deprecation notices
* Unify DavDocumentsProvider with wrapper again
* Get rid of DavDocumentsActor
* Add notes about lifecycle, remove shutdown
* Choose real or fake (for tests) SyncAdapter over DI
* Minor changes
* Rename SyncAdapterServicesTest.kt to RealSyncAdapterTest.kt
* Group sync adapter / sync framework classes into new package
* Cache SyncAdapter in SyncAdapterServices
* Add documentation to SyncAdapter interface and rename RealSyncAdapterTest to SyncAdapterImplTest
* Clarify optional fields in UI
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Add icons to add webdav mount screen
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Add title to group mount point address and name
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use assistant composable
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] Update synctools
* Refactor LocalEvent to use LegacyAndroidCalendar for event operations
* Refactor LocalEvent to use LegacyAndroidCalendar for event operations
* Update cert4android to get 16 kB page size support over Conscrypt 2.5.3 (#1581)
* Move SyncState to resource package because it's not in the database (#1585)
* Update dependencies, including dav4jvm that updates okhttp to 5.x (#1593)
* Update dependencies, including dav4jvm that updates okhttp to 5.x
* Update mockk and okhttp
* Bump version to 4.5.2-beta.1
* Move Insert/update to DAO (#1587)
* Move homeset insert/update logic from repository to DAO; add thread-safety test
* Rename insertOrUpdateByUrlRememberSync
* Fix exceptions being fetched as `Parcelable` instead of `Serializable` in `DebugInfoActivity` (#1597)
Typo: replace `getParcelableExtra` with `getSerializableExtra`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Bump version to 4.5.2
* Fetch translations from Transifex
* Add documentation and handle missing event in LocalEvent
* Minor changes
* Rename `event` to `getCachedEvent()` to make it more clear what it does
* Update SEQUENCE after successful event upload more explicitly
* Update sequence after successful calendar event upload
* Remove deprecated add() method from LocalResource
* Update KDoc
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* [WIP] Update synctools
* Refactor LocalEvent to use LegacyAndroidCalendar for event operations
* Refactor LocalEvent to use LegacyAndroidCalendar for event operations
* Update cert4android to get 16 kB page size support over Conscrypt 2.5.3 (#1581)
* Move SyncState to resource package because it's not in the database (#1585)
* Update dependencies, including dav4jvm that updates okhttp to 5.x (#1593)
* Update dependencies, including dav4jvm that updates okhttp to 5.x
* Update mockk and okhttp
* Bump version to 4.5.2-beta.1
* Move Insert/update to DAO (#1587)
* Move homeset insert/update logic from repository to DAO; add thread-safety test
* Rename insertOrUpdateByUrlRememberSync
* Fix exceptions being fetched as `Parcelable` instead of `Serializable` in `DebugInfoActivity` (#1597)
Typo: replace `getParcelableExtra` with `getSerializableExtra`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Bump version to 4.5.2
* Fetch translations from Transifex
* Add documentation and handle missing event in LocalEvent
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* [WIP] Refactor LocalEvent to delegate to AndroidEvent
* Move tests
* Use test rules from synctools
* Add null check for content provider client in JtxSyncManagerTest
* Update dependencies, move OkhttpClientTest
* Refactor LocalCalendar to wrap AndroidCalendar
* Update bitfire-synctools to 1a613d5d3c
* [WIP] Refactor LocalEvent to delegate to AndroidEvent
* Move tests
* Use test rules from synctools
* Add null check for content provider client in JtxSyncManagerTest
* Update dependencies, move OkhttpClientTest
* 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
* Use ical4android that removes ClassLoader checks; refactor SyncDispatcher
* [Tests] Add SyncDispatcher provider for tests
* Add sync dispatcher with fixed thread pool
* Replace fixed thread pool context with thread pool executor (as we had it previously, but without setting the contextClassLoader)
* Replace sync dispatcher with I/O dispatcher with limited parallelism
* DavHomeSetRepository, DavServiceRepository: apply new naming scheme for (non-)suspending calls
* AccountRepository: apply new naming scheme for (non-)suspending calls
* Update repository methods to new naming scheme
* Remove packaging resources exclusion and configurations
* Update mikepenz-aboutLibraries to 12.1.0-rc03 and configure resource merging for LICENSE files
* Update subscriptions when collection is (un)selected for sync
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove collections change listener and its hilt module
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove observer pattern to listen for collection changes
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Update push subscriptions when collection is (un)selected for sync
* Update collection selection listener to use lazy initialization
* Update push subscriptions and sync when collection is (un)selected for sync
* Update app/src/main/kotlin/at/bitfire/davdroid/ui/CollectionSelectedUseCase.kt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Move CollectionSelectedUseCase to account package
* Add test for CollectionSelectedUseCase
* Inject application scope instead of using a factory
* Update tests to run on our main dispatcher
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Upgrade about libs to 12.1.0
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Update AboutLibraries version to 12.1.0-rc02
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Handle non-existing account gracefully when (un)subscribing collections
* Unsubscribe from all (subscribed) collections when no push distributor is selected
* Upgrade UnifiedPush Connector to 3.0.4
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Updated overrides
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added storing keys and auths
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Excluded tink
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed deprecations and calls
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Integrate UnifiedPush 3.x connector and FCM distributor
* Integrate UnifiedPush connector 3.x, use VAPID and message encryption
* [WIP] Refactor push registration logic and remove deprecated methods
* [WIP] Remove PushRegistrationWorkerManager and refactor PushRegistrationManager
* Remove unused service repository dependency and update worker to suspend
* Add suspend modifier to DAO methods and repository methods
* Add runBlocking to getByService call in CollectionListRefresherTest
* Add documentation for UnifiedPushService and PushRegistrationManager
* Add fallback for push messages without topic
* [WIP] Add UnifiedPushService test with workaround for PushService binder
* Update UnifiedPush library version and clean up test code
* Refactor push message handling, synchronization and coroutines
* Add coroutine dispatchers for push registration and unregistration
* Add async support for push subscription updates
* Refactor unsubscribe logic into reusable method
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Perform delayed sync on a collection UI change
- sync state
- force-read-only state
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use withContext to access DB on background thread
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove return comment
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Extract delay value to constant
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use accountRepository to create account from name
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Extract notification handling to separate class
* Notify user at sync if content provider is missing
* Dismiss only content provider specific notification
* Remove title from notification text body
* Move sync warning strings into their own block
* Add KDoc, duplicate method for clarity
* Show message in notification for disabled tasks apps
* Pass authority through method calls
* Shorten method names
* Don't show content provider error notification when missing permission
* Rename methods and remove obsolete var
* Add spacing in content provider missing warning
* Improve kdoc
* Remove obsolete tasks provider error messages
* Syntactic sugar
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added timestamp to debug info
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added timestamp to `DebugInfoActivity.IntentBuilder`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Show local time and UTC of timestamp
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add LocalTestAddressBookStore.kt
* Update tests acquiring local test address books
* Remove unused methods from LocalTestAddressBook
* Extract dirty check methods to the single test class using them
* Remove unused read only flag
* Drop obsolete context
* Reusables as properties
* Rename LocalTestAddressBookStore to LocalTestAddressBookProvider
* Minor changes
* Remove test address book after provision finishes and don't remove all before
* Fix more tests by removing address book accounts after run, not before
* Wrap provision method call in try-finally
* Rename provide methods anonymous function param for clarity
* Extract account recreation to variable
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Use seeded random number generator for a 100% deterministic test result
* Fix typo
* Rename variable
* Mock random numbers and assert corresponding record is found
* Move companion object to the end of class
* Skip login type selection when logging in via intent
* Skip login type page if not default login type
* Add test for implicit email intent
* Fix test
* Update KDoc
* Refactor URI handling in LoginActivity and StandardLoginTypesProvider
* Skip login type page if intent is clear, but don't skip when using defaultLoginType
* Log unclear intents
* Use data class instead of pair
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add AccountSettingsMigration20 to handle collection ID migration for syncer
* Add success path tests for address books and calendars
* Increase CURRENT_VERSION, fix task list store
* Update ical4android
* Match DB collections with content provider collections via ID
* Minor renaming and KDoc
* Move string constant to companion object
* Update KDoc
* Use getOrDefault to be more explicit
* Remove exception throw on missing collection ID
* Rewrite LocalAddressBookStoreTest
* Minor changes
- remove unused param
- make companion methods internal
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] Use Hilt for HttpClient.Builder
* Inject Provider<HttpClientBuilder> when necessary
* Proxy support
* [WIP] Tests
* Fix tests
* Minor changes, enable cache support again
* Update HttpClient to use modern TLS connection specification (disable TLS 1.0 and 1.1)
* Use real CredentialsStore
* Add AppTheme to previews
* Show warning when contacts or calendar system apps are missing or disabled
* Change android icon to database missing icon
* Remove duplication
* Use packageChangedFlow to observer live changes
* Send user to settings app when deactivated and manual when missing
* Find whether content provider app is available by authority
* [WIP] Minor changes
* Open "Manage apps" instead of manual
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Split pair of show only personal settings
* Create and consume showOnlyPersonal settings separately
* Fix showOnlyPersonal flow state change not triggering re-emission
* Combine if statements
* Minor refactoring (lift out "if")
* Create separate reload methods
* Reload on model creation
* Use viewmodel scope
* Move init after relevant method declarations
* Add kdoc
* Remove deprecated getShowOnlyPersonalPair
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Test loginFromIntent
* Fix given URI
* Add test
* Use URI authority directly
* Add test for implicit intents
* Add URI port only if not -1
* Modify URI using Java URI
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Collection list refresh: Don't update home sets that have been fetched already
* Expand testDiscoverHomesets for personal flag
* Add comment
* Rename property; Update its kdoc
* Make class properties function params
* Extract home set class and property definitions for home set discovery
* Pull out HomeSetClassName and property names
* Minor KDoc changes
* Move collection and principal query properties
* Make properties private
* Make collectionProperties service-specific; drop unused SupportedAddressData
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Make entity properties immutable where possible
* Make WebDavDocument room entity fully immutable
* Make HomeSet room entity fully immutable
* Make Collection room entity fully immutable
* Minor change
* KDoc, use transaction for combined read/write access
* Minor changes
---------
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Moved account renaming to `LocalTaskListStore` and trying to fix issue
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed missing import
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Improved renaming algorithm
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added `asSyncAdapter`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Split account renaming responsibility
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Split account renaming responsibility
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of unused `SettingsManager`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Simplified updateAccount on LocalDataStore
* Added explanatory comment
* Changed provider acquiring to the store one
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* LocalTaskListStore takes provider name instead of authority
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Got rid of throws
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Simplified expressions
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added renaming of calendar accounts
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed imports
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Moved calls to try-catch
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Typo
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Ignore exceptions of every store.updateAccount()
---------
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>
* [WIP] Adapt SyncResult
* Remove numeric stats (not well-defined and not really used)
* Pass "too many retries" or "database error" back to sync framework on hard errors
* Migrated to using timezone id directly
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* added tests for collection timezone
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed calendar definition
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added missing line break
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Unnecessary forced null
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added ksp.incremental
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Version is now 16
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Comments cleanup
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added automatic migrations tests
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Renamed block to assertionsBlock
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added comment
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of extra comments
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of PR url
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added column drop with try-catch
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added `SdkSuppress`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added version check for column drop
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Included SDK 34
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Commit recover
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* DB tests: inject Context
* DB migration tests: validate in target schema version; manual migration definitions: use new Kotlin syntax
* Use auto-migration instead of manual migration.
- No manual DROP COLUMN required.
- Added support for migration of unparseable VTIMEZONE.
* Update ical4android
* Service detection: ask for calendar default timezone (+ ID)
* Remove dropColumn because we don't need it for the current migration.
Leave the v4 -> v5 migration as it is.
* KDoc
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Enforced edge-to-edge
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed bottom padding
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Recovered ime padding
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Updated theme colors for intro
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Always using light primary color in intro
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Simplified settings
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added disabling of top padding
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Improved syntax
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed padding
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Add comments
* Use default fallback colors for status/system bar instead of transparent
- With transparent, system bar buttons are white on very-light-grey
* Use safeContentPadding for intro
* Use scrim color from theme
* IntroPage: correctly consume insets; Assistant: KDoc/example
* Branding box extends to upper edge
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Set correct navigation bar color, if applicable
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Let content shine through navigation bar / especially for lists like settings
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Brand background is no longer padded
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Window insets are now consumed by AppTheme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed padding
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Do not consume insets
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Move content
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Enabled E2E in intro
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] Move local collection management from companion objects to LocalDataStore
* Move Syncer.getLocalCollections to LocalDataStore.getAll()
- note that things like the "sync_enabled" Android calendar flag are not supported and always set to true
* Minor changes
* Implement LocalJtxCollectionStore
* Implement LocalTaskListStore
* Fix tests
* Drop initialUserData
* Address book read-only applies to entries of address book itself, so moving to LocalAddressBook
* KDoc, shouldBeReadOnly
* Test accountName
* Remove obsolete address book factory
* Test create address book
* Test createAccount
---------
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
* Store subscription expiration in DB
* Regularly run PushRegistrationWorker, if needed
* Skip re-registering subscriptions that are not about to expire
* Add back-off for PushRegistrationWorkerManager
* Request expiration in 3 days
* Show expiration in UI, timestamps in seconds
* Fix tests
* Always evaluate read only
* Extract read only evaluation to companion method
* Extract read only evaluation to companion method
* Add test
* Always pass forceReadOnly flag
* Minor KDoc changes
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* LocalAddressBook: move contacts when renaming the address book account
* Don't make contacts dirty when moving
* Move isDirty to tests because it's only required for tests
* We don't have to set the user-data twice
* Add test for groups
* Always show "WiFi SSID card" in account settings when SSID restriction is active and adapt content according to whether all conditions are met or not
* Move explanation to top and add paragraph
* Remove unnecessary parenthesis
* Use two text composables and no spacer
* Fix preview
* Fixed surface color in dark theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Account screen: higher contrast for collection cards
* Account screen: use normal instead of elevated cards
* Adapt colors of card lists
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Syncer: make sure collections which are deleted are not synced
* Syncer: log when local collection is removed
* Update KDoc and tests
* Handle all CRUD work in updateCollections
* Update naming, KDoc, tests
* Minor changes (KDoc, naming)
* Log warning instead of throwing exception when not possible to find account for address book account
* Run sync and accounts cleanup in migration
* Rename accounts in migration
* Run account settings migrations on background thread
* Revert "Run account settings migrations on background thread"
This reverts commit 6b578da4f1.
* Add tests for AccountsCleanupWorker
* Move companion object to end of class
* Don't use AccountRepository for address book accounts
* Update account user data in LocalAddressBook
* Minor changes (naming etc)
* Add log line when migrating
* Try to fix test error
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Upgrade dav4jvm
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* separate CalendarTimezone and CalendarTimezoneId
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed timezone name setting
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed `VTIMEZONE` conversion
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using text instead of CDATA
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed spec
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added comment
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Renamed `timezoneDef` to `timezoneId`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Upgrade dav4jvm
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* separate CalendarTimezone and CalendarTimezoneId
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed timezone name setting
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed `VTIMEZONE` conversion
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using text instead of CDATA
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed spec
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added comment
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Renamed `timezoneDef` to `timezoneId`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* [CI] Update workflows to Java 21
* Set default value of the timezone state to null
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add account name to address book account name
* Add parenthesis for account name and a hashtag for the collection id
* Use the correct id
* Move DI entry point to where it is used
* Sync worker management: move logic from companion object to new class
* Fix tests
* Move re-sync inputs from [OneTimeSyncWorker] to [BaseSyncWorker] as they're processed there
* Remove useless Companion
* Document that AccountSettings shouldn't be used in the main thread
* Throw exception when AccountSettings are used on the main thread
* Don't access AccountSettings on main thread
* Don't access AccountSettings on main thread
* Don't access AccountSettings on main thread
* Acquire account settings via address book account
* Extract the code to find an address books main account to the account repository
* Use collection id as reference in address book account
* Remove obsolete baos
* Find main account directly from collection in SyncManager
* Require main account to get account settings
* Stop deleting address book accounts without a main account, since they may exist on their own now
* Require content provider and introduce static deleteByCollection method
* Update KDoc
* Show all address book accounts separately
* Drop mainAccount method
* [DI] Use AssistedInject for LocalAddressBook
* Renaming, remove "main account" concept
* Fix debug info
* AccountsCleanupWorker: Rename main account to account
* Further remove main accounts
* Reduce redundancy
* AccountSettings: check account type
* AccountSettingsMigrations: drop v5 -> v6 migration (not tested anyway)
* AccountRepository: directly delete accounts
* Remove obsolete workerAccount
* Get all address books, even if not sync enabled
* Delete orphan address book accounts
* Rename two more occurrences of main account concept
* AccountSettings: allow test accounts
* Syncer: rename methods for clarity, add KDoc
* Drop empty test class
* Make code more readable and add comment
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Disabled `CoroutineCreationDuringComposition` in lint
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved disable
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Update ical4android
* Use standard content provider in TaskSyncer
* Check version instead of acquiring TaskProvider
* Add sync result error
---------
Co-authored-by: Arnau Mora <arnyminerz@proton.me>
* Fix overlapping method name and use interface everywhere
* Fix overlapping property name
* Update logger usage
---------
Co-authored-by: Arnau Mora Gras <arnyminerz@proton.me>
* Passing `collection` directly
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed imports
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fix tests
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Log sync time using repository; no need for account/service check anymore
* SyncManagerTest: don't write SyncStats to DB
---------
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>
* Use address book contacts content provider provided by syncer
* Close any acquired content provider after sync
* Acquire/Check task provider provider as preparation step
* Provide sync arguments at syncer creation
* Acquire ContentProviderClient in syncer implementations
* Generalize sync algorithm in Syncer
* Use contacts authority for address books
* Generalize sync algorithm in CalendarSyncer
* Generalize sync algorithm in SyncerTest
* Generalize sync algorithm in TaskSyncer
* Rename preparation method and add an after sync method
* Generalize sync algorithm in JtxSyncer
* Generalize sync algorithm in AddressBookSyncer
* Use repositories instead of DAOs
* Replace deprecated log statements
* Use generic type for collection types
* Infer authorities when possible and pass only task authorities along
* No need to close TaskProvider explicitly
* Use colors only where needed
* Use provider with auto closable
* Get sync collections in syncer implementations
* Delete syncer test
* Pass provider through methods instead of using lateinit property
* Reorder constructor arguments
* Remove trailing commas
* Remove obsolete undocumented conditional
* Reorder methods
* Reorder methods
* Abort sync when preparations fail
* Drop obsolete permission check
* Use generics for url and delete
* Use generic for update
* Use generic for syncCollection
* Rename create to createCollection for consistency
* Revert "Rename create to createCollection for consistency"
This reverts commit 0fee4fe7fcf3ec8ef965c9a2e0db991a1bbbbcf7.
* Revert "Use generic for syncCollection"
This reverts commit ae129fd17e06146a1e9f8631e3cdbd2dc0a4db06.
* Revert "Use generic for update"
This reverts commit 42dd665851ba83a75bb498b98bd56624e2b09647.
* Revert "Use generics for url and delete"
This reverts commit 7ae1425039656d4a9937628ca1799ce8c59ceebb.
* Move delete() to LocalCollection
* Move url to LocalCollection
* Fix local test collection
* Minor changes
* Minor changes
- make sync private
- use to autoclose provider
* Query for sync collections once only
* Add KDoc and update comments
* Make property a local variable
* Update KDoc
* Add back ose conditional
* Remove blank line at beginning of method
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Use test account type (without sync adapters as side effects) for instrumented tests
* Provide standardized way to get test account; re-enable LocalAddressBookTest
* [WIP] Use NotificationRegistry to post notifications
* Replace NotificationUtils by NotificationRegistry
* Re-factor SyncConditions; move tests to default location
* Describe notification channels
* Use per-resource Guava cache with weak keys and values as WebDAV page cache
* Replace ExtendedLruCache by Guava cache
* Use injected logger in DavDocumentsProvider
* Use DI for RandomAccessCallback, move Wrapper to outer class
* Fix tests
* Use Hilt for more classes
* Use Guava LoadingCache as page cache
* Fix tests
* Minor code change
* Update dnsjava, use desugaring with nio, refactor DNS resolving
* KDoc
* Rewrite bestSRVRecord test
* Add pathsFromTXTRecords tests
* Add desugaring note
* Rename @AssistedFactory method to "create"
* testBestSRVRecord_MultipleRecords_Priority_Same: broaden range for distribution
* Use DI for AccountSettings
* AccountSettings: clarify different account variables
* Fix tests
* Inject @ApplicationContext instead of Application
* Add Hilt rule to various tests
* Fix tests
* Consequently use injected @ApplicationContext in Android tests; fix Hilt rules
* LogcatHandler: log source class as tag and not in the text, remove max length
* Separate LogManager and Logger usage
* Improve StringHandler for DavResourceFinder
* Tests, KDoc
* Provide collection to CalendarSyncManager
* Provide collection to ContactsSyncManager
* Provide collection to JtxSyncManager
* Provide collection to TasksSyncManager
* Provide collection to SyncManager
* Fix test
* Minor changes
* Add kdoc
* Minor changes
- added KDoc
- SyncManager can never handle address book authority (content
authority for contacts is contacts authority)
- moved @UsesThreadContextClassLoader to respective sync manager
* Mock collection in test
* Add comments separating the sync process into separate steps
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Drop address book provider
* Drop address book sync adapter service
* Replace address books authority with contacts authority
* Update kdoc
* Revert "Update kdoc"
This reverts commit dfb14d466f6c58d9422e59c770e0a5348a497b7d.
* Revert "Replace address books authority with contacts authority"
This reverts commit 0e15bf11b3235dfbc38696741100210fbe497dbd.
* Don't enable addressbook sync for main account
* Acquire content provider in Syncer
* Use contacts authority instead of address book authority when acquiring content provider
* Set default sync interval for address book authority again
* Minor re-ordering of lines
* Add comment, rename variable
* Move SyncAdapterServices out of adapter package
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Migrated into to compose
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of AppIntro
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Imports cleanup
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Imports cleanup
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed padding
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* When launching intro, going back closes the app
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added content description
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved IntroActivity.Model to IntroModel
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Given fixed padding
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved intro composables together
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Do not create new task
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Minor changes
* Remove last XML styles that were required for AppIntro
---------
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>
* [wip] Create worker for push registration and call it from someplace in UI
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* [wip] Subscription registration request
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Don't enqueue push registration worker from UI
* Enqueue PushRegistrationWorker on collection changes
* Fix tests
* Update dav4jvm; Use new post method
* Remove obsolete context
* Add get and deleteAll methods to serviceRepository and update usages
* requestPushRegistration: make endpoint an argument
* Update push subscription fields in DB on successful registration
* Don't create notification channels in test class
* Remove workmanager init and provide empty set of listeners in tests
* Require network connection to run PushRegistrationWorker
* Move module declaration to a separate TestModules interface
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Call collection updates and setters only from repository
* Make collection repository changes observable
* Add kdoc
* Add basic test
* Extract RefreshCollectionsWorker; move some HomeSetDao calls to DavHomeSetRepository
* Replace more HomeSetDao calls
* Remove duplicate copyright notice
* Drop weak reference for observers
* Rename method
* Remove test service after run
* Verify notifying works with mockk
* Rename test
* Use construction injection
* Remove unused SettingsManager
* Remove obsolete mockk rule
* Use runBlocking instead of runTest
* Change to observer linkedList to mutableSetOf, remove synchronized calls
* Change to hilt multibinding
* Remove some unnecessary lines; allow empty set by Hilt
* CollectionListRefresher: delete collections using repository
* deleteRemote: call callback too; adapt KDoc
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* MKCALENDAR: wrap supported compoents in <CALDAV:supported-calendar-component-set>
* MKCALENDAR/MKCOL body generation: use Property.Name from dav4jvm instead of own strings
* [WIP] Colors
* Update navigation drawer
* Update colors
* [WIP] PermissionSwitchRow night mode
* Fix PermissionSwitchRow icon in night mode
* Use more intense colors for FABs
* Use correct account name when retrieving service
* Rename method, add kdoc
* Address books: require main account and use as Account
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Fixed padding for "Show only personal checkbox"
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Aligned text correctly
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Select nextcloud login type on nextcloud setup intent
* Fix linting error
* Add documentation
* Move model creation to compose LoginScreen
* Minor changes
- Use boolean to decide on skipping startPage
- Move login type selection logic to login types provider
* Minor changes
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Extract composables
* Drop sub component previews and minor adjustment
* Fix preview
* Extract view model
* Switch to M3
* Extract URI to Constant
* Minor changes
* We alway have AccountSettings
* Replace LiveData by State
* Use Snapshot.withMutableSnapshot in reload
* Don't show empty OAuth setting
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Refine chips in collection list
* Refine PermissionSwitchRow
* Collections list
* Fix WelcomePage and IntroActivity background color in dark mode
* Fix RadioWithSwitch in dark mode
* Drawer handler: branding in dark mode
* Extract composables
* Extract model and companion object
* Switch to M3
* Linting
* Drop previews for sub composables
* Minor adjustments for readability
* Minor changes
- use manual URL from Constants
- use M3 in some Composables
* Create PreferenceRepository (for now only for verbose logging)
* Move actual settings to model; M3 Composables
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] More hilt
* Use assisted inject for AccountSettingsMigrations
* DavDocumentsProvider: inject CredentialsStore
* Create a new WebdavScope and scope caches and credentials store to it
* Fix CredentialsStoreTest
* Convert M2 calls to M3
* Extract composable to screen
* Extract viewmodel
* Make screen model independent
* Use only primitive types in screen
* Introduce uiState class and switch to compose state where easy
* Switch remaining live data to compose state
* Add kdoc
* Add scrolling, adapt buttons to M3
* Move Intent logic to Activity
- create/handle Intent in Activity (may be replaced by NavGraph in future)
- Activity: pass unpacked initial data to Screen
- Screen: use hiltViewModel (adds hilt-navigation-compose dependency) to
create model with initial data
- Screen: use Column instead of LazyColumn
* Fix test
* Optimize imports
* Minor changes
* Move AppTheme, fix showDebugInfo
* View instead of share logs; make local/remote resource smaller; make remote resource selectable
* Leave space for scrolling down past the FAB; don't show "Local resource: null"
* Re-order composables
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added `canAccessWifiSsidLive`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Fixed initial state
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Cleaned up code
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* More cleanup
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed inspection check
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Renamed function
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Using `broadcastReceiverFlow`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Simplified check
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Using `MODE_CHANGED_ACTION`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Updated comment
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Set default value for immediate
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Use derivedStateOf instead of produceState; correctly collect broadcastReceiverFlow
* Always show WifiSSID Card in Preview (otherwise Preview won't render)
* Don't call flow.map in Composable
---------
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>
* Soft fail sync on DeadObjectException so that it is retried without immediate error message
* Handle DeadObjectException (→ retries sync); Syncer: generalize all-catch
* Migrated to M3
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Replaced preview theme
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed theme
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Forced all sets to be private
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Moved Composables and Model to individual files
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed naming
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Theme / M3 changes
* Observe lifecycle from within Screen
* Minor changes
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] Separate AccountScreen, use M3 elements
* [WIP] Use UseCases for complex flow calculations
* [WIP] Move account deletion logic into AccountRepository
* Move rename operation to repository
* Adapt FABs
* Don't use snackbars to show when the collection list is refreshed
* New collection list layout (bitfireAT/davx5#159)
* [WIP] Create AccountModel from within screen
* [WIP] Clean up AccountScreen
* [WIP] CreateAddressBook
* [WIP] Create address book / calendar screen
* [WIP] Begin CollectionScreen
* [WIP] CollectionScreen
* Error handling
* String resources
* Optimizations, remove unnecessary things
* WebDavMountsScreen: M3, refactoring
* [WIP] AddWebDavMount
* Use M3 pull-to-refresh
* AddWebDavMount, move logic to WebDavMountRepository
* Show loading state in LinearProgressBar
* Add WebDAV mount: IME action and focus requester
* Move "test WebDAV" logic from model to repository
* Move "refresh quota" logic to repository
* Move querying and deleting mounts to repository; IME navigation
* KDoc
* Move hasWebDav tests to repository
* [WIP] Rewrite login to M3 and better UI states
* Use AccountRepository to create account
* LoginModel is SSOT for page navigation
* Support forced group method
* Show progress bar when account is being created
* Make account name suggestions work again
* Use M3 text field supportText for errors
* Refactor: login by URL, login by email, advanced login
* Refactor Nextcloud login, move login flow logic to separate class
* Refactor Google login, move OAuth logic to separate class
* Fix errors when navigating back after successful resource detection
* Make PasswordTextField M3
* ManagedLogin: M3, UiState
* Updated theme; managed login functionality
* Improve back navigation
* Rename AppTheme to M2Theme, add M3 theme
* Rewrite AboutActivity to M3
* Apply M3 theme; minor optimizations
* Use M3 version of AboutLibraries
* Use material3 instead of material3-android dependency
* Use reversed theme
* [WIP] Use broadcastReceiverFlow and packageReceiverFlow
to make sure that broadcast receivers are unregistered
* Rewrite remaining BroadcastReceivers to use broadcastReceiverFlow
* TasksAppWatcher: minor coroutine changes
* KDoc
* TasksActivity: use Compose state instead of LiveData
* Check if keep-permissions changed when user comes back from settings app
* Use one model only
* Use mutable state flows
* Use compose mutable state
* [CI] Improve caching behavior
* Freshly created model can never be null
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Use Compose state instead of LiveData; reset token before starting Login flow
* [WIP] Reset state variables when needed
* Always run postForJson in IO dispatcher; show progress when polling for login data
* Reset login URL in onReturnFromBrowser
* Do not show existing password when changing
* Use PasswordTextField for password input dialogs
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added custom Compose theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of accompanist theme adapter
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed unused import
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added actionbar to the activities that didn't have one
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Theme now always hides actionbar
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added back string
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of all color definitions
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved color definition to drawable
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using Compose colors
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using AppCompat theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed XML theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved color definition
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added bars coloring in Compose
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added dark theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added custom Compose theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of accompanist theme adapter
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed unused import
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added actionbar to the activities that didn't have one
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Theme now always hides actionbar
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added back string
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of all color definitions
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved color definition to drawable
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using Compose colors
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using AppCompat theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Removed XML theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Moved color definition
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added bars coloring in Compose
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added dark theme
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Changed content description
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Using `onSupportNavigateUp`
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Changed color on top of primary green
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added up navigation
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Made `onSupportNavigateUp` optional
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Typo
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Got rid of edge-to-edge
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Added back some XML styles
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Simplify TasksCard calling
* Move theme colors to flavor-specific ThemeColors file
* Remove global AppTheme paddings for now
* Optimize imports
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Don't use Gradle build and configuration cache for releases
- don't enable Gradle build and configuration cache for the project, but recommend it for the developer
- explicitly enable Gradle build and configuration cache for CI test jobs
- let AboutLibraries generate lib definitions itself again
- also don't archive test results (sometimes fails and we never use the results)
* Add encryption key for gradle cache
* Only warn on configuration cache problems (caused by AboutLibraries)
The list was computed in an automated way and includes:
intro_battery_not_whitelisted
intro_battery_whitelisted
permissions_jtx_status_off
permissions_jtx_status_on
about_flavor_info
about_translations_thanks
install_email_client
accounts_global_sync_disabled
accounts_global_sync_enable
app_settings_tasks_provider_synchronizing_with
account_no_address_books
account_no_calendars
account_no_webcals
account_swipe_down
account_create_new_address_book
account_create_new_calendar
settings_title
settings_enter_username
settings_enter_password
settings_key_default_alarm
certificate_notification_connection_security
trust_certificate_unknown_certificate_found
- OneTimeSyncWorker is also started by sync framework, so it should take network restrictions into consideration
- add "manual" flag for manual syncs that ignore network restrictions
* [WIP] Don't create a separate SyncWorker for every sync (run directly within onetime/periodic sync instead)
* [WIP] address books
* Account(s)Activity: don't show pending workers
* Migration to set new periodic sync worker tags
* Fix tests
* ContactsSyncAdapter issues address book sync on main account (not contacts sync)
* SyncAdapterService: optimize blocking with Flow instead of LiveData
* Refactoring
* Better live handling of (un)installed task apps
* Minor changes
* SettingsManager: explicitly mark possibility of null LiveData values
* Fix tests
* Move homepage and other Web URLs to Constants; minor refactoring
* Use AppTheme with built-in safe LocalUriHandler instead of MdcTheme; minor refactoring
* Account settings: add TODO for Compose rewrite
* Use UriHandler instead of UiUtils.launch when possible
* Migrated AddWebdavMountActivity to Compose
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Minor changes, use PasswordTextField
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] Add AccountActivity2 in Compose
* Make paging collections work when data changes
* [WIP] Add ProgressIndicator TODO
* [WIP] CardDAV: add swipe-to-refresh
* [WIP] Correctly use Pager
* [WIP] Only show Webcal tab when there are subscriptions
* [WIP] Implement collection properties dialog
* Implement "create collection" and "show only personal collection"
* [WIP] Add collection overflow menu items
* Show color as left border, max. 2 icons per row
* [WIP] Delete collection dialog
* Add "delete collection"
* Implement "Force read-only"
* Delete old XML classes and resources
* Add permissions warning
* Implement "Rename account"
* Case-insensitive sorting, minor changes
* Horizontal arrangement
* Less integration of Webcal subscriptions (other layout)
* Accessibility
* Collection list: provide ID als key for lazy list
* Only show "Create addressbook/calendar" when there's at least one writable homeset
Please delete this paragraph and other repeating text (like the examples) after reading and before submitting the PR.
The PR should be in _Draft_ state during development. As soon as it's finished, it should be marked as _Ready for review_ and a reviewer should be chosen.
See also: [Writing A Great Pull Request Description](https://www.pullrequest.com/blog/writing-a-great-pull-request-description/)
### Purpose
What this PR is intended to do and why this is desirable.
Example:
> Adds support for AAA in BBB, as requested by several people in issue #XX.
### Short description
A short description of the chosen approach to achieve the purpose.
Example:
> - Added authentication option _Some authentication_ to _some module_.
> - Added support for _Some authentication_ to _some content provider_.
> - Added UI support for _Some authentication_ in account settings.
Related information (links to Android docs and other resources that help to understand/review
the changes) can also be put here.
### Checklist
- [ ] The PR has a proper title, description and label.
- [ ] I have [self-reviewed the PR](https://patrickdinh.medium.com/review-your-own-pull-requests-5634cad10b7a).
- [ ] I have added documentation to complex functions and functions that can be used by other modules.
- [ ] I have added reasonable tests or consciously decided to not add tests.
* Resource is present on remote server. This flag is used to identify resources
* which are not present on the remote server anymore and can be deleted at the end
* of the synchronization.
*/
constvalFLAG_REMOTELY_PRESENT=1
}
/**
* Unique ID which identifies the resource in the local storage. May be null if the
* resource has not been saved yet.
*/
valid:Long?
/**
* Remote file name for the resource, for instance `mycontact.vcf`. Also used to determine whether
* a dirty record has just been created (in this case, [fileName] is *null*) or modified
* (in this case, [fileName] is the remote file name).
*/
valfileName:String?
/** remote ETag for the resource */
vareTag:String?
/** remote Schedule-Tag for the resource */
varscheduleTag:String?
/** bitfield of flags; currently either [FLAG_REMOTELY_PRESENT] or 0 */
valflags:Int
/**
* Prepares the resource for uploading:
*
* 1. If the resource doesn't have an UID yet, this method generates one and writes it to the content provider.
* 2. The new file name which can be used for the upload is derived from the UID and returned, but not
* saved to the content provider. The sync manager is responsible for saving the file name that
* was actually used.
*
* @return new file name of the resource (like "<uid>.vcf")
*/
funprepareForUpload():String
/**
* Unsets the /dirty/ field of the resource. Typically used after successfully uploading a
* locally modified resource.
*
* @param fileName If this argument is not *null*, [LocalResource.fileName] will be set to its value.
* @param eTag ETag of the uploaded resource as returned by the server (null if the server didn't return one)
* @param scheduleTag CalDAV Schedule-Tag of the uploaded resource as returned by the server (null if not applicable or if the server didn't return one)
* Sets (local) flags of the resource. At the moment, the only allowed values are
* 0 and [FLAG_REMOTELY_PRESENT].
*/
funupdateFlags(flags:Int)
/**
* Adds the data object to the content provider and ensures that the dirty flag is clear.
*
* @return content URI of the created row (e.g. event URI)
*/
funadd():Uri
/**
* Updates the data object in the content provider and ensures that the dirty flag is clear.
*
* @return content URI of the updated row (e.g. event URI)
*/
funupdate(data:TData):Uri
/**
* Deletes the data object from the content provider.
*
* @return number of affected rows
*/
fundelete():Int
/**
* Undoes deletion of the data object from the content provider.
*/
funresetDeleted()
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.