Skip to content

Commit 21cef43

Browse files
author
Android Code Review
committed
Merge change 10027
* changes: Fixed Issue 2682: ContentProvider query() SDK docs deprecated
2 parents 723c9a4 + 9f9cdcf commit 21cef43

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

core/java/android/content/ContentProvider.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,10 @@ public void onLowMemory() {
289289
* Example client call:<p>
290290
* <pre>// Request a specific record.
291291
* Cursor managedCursor = managedQuery(
292-
Contacts.People.CONTENT_URI.addId(2),
292+
ContentUris.withAppendedId(Contacts.People.CONTENT_URI, 2),
293293
projection, // Which columns to return.
294294
null, // WHERE clause.
295+
null, // WHERE clause value substitution
295296
People.NAME + " ASC"); // Sort order.</pre>
296297
* Example implementation:<p>
297298
* <pre>// SQLiteQueryBuilder is a helper class that creates the
@@ -320,15 +321,18 @@ public void onLowMemory() {
320321
return c;</pre>
321322
*
322323
* @param uri The URI to query. This will be the full URI sent by the client;
323-
* if the client is requesting a specific record, the URI will end in a record number
324-
* that the implementation should parse and add to a WHERE or HAVING clause, specifying
325-
* that _id value.
324+
* if the client is requesting a specific record, the URI will end in a record number
325+
* that the implementation should parse and add to a WHERE or HAVING clause, specifying
326+
* that _id value.
326327
* @param projection The list of columns to put into the cursor. If
327328
* null all columns are included.
328329
* @param selection A selection criteria to apply when filtering rows.
329330
* If null then all rows are included.
331+
* @param selectionArgs You may include ?s in selection, which will be replaced by
332+
* the values from selectionArgs, in order that they appear in the selection.
333+
* The values will be bound as Strings.
330334
* @param sortOrder How the rows in the cursor should be sorted.
331-
* If null then the provider is free to define the sort order.
335+
* If null then the provider is free to define the sort order.
332336
* @return a Cursor or null.
333337
*/
334338
public abstract Cursor query(Uri uri, String[] projection,

0 commit comments

Comments
 (0)