summaryrefslogtreecommitdiffstats
path: root/test-runner/src
diff options
context:
space:
mode:
Diffstat (limited to 'test-runner/src')
-rw-r--r--test-runner/src/android/test/mock/MockContentProvider.java18
-rw-r--r--test-runner/src/android/test/mock/MockIContentProvider.java8
2 files changed, 25 insertions, 1 deletions
diff --git a/test-runner/src/android/test/mock/MockContentProvider.java b/test-runner/src/android/test/mock/MockContentProvider.java
index 4078622..3fd71c8 100644
--- a/test-runner/src/android/test/mock/MockContentProvider.java
+++ b/test-runner/src/android/test/mock/MockContentProvider.java
@@ -32,6 +32,7 @@ import android.database.CursorWindow;
import android.database.IBulkCursor;
import android.database.IContentObserver;
import android.net.Uri;
+import android.os.Bundle;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -113,6 +114,15 @@ public class MockContentProvider extends ContentProvider {
return MockContentProvider.this.update(url, values, selection, selectionArgs);
}
+ /**
+ * @hide
+ */
+ @SuppressWarnings("unused")
+ public Bundle call(String method, String request, Bundle args)
+ throws RemoteException {
+ return MockContentProvider.this.call(method, request, args);
+ }
+
public IBinder asBinder() {
throw new UnsupportedOperationException();
}
@@ -205,6 +215,14 @@ public class MockContentProvider extends ContentProvider {
}
/**
+ * @hide
+ */
+ @Override
+ public Bundle call(String method, String request, Bundle args) {
+ throw new UnsupportedOperationException("unimplemented mock method call");
+ }
+
+ /**
* Returns IContentProvider which calls back same methods in this class.
* By overriding this class, we avoid the mechanism hidden behind ContentProvider
* (IPC, etc.)
diff --git a/test-runner/src/android/test/mock/MockIContentProvider.java b/test-runner/src/android/test/mock/MockIContentProvider.java
index 7c0a1e2..0be5bea 100644
--- a/test-runner/src/android/test/mock/MockIContentProvider.java
+++ b/test-runner/src/android/test/mock/MockIContentProvider.java
@@ -27,6 +27,7 @@ import android.database.CursorWindow;
import android.database.IBulkCursor;
import android.database.IContentObserver;
import android.net.Uri;
+import android.os.Bundle;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -38,7 +39,7 @@ import java.util.ArrayList;
* {@link java.lang.UnsupportedOperationException}. Tests can extend this class to
* implement behavior needed for tests.
*
- * @hide - @hide because this exposes bulkQuery(), which must also be hidden.
+ * @hide - @hide because this exposes bulkQuery() and call(), which must also be hidden.
*/
public class MockIContentProvider implements IContentProvider {
public int bulkInsert(Uri url, ContentValues[] initialValues) {
@@ -93,6 +94,11 @@ public class MockIContentProvider implements IContentProvider {
throw new UnsupportedOperationException("unimplemented mock method");
}
+ public Bundle call(String method, String request, Bundle args)
+ throws RemoteException {
+ throw new UnsupportedOperationException("unimplemented mock method");
+ }
+
public IBinder asBinder() {
throw new UnsupportedOperationException("unimplemented mock method");
}