diff options
Diffstat (limited to 'test-runner/android/test/mock/MockContentProvider.java')
-rw-r--r-- | test-runner/android/test/mock/MockContentProvider.java | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/test-runner/android/test/mock/MockContentProvider.java b/test-runner/android/test/mock/MockContentProvider.java index d04fc44..74f86d8 100644 --- a/test-runner/android/test/mock/MockContentProvider.java +++ b/test-runner/android/test/mock/MockContentProvider.java @@ -18,7 +18,11 @@ package android.test.mock; import android.content.ContentValues; import android.content.IContentProvider; -import android.content.ISyncAdapter; +import android.content.Entity; +import android.content.EntityIterator; +import android.content.ContentProviderResult; +import android.content.ContentProviderOperation; +import android.content.OperationApplicationException; import android.content.res.AssetFileDescriptor; import android.database.Cursor; import android.database.CursorWindow; @@ -30,6 +34,7 @@ import android.os.IBinder; import android.os.ParcelFileDescriptor; import java.io.FileNotFoundException; +import java.util.ArrayList; /** * Mock implementation of IContentProvider that does nothing. All methods are non-functional and @@ -48,6 +53,10 @@ public class MockContentProvider implements IContentProvider { return 0; } + public Uri insertEntity(Uri uri, Entity entities) throws RemoteException { + throw new UnsupportedOperationException("unimplemented mock method"); + } + @SuppressWarnings("unused") public IBulkCursor bulkQuery(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder, IContentObserver observer, @@ -62,11 +71,6 @@ public class MockContentProvider implements IContentProvider { } @SuppressWarnings("unused") - public ISyncAdapter getSyncAdapter() throws RemoteException { - throw new UnsupportedOperationException("unimplemented mock method"); - } - - @SuppressWarnings("unused") public String getType(Uri url) throws RemoteException { throw new UnsupportedOperationException("unimplemented mock method"); } @@ -87,19 +91,33 @@ public class MockContentProvider implements IContentProvider { throws FileNotFoundException { throw new UnsupportedOperationException("unimplemented mock method"); } - + + public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations) + throws RemoteException, OperationApplicationException { + throw new UnsupportedOperationException("unimplemented mock method"); + } + @SuppressWarnings("unused") public Cursor query(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder) throws RemoteException { throw new UnsupportedOperationException("unimplemented mock method"); } + public EntityIterator queryEntities(Uri url, String selection, String[] selectionArgs, + String sortOrder) throws RemoteException { + throw new UnsupportedOperationException("unimplemented mock method"); + } + @SuppressWarnings("unused") public int update(Uri url, ContentValues values, String selection, String[] selectionArgs) throws RemoteException { throw new UnsupportedOperationException("unimplemented mock method"); } + public int updateEntity(Uri uri, Entity entity) throws RemoteException { + throw new UnsupportedOperationException("unimplemented mock method"); + } + public IBinder asBinder() { throw new UnsupportedOperationException("unimplemented mock method"); } |