Search in sources :

Example 1 with TestCursor

use of org.robolectric.tester.android.database.TestCursor in project wire-android by wireapp.

the class ShadowContentResolver2 method query.

@Implementation
public final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
    ContentProvider provider = getProvider(uri);
    if (provider != null) {
        return provider.query(uri, projection, selection, selectionArgs, sortOrder);
    } else {
        TestCursor returnCursor = getCursor(uri);
        if (returnCursor == null) {
            return null;
        }
        returnCursor.setQuery(uri, projection, selection, selectionArgs, sortOrder);
        return returnCursor;
    }
}
Also used : TestCursor(org.robolectric.tester.android.database.TestCursor) ContentProvider(android.content.ContentProvider) Implementation(org.robolectric.annotation.Implementation)

Aggregations

ContentProvider (android.content.ContentProvider)1 Implementation (org.robolectric.annotation.Implementation)1 TestCursor (org.robolectric.tester.android.database.TestCursor)1