Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Javadocs for ShadowContentResolver #8879

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -794,16 +794,20 @@ public static Status getStatus(Account account, String authority, boolean create

/**
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}
* android.content.ContentResolver#acquireContentProviderClient}. Instead, use
* {@link org.robolectric.Robolectric#setupContentProvider(Class, String)} to
* install a test-specific ContentProvider that can return any Cursor.
*/
@Deprecated
public void setCursor(BaseCursor cursor) {
this.cursor = cursor;
}

/**
* @deprecated This method does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}. Instead, use
* {@link org.robolectric.Robolectric#setupContentProvider(Class, String)} to
* install a test-specific ContentProvider that can return any Cursor.
*/
@Deprecated
public void setCursor(Uri uri, BaseCursor cursorForUri) {
Expand All @@ -812,7 +816,9 @@ public void setCursor(Uri uri, BaseCursor cursorForUri) {

/**
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}
* android.content.ContentResolver#acquireContentProviderClient}. Instead, use
* {@link org.robolectric.Robolectric#setupContentProvider(Class, String)} to
* install a test-specific ContentProvider that can return any Cursor.
*/
@Deprecated
@SuppressWarnings({"unused", "WeakerAccess"})
Expand All @@ -825,8 +831,10 @@ public void setNextDatabaseIdForInserts(int nextId) {
* DeleteStatement}s invoked on this {@link ContentResolver}.
*
* @return a list of statements
* @deprecated This method does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}. Instead, use
* {@link org.robolectric.Robolectric#setupContentProvider(Class, String)} to
* install a test-specific ContentProvider that has logic to keep a record of statements.
*/
@Deprecated
@SuppressWarnings({"unused", "WeakerAccess"})
Expand All @@ -840,8 +848,10 @@ public List<Statement> getStatements() {
* ContentValues[])}.
*
* @return a list of insert statements
* @deprecated This method does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}. Instead, use
* {@link org.robolectric.Robolectric#setupContentProvider(Class, String)} to
* install a test-specific ContentProvider that can record insert statements.
*/
@Deprecated
@SuppressWarnings({"unused", "WeakerAccess"})
Expand All @@ -854,8 +864,10 @@ public List<InsertStatement> getInsertStatements() {
* ContentResolver#update(Uri, ContentValues, String, String[])}.
*
* @return a list of update statements
* @deprecated This method does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}. Instead, use
* {@link org.robolectric.Robolectric#setupContentProvider(Class, String)} to
* install a test-specific ContentProvider that can record update statements.
*/
@Deprecated
@SuppressWarnings({"unused", "WeakerAccess"})
Expand Down Expand Up @@ -885,12 +897,30 @@ public List<DeleteStatement> getDeleteStatements() {
return deleteStatements;
}


/**
* Returns the list of {@link NotifiedUri}s for corresponding calls to {@link
* ContentResolver#notifyChange(Uri, ContentObserver)}.
*
* @return a list of notified URIs
shashankiitbhu marked this conversation as resolved.
Show resolved Hide resolved
* @deprecated This method affects all calls, and does not work with {@link
* android.content.ContentResolver#acquireContentProviderClient}.
*/
@Deprecated
@SuppressWarnings({"unused", "WeakerAccess"})
public List<NotifiedUri> getNotifiedUris() {
return notifiedUris;
}


/**
* Returns the list of {@link ContentProviderOperation}s for corresponding calls to {@link
* ContentResolver#applyBatch(String, ArrayList)}.
*
* @return a list of content provider operations
* @deprecated This method affects all calls, and does not work with {@link
shashankiitbhu marked this conversation as resolved.
Show resolved Hide resolved
* android.content.ContentResolver#acquireContentProviderClient}.
*/
shashankiitbhu marked this conversation as resolved.
Show resolved Hide resolved
@Deprecated
public List<ContentProviderOperation> getContentProviderOperations(String authority) {
List<ContentProviderOperation> operations = contentProviderOperations.get(authority);
Expand Down