diff options
| author | Fred Quintana <fredq@google.com> | 2009-12-09 16:00:31 -0800 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-12-10 10:37:52 -0800 |
| commit | 2ec6c5699181316e5a5c2cd293c006ac4a8bb101 (patch) | |
| tree | 5dffd05ec1b6cd3630bef911631ef2150904088a /core/java/android/content/AsyncQueryHandler.java | |
| parent | 8415afdb706c94cc297195a0dd5b5a62726d66e4 (diff) | |
am 328c0e79: - removed the concept of Entity from the ContentProvider APIs - removed the parcelling ability from Entity and EntityIterator and made them public - added an EntityIterator abstract implementation that allow easy wrapping of a Cursor - changed the VCard c
Merge commit '328c0e7986aa6bb7752ec6de3da9c999920bb55f' into eclair-mr2-plus-aosp
* commit '328c0e7986aa6bb7752ec6de3da9c999920bb55f':
- removed the concept of Entity from the ContentProvider APIs
Diffstat (limited to 'core/java/android/content/AsyncQueryHandler.java')
| -rw-r--r-- | core/java/android/content/AsyncQueryHandler.java | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/core/java/android/content/AsyncQueryHandler.java b/core/java/android/content/AsyncQueryHandler.java index 0a4a804a52dc..882879bdfadf 100644 --- a/core/java/android/content/AsyncQueryHandler.java +++ b/core/java/android/content/AsyncQueryHandler.java @@ -38,7 +38,6 @@ public abstract class AsyncQueryHandler extends Handler { private static final int EVENT_ARG_INSERT = 2; private static final int EVENT_ARG_UPDATE = 3; private static final int EVENT_ARG_DELETE = 4; - private static final int EVENT_ARG_QUERY_ENTITIES = 5; /* package */ final WeakReference<ContentResolver> mResolver; @@ -93,18 +92,6 @@ public abstract class AsyncQueryHandler extends Handler { args.result = cursor; break; - case EVENT_ARG_QUERY_ENTITIES: - EntityIterator iterator = null; - try { - iterator = resolver.queryEntities(args.uri, args.selection, - args.selectionArgs, args.orderBy); - } catch (Exception e) { - Log.w(TAG, e.toString()); - } - - args.result = iterator; - break; - case EVENT_ARG_INSERT: args.result = resolver.insert(args.uri, args.values); break; @@ -195,45 +182,6 @@ public abstract class AsyncQueryHandler extends Handler { } /** - * This method begins an asynchronous query for an {@link EntityIterator}. - * When the query is done {@link #onQueryEntitiesComplete} is called. - * - * @param token A token passed into {@link #onQueryComplete} to identify the - * query. - * @param cookie An object that gets passed into {@link #onQueryComplete} - * @param uri The URI, using the content:// scheme, for the content to - * retrieve. - * @param selection A filter declaring which rows to return, formatted as an - * SQL WHERE clause (excluding the WHERE itself). Passing null - * will return all rows for the given URI. - * @param selectionArgs You may include ?s in selection, which will be - * replaced by the values from selectionArgs, in the order that - * they appear in the selection. The values will be bound as - * Strings. - * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause - * (excluding the ORDER BY itself). Passing null will use the - * default sort order, which may be unordered. - * @hide - */ - public void startQueryEntities(int token, Object cookie, Uri uri, String selection, - String[] selectionArgs, String orderBy) { - // Use the token as what so cancelOperations works properly - Message msg = mWorkerThreadHandler.obtainMessage(token); - msg.arg1 = EVENT_ARG_QUERY_ENTITIES; - - WorkerArgs args = new WorkerArgs(); - args.handler = this; - args.uri = uri; - args.selection = selection; - args.selectionArgs = selectionArgs; - args.orderBy = orderBy; - args.cookie = cookie; - msg.obj = args; - - mWorkerThreadHandler.sendMessage(msg); - } - - /** * Attempts to cancel operation that has not already started. Note that * there is no guarantee that the operation will be canceled. They still may * result in a call to on[Query/Insert/Update/Delete]Complete after this @@ -340,18 +288,6 @@ public abstract class AsyncQueryHandler extends Handler { } /** - * Called when an asynchronous query is completed. - * - * @param token The token to identify the query. - * @param cookie The cookie object. - * @param iterator The iterator holding the query results. - * @hide - */ - protected void onQueryEntitiesComplete(int token, Object cookie, EntityIterator iterator) { - // Empty - } - - /** * Called when an asynchronous insert is completed. * * @param token the token to identify the query, passed in from @@ -408,10 +344,6 @@ public abstract class AsyncQueryHandler extends Handler { onQueryComplete(token, args.cookie, (Cursor) args.result); break; - case EVENT_ARG_QUERY_ENTITIES: - onQueryEntitiesComplete(token, args.cookie, (EntityIterator)args.result); - break; - case EVENT_ARG_INSERT: onInsertComplete(token, args.cookie, (Uri) args.result); break; |
