summaryrefslogtreecommitdiff
path: root/core/java/android/content/ContentProviderResult.java
Commit message (Collapse)AuthorAgeFilesLines
* Apply fixes for EfficientStrings.Jeff Sharkey2020-10-201-4/+4
| | | | | | | | | | Refactoring to avoid paying the cost of extra StringBuilder that are quickly disposed. Bug: 170978902 Test: none Exempt-From-Owner-Approval: trivial refactoring Change-Id: Icd914a63cdadf8123c1e5a5073f85245f0791f0b
* Respond to API council feedback.Jeff Sharkey2020-01-081-4/+4
| | | | | | | | | | Adjust Exception to more general Throwable, and add docs for new ContentResolver and ContentProvider overloads. Also add docs for default state of strict query options. Bug: 131598520, 141227540, 147287177 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: Icb0153b8c8a352db39de301074e948bfaa676ddb
* Expand ContentProviderOperation to support call().Jeff Sharkey2019-08-081-19/+42
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add nullability annotations for current behavior.Jeff Sharkey2019-08-081-5/+7
| | | | | | | | | | No behavior changes. This paves the way for a future CL that is will be adding a handful of new APIs. Bug: 131598520 Test: atest android.content.cts.ContentProviderOperationTest Test: atest android.content.cts.ContentProviderResultTest Change-Id: I1a6f53e79009ba88b13844a6c8ca8c09e33ee5b2
* Allow failures of applyBatch() operations.Jeff Sharkey2019-04-151-15/+60
| | | | | | | | | | | | | | | In some cases, the supplier of ContentProviderOperation is okay if certain operations fail, and they'd like ContentProviderResult to tell them about the failures instead of aborting the remainder of the transaction. Start using this for ModernMediaScanner, where we probably raced with someone when building an UPSERT-style operation. We'll pick up any changes to those files during the next scan. Bug: 128494336 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: Ida8230ff2bbb3bab56eb83928e49e7097bfbc9fd
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Resolving resources across users.Nicolas Prevot2014-05-131-1/+9
| | | | | | | | | | When an intent is sent to another profile: For content uris contained in this intent: The userId of the source user is added to the userInfo part. The ActivityManagerService has been modified to resolve resources in the user specified by the uri. The user id to which the uri belongs to is stored in the UriPermission. Change-Id: I43dc76895aba692bf148d276253aeaf9c75fce34
* - create a new generic ISyncAdapter implementation, SyncAdapterNewFred Quintana2009-06-011-0/+7
| | | | | | - change the applyBatch to take an ArrayList rather than an [] - change Entity to be a final flass that contains ContentValues - remove the ability to update/insert Entities by a ContentProviderOperation
* add ipc support to batchingFred Quintana2009-05-221-1/+39
|
* enhance ContentProvider with the ability to perform batch operationsFred Quintana2009-05-151-0/+39