From f629d23c38b172ffb5e715730e0646aed6eeb561 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 16 Apr 2019 13:18:28 +0100 Subject: [PATCH] Fix access to uninitialized properties in account update service. --- .../main/java/com/etesync/syncadapter/AccountUpdateService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/etesync/syncadapter/AccountUpdateService.kt b/app/src/main/java/com/etesync/syncadapter/AccountUpdateService.kt index 1b3ff05e..01a33ac0 100644 --- a/app/src/main/java/com/etesync/syncadapter/AccountUpdateService.kt +++ b/app/src/main/java/com/etesync/syncadapter/AccountUpdateService.kt @@ -88,14 +88,14 @@ class AccountUpdateService : Service() { val accountNames = LinkedList() val am = AccountManager.get(this) - for (account in am.getAccountsByType(App.accountType)) { + for (account in am.getAccountsByType(getString(R.string.account_type))) { accountNames.add(account.name) } val data = (application as App).data // delete orphaned address book accounts - for (addrBookAccount in am.getAccountsByType(App.addressBookAccountType)) { + for (addrBookAccount in am.getAccountsByType(getString(R.string.account_type_address_book))) { val addressBook = LocalAddressBook(this, addrBookAccount, null) try { if (!accountNames.contains(addressBook.mainAccount.name))