Skip to content

Commit

Permalink
plusonelabs#308 Catch exception on possibly incompatible Samsung task…
Browse files Browse the repository at this point in the history
…s version (in Galaxy S3)
  • Loading branch information
yvolk committed Sep 15, 2019
1 parent 7f94634 commit 04e25cd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -130,6 +131,9 @@ public Collection<EventSource> 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;
}
Expand Down

0 comments on commit 04e25cd

Please sign in to comment.