We all know that ContentResolver queries shouldn't be executed on UI thread, but, surprisingly, I can't find information about thread-safety of ContentResolver class in the official docs.
I know how to write thread-safe ContentProvider, and I know that SQLite is thread safe by default (it implements internal locking mechanism).
But, is it safe to use a single instance of ContentResolver from multiple threads (e.g. two treads call insert() or query() on the same object in parallel)?
ContentProviderbacked by SQLite are thread safe. However, my question concernsContentResolverand notContentProvider- isContentResolverobjects returned bygetContentResolver()calls are thread safe. While these questions seem similar, they are really two completely different questions. - Vasiliy