OSDN Git Service

Allow failures of applyBatch() operations.
authorJeff Sharkey <jsharkey@android.com>
Tue, 16 Apr 2019 00:54:58 +0000 (18:54 -0600)
committerJeff Sharkey <jsharkey@android.com>
Tue, 16 Apr 2019 00:55:00 +0000 (18:55 -0600)
commit295ddbae78e2719964fcb2c17a166affecf7354a
treecae971f5e1b4b35c6fefe1c18d58b3b0d81b9f2e
parenteb24d06f8d88e2914c747bcd65996ffbfd28bfc2
Allow failures of applyBatch() operations.

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
core/java/android/content/ContentProviderOperation.java
core/java/android/content/ContentProviderResult.java