Implement a cancelation mechanism for queries.
Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object. The application
creates a CancelationSignal object and passes it as an argument
to the query. The cancelation signal can then be used to cancel
the query while it is executing.
If the cancelation signal is raised before the query is executed,
then it is immediately terminated.
Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
diff --git a/test-runner/src/android/test/mock/MockIContentProvider.java b/test-runner/src/android/test/mock/MockIContentProvider.java
index b7733a4..41bc27d 100644
--- a/test-runner/src/android/test/mock/MockIContentProvider.java
+++ b/test-runner/src/android/test/mock/MockIContentProvider.java
@@ -21,6 +21,7 @@
import android.content.ContentValues;
import android.content.EntityIterator;
import android.content.IContentProvider;
+import android.content.ICancelationSignal;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.net.Uri;
@@ -72,7 +73,7 @@
}
public Cursor query(Uri url, String[] projection, String selection, String[] selectionArgs,
- String sortOrder) {
+ String sortOrder, ICancelationSignal cancelationSignal) {
throw new UnsupportedOperationException("unimplemented mock method");
}
@@ -103,4 +104,9 @@
throws RemoteException, FileNotFoundException {
throw new UnsupportedOperationException("unimplemented mock method");
}
+
+ @Override
+ public ICancelationSignal createCancelationSignal() throws RemoteException {
+ throw new UnsupportedOperationException("unimplemented mock method");
+ }
}