diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/AddressBooksSyncAdapterService.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/AddressBooksSyncAdapterService.kt
index b90fdf42..67e7a300 100644
--- a/app/src/main/java/com/etesync/syncadapter/syncadapter/AddressBooksSyncAdapterService.kt
+++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/AddressBooksSyncAdapterService.kt
@@ -33,9 +33,6 @@ class AddressBooksSyncAdapterService : SyncAdapterService() {
private class AddressBooksSyncAdapter(context: Context) : SyncAdapterService.SyncAdapter(context) {
- override val syncErrorTitle = R.string.sync_error_contacts
- override val notificationManager = SyncNotification(context, "journals-contacts", Constants.NOTIFICATION_CONTACTS_SYNC)
-
override fun onPerformSyncDo(account: Account, extras: Bundle, authority: String, provider: ContentProviderClient, syncResult: SyncResult) {
val contactsProvider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)
if (contactsProvider == null) {
diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarsSyncAdapterService.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarsSyncAdapterService.kt
index e6c6de03..8dc159e9 100644
--- a/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarsSyncAdapterService.kt
+++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarsSyncAdapterService.kt
@@ -29,9 +29,6 @@ class CalendarsSyncAdapterService : SyncAdapterService() {
private class SyncAdapter(context: Context) : SyncAdapterService.SyncAdapter(context) {
- override val syncErrorTitle = R.string.sync_error_calendar
- override val notificationManager = SyncNotification(context, "journals-calendar", Constants.NOTIFICATION_CALENDAR_SYNC)
-
override fun onPerformSyncDo(account: Account, extras: Bundle, authority: String, provider: ContentProviderClient, syncResult: SyncResult) {
val settings = AccountSettings(context, account)
if (!extras.containsKey(ContentResolver.SYNC_EXTRAS_MANUAL) && !checkSyncConditions(settings))
diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/ContactsSyncAdapterService.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/ContactsSyncAdapterService.kt
index 52dda953..43be2773 100644
--- a/app/src/main/java/com/etesync/syncadapter/syncadapter/ContactsSyncAdapterService.kt
+++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/ContactsSyncAdapterService.kt
@@ -27,9 +27,6 @@ class ContactsSyncAdapterService : SyncAdapterService() {
private class ContactsSyncAdapter(context: Context) : SyncAdapterService.SyncAdapter(context) {
- override val syncErrorTitle = R.string.sync_error_contacts
- override val notificationManager = SyncNotification(context, "journals-contacts", Constants.NOTIFICATION_CONTACTS_SYNC)
-
override fun onPerformSyncDo(account: Account, extras: Bundle, authority: String, provider: ContentProviderClient, syncResult: SyncResult) {
val addressBook = LocalAddressBook(context, account, provider)
diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/SyncAdapterService.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/SyncAdapterService.kt
index 9646eab5..63b2273b 100644
--- a/app/src/main/java/com/etesync/syncadapter/syncadapter/SyncAdapterService.kt
+++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/SyncAdapterService.kt
@@ -99,8 +99,8 @@ abstract class SyncAdapterService : Service() {
}
abstract class SyncAdapter(context: Context) : AbstractThreadedSyncAdapter(context, false) {
- abstract val syncErrorTitle: Int
- abstract val notificationManager: SyncNotification
+ private val syncErrorTitle: Int = R.string.sync_error_generic
+ private val notificationManager = SyncNotification(context, "refresh-collections", Constants.NOTIFICATION_REFRESH_COLLECTIONS)
abstract fun onPerformSyncDo(account: Account, extras: Bundle, authority: String, provider: ContentProviderClient, syncResult: SyncResult)
diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncAdapterService.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncAdapterService.kt
index 8059fb47..0da5ade1 100644
--- a/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncAdapterService.kt
+++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncAdapterService.kt
@@ -39,9 +39,6 @@ class TasksSyncAdapterService: SyncAdapterService() {
context: Context,
private val name: ProviderName
): SyncAdapter(context) {
- override val syncErrorTitle = R.string.sync_error_tasks
- override val notificationManager = SyncNotification(context, "journals-tasks", Constants.NOTIFICATION_TASK_SYNC)
-
override fun onPerformSyncDo(account: Account, extras: Bundle, authority: String, provider: ContentProviderClient, syncResult: SyncResult) {
val taskProvider = TaskProvider.fromProviderClient(context, provider, name)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 520455c0..857bf9ad 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -363,6 +363,7 @@
Clicking share will open the email app with the data below, as well as some additional debug information, attached. It may contain some sensitive information, so please review it before sending.
EteSync permissions
Additional permissions required
+ Sync failed (%s)
Calendar sync failed (%s)
Contacts sync failed (%s)
Tasks sync failed (%s)