1
0
mirror of https://github.com/etesync/android synced 2025-01-25 15:10:55 +00:00

Fix account type and authority to use function and not string.

This commit is contained in:
Tom Hacohen 2017-04-26 17:29:29 +01:00
parent 26c0a62dc4
commit 861d5e4b4e
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ public class AddressBooksSyncAdapterService extends SyncAdapterService {
updateLocalAddressBooks(contactsProvider, account); updateLocalAddressBooks(contactsProvider, account);
AccountManager accountManager = AccountManager.get(getContext()); 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); App.log.log(Level.INFO, "Running sync for address book", addressBookAccount);
Bundle syncExtras = new Bundle(extras); Bundle syncExtras = new Bundle(extras);
syncExtras.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true); syncExtras.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true);

View File

@ -246,7 +246,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
try { try {
AccountSettings settings = new AccountSettings(context, acct); AccountSettings settings = new AccountSettings(context, acct);
report.append("Account: ").append(acct.name).append("\n" + 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" + " Calendar sync. interval: ").append(syncStatus(settings, CalendarContract.AUTHORITY)).append("\n" +
" OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n" + " OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n" +
" WiFi only: ").append(settings.getSyncWifiOnly()); " 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"); report.append(acct).append(" is invalid (unsupported settings version) or does not exist\n");
} }
// address book accounts // address book accounts
for (Account acct : accountManager.getAccountsByType(context.getString(R.string.account_type_address_book))) for (Account acct : accountManager.getAccountsByType(App.getAddressBookAccountType()))
try { try {
LocalAddressBook addressBook = new LocalAddressBook(context, acct, null); LocalAddressBook addressBook = new LocalAddressBook(context, acct, null);
report.append("Address book account: ").append(acct.name).append("\n" + report.append("Address book account: ").append(acct.name).append("\n" +