public final class

InternalUseOnlyFilesContentProvider

extends ContentProvider
java.lang.Object
   ↳ android.content.ContentProvider
     ↳ androidx.test.services.storage.provider.InternalUseOnlyFilesContentProvider

Class Overview

Hosts an SD Card directory for the test framework to read/write internal files to.

Summary

[Expand]
Inherited Constants
From interface android.content.ComponentCallbacks2
Public Constructors
InternalUseOnlyFilesContentProvider()
Public Methods
int delete(Uri uri, String selection, String[] selectionArgs)
String getType(Uri uri)
Uri insert(Uri uri, ContentValues contentValues)
boolean onCreate()
ParcelFileDescriptor openFile(Uri uri, String mode)
Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
void shutdown()
int update(Uri uri, ContentValues values, String selection, String[] selectionArgs)
Protected Methods
boolean onCreateHook()
Called during onCreate().
[Expand]
Inherited Methods
From class android.content.ContentProvider
From class java.lang.Object
From interface android.content.ComponentCallbacks2
From interface android.content.ComponentCallbacks

Public Constructors

public InternalUseOnlyFilesContentProvider ()

Public Methods

public int delete (Uri uri, String selection, String[] selectionArgs)

Parameters
uri Uri
selection String
selectionArgs String
Returns
int

public String getType (Uri uri)

Parameters
uri Uri
Returns
String

public Uri insert (Uri uri, ContentValues contentValues)

Parameters
uri Uri
contentValues ContentValues
Returns
Uri

public boolean onCreate ()

Returns
boolean

public ParcelFileDescriptor openFile (Uri uri, String mode)

Parameters
uri Uri
mode String
Returns
ParcelFileDescriptor
Throws
FileNotFoundException

public Cursor query (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

Parameters
uri Uri
projection String
selection String
selectionArgs String
sortOrder String
Returns
Cursor

public void shutdown ()

public int update (Uri uri, ContentValues values, String selection, String[] selectionArgs)

Parameters
uri Uri
values ContentValues
selection String
selectionArgs String
Returns
int

Protected Methods

protected boolean onCreateHook ()

Called during onCreate(). Subclasses should return true if they are ready to serve data and false if there is something wrong accessing their data. Such as the sdcard not being mounted.

Returns
boolean