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
7 files changed