mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
Fix account type and authority to use function and not string.
This commit is contained in:
parent
26c0a62dc4
commit
861d5e4b4e
@ -85,7 +85,7 @@ public class AddressBooksSyncAdapterService extends SyncAdapterService {
|
||||
updateLocalAddressBooks(contactsProvider, account);
|
||||
|
||||
AccountManager accountManager = AccountManager.get(getContext());
|
||||
for (Account addressBookAccount : accountManager.getAccountsByType(getContext().getString(R.string.account_type_address_book))) {
|
||||
for (Account addressBookAccount : accountManager.getAccountsByType(App.getAddressBookAccountType())) {
|
||||
App.log.log(Level.INFO, "Running sync for address book", addressBookAccount);
|
||||
Bundle syncExtras = new Bundle(extras);
|
||||
syncExtras.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true);
|
||||
|
@ -246,7 +246,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
try {
|
||||
AccountSettings settings = new AccountSettings(context, acct);
|
||||
report.append("Account: ").append(acct.name).append("\n" +
|
||||
" Address book sync. interval: ").append(syncStatus(settings, context.getString(R.string.address_books_authority))).append("\n" +
|
||||
" Address book sync. interval: ").append(syncStatus(settings, App.getAddressBooksAuthority())).append("\n" +
|
||||
" Calendar sync. interval: ").append(syncStatus(settings, CalendarContract.AUTHORITY)).append("\n" +
|
||||
" OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n" +
|
||||
" WiFi only: ").append(settings.getSyncWifiOnly());
|
||||
@ -259,7 +259,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
report.append(acct).append(" is invalid (unsupported settings version) or does not exist\n");
|
||||
}
|
||||
// address book accounts
|
||||
for (Account acct : accountManager.getAccountsByType(context.getString(R.string.account_type_address_book)))
|
||||
for (Account acct : accountManager.getAccountsByType(App.getAddressBookAccountType()))
|
||||
try {
|
||||
LocalAddressBook addressBook = new LocalAddressBook(context, acct, null);
|
||||
report.append("Address book account: ").append(acct.name).append("\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user