-
-
Notifications
You must be signed in to change notification settings - Fork 97
AndroidCalendar refactoring #1560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bca0910
to
760fc2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactors Android calendar interactions by replacing ical4android with the new synctools provider API and consolidates logging to use the shared synctools formatter.
- Bumps the
bitfire-synctools
dependency to the new commit ID. - Swaps all imports and calls from
at.bitfire.ical4android.*
toat.bitfire.synctools.*
, introducingAndroidCalendarProvider
methods. - Removes the local
PlainTextFormatter
and its tests in favor of the one provided by synctools, and updates logging handlers accordingly.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
gradle/libs.versions.toml | Updated bitfire-synctools commit ID |
app/src/test/kotlin/at/bitfire/davdroid/log/PlainTextFormatterTest.kt | Removed local formatter tests |
app/src/main/kotlin/at/bitfire/davdroid/ui/widget/CalendarColorPickerDialog.kt | Swapped Css3Color import to synctools |
app/src/main/kotlin/at/bitfire/davdroid/ui/account/CreateCalendarScreen.kt | Swapped Css3Color import to synctools |
app/src/main/kotlin/at/bitfire/davdroid/ui/account/CreateCalendarModel.kt | Swapped Css3Color import and reordered imports |
app/src/main/kotlin/at/bitfire/davdroid/sync/CalendarSyncer.kt | Replaced AndroidCalendar static calls with AndroidCalendarProvider |
app/src/main/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration7.kt | Replaced color migration calls with provider API |
app/src/main/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration10.kt | Refactored sync-adapter calls and imports |
app/src/main/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration20.kt | Replaced bulk calendar queries/updates with provider methods |
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalDataStore.kt | Renamed provider parameter to client |
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalCalendarStore.kt | Refactored create/getAll/update to use AndroidCalendarProvider |
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalCalendar.kt | Converted all query/update calls to provider-based API |
app/src/main/kotlin/at/bitfire/davdroid/log/StringHandler.kt | Swapped formatter import to synctools |
app/src/main/kotlin/at/bitfire/davdroid/log/PlainTextFormatter.kt | Removed local formatter implementation |
app/src/main/kotlin/at/bitfire/davdroid/log/LogcatHandler.kt | Removed local handler |
app/src/main/kotlin/at/bitfire/davdroid/log/LogManager.kt | Swapped in synctools LogcatHandler constructor call |
app/src/main/kotlin/at/bitfire/davdroid/log/LogFileHandler.kt | Imported synctools formatter |
app/src/androidTest/kotlin/at/bitfire/davdroid/settings/migration/AccountSettingsMigration20Test.kt | Aligned test queries to new provider usage |
app/src/androidTest/kotlin/at/bitfire/davdroid/resource/LocalEventTest.kt | Swapped test provider to client and provider-based setup |
app/src/androidTest/kotlin/at/bitfire/davdroid/resource/LocalCalendarTest.kt | Swapped test provider to client and provider-based setup |
app/src/androidTest/kotlin/at/bitfire/davdroid/HiltTestRunner.kt | Updated root logger setup to use synctools LogcatHandler |
Comments suppressed due to low confidence (2)
app/src/main/kotlin/at/bitfire/davdroid/log/LogManager.kt:83
- [nitpick] Since you’re adding a new handler on every initialization, you may end up with duplicate log outputs if this runs multiple times. Consider clearing existing handlers first or ensuring this is only called once.
rootLogger.addHandler(LogcatHandler(BuildConfig.APPLICATION_ID))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just the commit id needs to be updated once more.
This PR/issue depends on: |
Depends on bitfireAT/synctools#28
TODO: adapt commit ID when above PR is merged