Skip to content
Commit 7d6fd4b8 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Expand ContentProviderOperation to support call().

ContentProviderOperation has long supported basic operations like
insert(), update(), and delete(), but it was never extended to
support the general-purpose call() method.

This change adds support for call(), including configuration of the
extras Bundle using back-references to other operations.  In
addition, the output Bundle from call() can be used for
back-references from other operations.

Clean up how back-references are handled internally; we now store
either a literal value in each slot, or an explicit BackReference
instance which we can "instanceof" check to resolve when needed.

Also add withExceptionAllowed() capability, which can be used to
catch and report the failure of a single operation while allowing
any subsequent operations to proceed.  Adds various nullability
annotations to reflect the behavior of all existing logic.

Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1744bf8fc1ad048aa96460d487c2867c4c81d7b3
parent 6304d7b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment