Package org.robolectric.shadows
Class ShadowContentProviderClient
java.lang.Object
org.robolectric.shadows.ShadowContentProviderClient
@Implements(android.content.ContentProviderClient.class) public class ShadowContentProviderClient extends Object
-
Constructor Summary
Constructors Constructor Description ShadowContentProviderClient()
-
Method Summary
Modifier and Type Method Description protected ContentProviderResult[]
applyBatch(ArrayList<ContentProviderOperation> operations)
protected int
bulkInsert(Uri url, ContentValues[] initialValues)
protected Bundle
call(String method, String arg, Bundle extras)
protected int
delete(Uri url, String selection, String[] selectionArgs)
protected ContentProvider
getLocalContentProvider()
protected String[]
getStreamTypes(Uri uri, String mimeTypeFilter)
protected String
getType(Uri uri)
protected Uri
insert(Uri url, ContentValues initialValues)
boolean
isReleased()
boolean
isStable()
protected AssetFileDescriptor
openAssetFile(Uri url, String mode)
protected ParcelFileDescriptor
openFile(Uri url, String mode)
protected AssetFileDescriptor
openTypedAssetFileDescriptor(Uri uri, String mimeType, Bundle opts)
protected Cursor
query(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder)
protected Cursor
query(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)
protected boolean
release()
protected int
update(Uri url, ContentValues values, String selection, String[] selectionArgs)
-
Constructor Details
-
ShadowContentProviderClient
public ShadowContentProviderClient()
-
-
Method Details
-
call
@Implementation(minSdk=17) protected Bundle call(String method, String arg, Bundle extras) throws RemoteException- Throws:
RemoteException
-
getType
- Throws:
RemoteException
-
getStreamTypes
-
query
@Implementation protected Cursor query(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder) throws RemoteException- Throws:
RemoteException
-
query
@Implementation protected Cursor query(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal) throws RemoteException- Throws:
RemoteException
-
insert
- Throws:
RemoteException
-
bulkInsert
@Implementation protected int bulkInsert(Uri url, ContentValues[] initialValues) throws RemoteException- Throws:
RemoteException
-
delete
@Implementation protected int delete(Uri url, String selection, String[] selectionArgs) throws RemoteException- Throws:
RemoteException
-
update
@Implementation protected int update(Uri url, ContentValues values, String selection, String[] selectionArgs) throws RemoteException- Throws:
RemoteException
-
openFile
@Implementation protected ParcelFileDescriptor openFile(Uri url, String mode) throws RemoteException, FileNotFoundException- Throws:
RemoteException
FileNotFoundException
-
openAssetFile
@Implementation protected AssetFileDescriptor openAssetFile(Uri url, String mode) throws RemoteException, FileNotFoundException- Throws:
RemoteException
FileNotFoundException
-
openTypedAssetFileDescriptor
@Implementation protected final AssetFileDescriptor openTypedAssetFileDescriptor(Uri uri, String mimeType, Bundle opts) throws RemoteException, FileNotFoundException- Throws:
RemoteException
FileNotFoundException
-
applyBatch
@Implementation protected ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations) throws RemoteException, OperationApplicationException -
release
-
getLocalContentProvider
-
isStable
public boolean isStable() -
isReleased
public boolean isReleased()
-