1
0
mirror of https://github.com/etesync/android synced 2024-12-23 15:18:14 +00:00

Fix NPE in "is refreshing progress bar"

This commit is contained in:
Ricki Hirner 2016-10-07 12:22:54 +02:00
parent 68d48bb0f2
commit 2c5b93ce43
3 changed files with 5 additions and 3 deletions

View File

@ -74,10 +74,12 @@ dependencies {
compile 'com.github.yukuku:ambilwarna:2.0.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'dnsjava:dnsjava:2.1.7'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.apache.commons:commons-collections4:4.1'
provided 'org.projectlombok:lombok:1.16.10'
// for tests
testCompile 'junit:junit:4.12'
testCompile 'com.squareup.okhttp3:mockwebserver:3.4.1'

View File

@ -425,14 +425,14 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu
if (Services.SERVICE_CARDDAV.equals(service)) {
info.carddav = new AccountInfo.ServiceInfo();
info.carddav.id = id;
info.carddav.refreshing = davService.isRefreshing(id) || ContentResolver.isSyncActive(account, ContactsContract.AUTHORITY);
info.carddav.refreshing = (davService != null && davService.isRefreshing(id)) || ContentResolver.isSyncActive(account, ContactsContract.AUTHORITY);
info.carddav.hasHomeSets = hasHomeSets(db, id);
info.carddav.collections = readCollections(db, id);
} else if (Services.SERVICE_CALDAV.equals(service)) {
info.caldav = new AccountInfo.ServiceInfo();
info.caldav.id = id;
info.caldav.refreshing = davService.isRefreshing(id) ||
info.caldav.refreshing = (davService != null && davService.isRefreshing(id)) ||
ContentResolver.isSyncActive(account, CalendarContract.AUTHORITY) ||
ContentResolver.isSyncActive(account, TaskProvider.ProviderName.OpenTasks.authority);
info.caldav.hasHomeSets = hasHomeSets(db, id);

@ -1 +1 @@
Subproject commit 9a334f69c781be37bd26eca3f18734c5f6826a8e
Subproject commit 05065af8ef4a73f831b51bc7766af885cc4735d3