From 04e25cdef3d1c6ca3ac0397aa5c5349e77f9bdf2 Mon Sep 17 00:00:00 2001 From: Yuri Volkov Date: Sun, 15 Sep 2019 13:01:33 +0300 Subject: [PATCH] #308 Catch exception on possibly incompatible Samsung tasks version (in Galaxy S3) --- .../todoagenda/task/samsung/SamsungTasksProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/andstatus/todoagenda/task/samsung/SamsungTasksProvider.java b/app/src/main/java/org/andstatus/todoagenda/task/samsung/SamsungTasksProvider.java index 1460bfdc..56b1ea01 100644 --- a/app/src/main/java/org/andstatus/todoagenda/task/samsung/SamsungTasksProvider.java +++ b/app/src/main/java/org/andstatus/todoagenda/task/samsung/SamsungTasksProvider.java @@ -7,6 +7,7 @@ import android.net.Uri; import android.provider.CalendarContract; import android.text.TextUtils; +import android.util.Log; import org.andstatus.todoagenda.R; import org.andstatus.todoagenda.prefs.EventSource; @@ -130,6 +131,9 @@ public Collection fetchAvailableSources() { Cursor cursor; try { cursor = context.getContentResolver().query(SamsungTasksContract.TaskLists.PROVIDER_URI, projection, null, null, null); + } catch (android.database.sqlite.SQLiteException e) { + Log.i(SamsungTasksProvider.class.getSimpleName(), "fetchAvailableSources: " + e.getMessage()); + cursor = null; } catch (IllegalArgumentException e) { cursor = null; }