From 3e2459c85cadcc0b942636b444726db46df28acc Mon Sep 17 00:00:00 2001 From: Ricki Hirner Date: Tue, 20 Oct 2015 12:04:31 +0200 Subject: [PATCH] 2 bug fixes * ical4android: enumerate (=synchronize) all task lists and not only the first one * fix crash bugs when activating external logging without external storage --- .../davdroid/syncadapter/TasksSyncAdapterService.java | 2 +- .../at/bitfire/davdroid/ui/settings/AccountFragment.java | 8 +++++++- app/src/main/res/values/strings.xml | 1 + ical4android | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/at/bitfire/davdroid/syncadapter/TasksSyncAdapterService.java b/app/src/main/java/at/bitfire/davdroid/syncadapter/TasksSyncAdapterService.java index 88a07a0a..ad6c5b72 100644 --- a/app/src/main/java/at/bitfire/davdroid/syncadapter/TasksSyncAdapterService.java +++ b/app/src/main/java/at/bitfire/davdroid/syncadapter/TasksSyncAdapterService.java @@ -66,7 +66,7 @@ public class TasksSyncAdapterService extends Service { Constants.log.error("Couldn't enumerate local task lists", e); } - Constants.log.info("Calendar sync complete"); + Constants.log.info("Task sync complete"); } } diff --git a/app/src/main/java/at/bitfire/davdroid/ui/settings/AccountFragment.java b/app/src/main/java/at/bitfire/davdroid/ui/settings/AccountFragment.java index 9765ef26..cfd2bd2a 100644 --- a/app/src/main/java/at/bitfire/davdroid/ui/settings/AccountFragment.java +++ b/app/src/main/java/at/bitfire/davdroid/ui/settings/AccountFragment.java @@ -21,6 +21,8 @@ import android.preference.SwitchPreference; import android.provider.CalendarContract; import android.provider.ContactsContract; +import java.io.File; + import at.bitfire.davdroid.R; import at.bitfire.davdroid.log.ExternalFileLogger; import at.bitfire.davdroid.syncadapter.AccountSettings; @@ -141,7 +143,11 @@ public class AccountFragment extends PreferenceFragment { final SwitchPreference prefLogExternalFile = (SwitchPreference)findPreference("log_external_file"); prefLogExternalFile.setChecked(settings.logToExternalFile()); - prefLogExternalFile.setSummaryOn(getString(R.string.settings_log_to_external_file_on, ExternalFileLogger.getDirectory(getActivity()).getPath())); + File logDirectory = ExternalFileLogger.getDirectory(getActivity()); + prefLogExternalFile.setSummaryOn(logDirectory != null ? + getString(R.string.settings_log_to_external_file_on, logDirectory.getPath()) : + getString(R.string.settings_log_to_external_file_no_external_storage) + ); prefLogExternalFile.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b25e8e3b..7c9083c2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -141,6 +141,7 @@ Log to external file External log files will contain private data and be accessible by other apps. Turn off external logging and delete the log files after use. Logs are written to %s (if possible) + External storage is not available Logs are written to ADB Verbose logging Log synchronization information and network traffic diff --git a/ical4android b/ical4android index 3142ae4a..51c5bf43 160000 --- a/ical4android +++ b/ical4android @@ -1 +1 @@ -Subproject commit 3142ae4a02348640cd5b184d1fb931d204f6bc5d +Subproject commit 51c5bf4343a8dcc5ff0ce40b59a58ad0fdde2e67