Commit d5f37330 authored by Ricki Hirner's avatar Ricki Hirner

Handle exceptions when acquiring task provider

parent 01ccf016
...@@ -45,7 +45,11 @@ abstract class AndroidTaskList<out T: AndroidTask>( ...@@ -45,7 +45,11 @@ abstract class AndroidTaskList<out T: AndroidTask>(
TaskProvider.ProviderName.OpenTasks TaskProvider.ProviderName.OpenTasks
) )
for (name in byPriority) for (name in byPriority)
TaskProvider.acquire(context, name)?.let { return it } try {
TaskProvider.acquire(context, name)?.let { return it }
} catch (e: Exception) {
// couldn't acquire task provider
}
return null return null
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment