public class

MockContentResolver

extends ContentResolver
java.lang.Object
   ↳ android.content.ContentResolver
     ↳ android.test.mock.MockContentResolver

Class Overview

A mock ContentResolver class that isolates the test code from the real content system. All methods are non-functional and throw UnsupportedOperationException.

This only isolates the test code in ways that have proven useful so far. More should be added as they become a problem.

Summary

[Expand]
Inherited Constants
From class android.content.ContentResolver
Public Constructors
MockContentResolver()
Public Methods
void addProvider(String name, ContentProvider provider)
void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork)
Notify registered observers that a row was updated.
[Expand]
Inherited Methods
From class android.content.ContentResolver
From class java.lang.Object

Public Constructors

public MockContentResolver ()

Since: API Level 1

Public Methods

public void addProvider (String name, ContentProvider provider)

Since: API Level 1

public void notifyChange (Uri uri, ContentObserver observer, boolean syncToNetwork)

Since: API Level 1

Notify registered observers that a row was updated. To register, call registerContentObserver(). By default, CursorAdapter objects will get this notification.

Parameters
observer The observer that originated the change, may be null
syncToNetwork If true, attempt to sync the change to the network.