mirror of
https://github.com/etesync/android
synced 2025-02-22 12:32:03 +00:00
Improve logging in syncmanager and import.
This commit is contained in:
parent
8d660e376a
commit
bc829d0d1e
@ -129,6 +129,7 @@ constructor(protected val context: Context, protected val account: Account, prot
|
||||
syncPhase = R.string.sync_phase_prepare_local
|
||||
Logger.log.info("Sync phase: " + context.getString(syncPhase))
|
||||
prepareLocal()
|
||||
Logger.log.info("Locally changed: (dirty=${localDirty.size} deleted=${localDeleted?.size}")
|
||||
|
||||
do {
|
||||
if (Thread.interrupted())
|
||||
|
@ -93,6 +93,7 @@ class ImportFragment : DialogFragment() {
|
||||
private fun setDialogAddEntries(dialog: ProgressDialog, length: Int) {
|
||||
dialog.max = length
|
||||
dialog.setMessage(getString(R.string.import_dialog_adding_entries))
|
||||
Logger.log.info("Adding entries. Total: ${length}")
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
@ -144,7 +145,7 @@ class ImportFragment : DialogFragment() {
|
||||
if (data != null) {
|
||||
// Get the URI of the selected file
|
||||
val uri = data.data!!
|
||||
Logger.log.info("Importing uri = ${uri}")
|
||||
Logger.log.info("Starting import into ${info.uid} from file ${uri}")
|
||||
try {
|
||||
inputStream = activity!!.contentResolver.openInputStream(uri)
|
||||
|
||||
@ -172,6 +173,8 @@ class ImportFragment : DialogFragment() {
|
||||
fun loadFinished(data: ImportResult) {
|
||||
(activity as ResultFragment.OnImportCallback).onImportResult(data)
|
||||
|
||||
Logger.log.info("Finished import")
|
||||
|
||||
dismissAllowingStateLoss()
|
||||
|
||||
if (activity is Refreshable) {
|
||||
|
Loading…
Reference in New Issue
Block a user