Included changes:
* 1be54dc: Minor fix for where we set version in schema.
* 5c8a15d: Clean up deprecated methods after dogfood transition.
* 53407e5: Upstream fixes to storage info tests.
Bug: 182620003
Bug: 182909475
Bug: 181887768
Bug: 183395357
Test: Presubmit
Change-Id: Ie918c6c337c3943bc56909dc09eb75287a275487
Since there are some AppSearch callers from system_server, we don't want
to throw.
Bug: 183986767
Test: presubmit
Change-Id: I4ee3640a71f2f0bc2758a0fb41667c55ef13296c
This retrieves storage info for a certain package and database.
Bug: 182909475
Test: atest -m -c --rebuild-module-info CtsAppSearchTestCases
FrameworksCoreTests: android.app.appsearch
FrameworksServicesTests: com.android.server.appsearch
Change-Id: I524e0b2ada919981f50722f01ecd3f62b2ae4f43
These methods were only available for dogfooder transition.
None of these methods shipped in a stable SDK.
Bug: 181887768
Bug: 183395357
Test: Build, presubmit
Change-Id: I74feebd2721208c97475df9b74f734a17a41d5e2
The advice to add a second executor is based on API council guidance,
who do not recommend reusing the callback executor.
The executor is not yet used but will be used once schema migration is
implemented in framework.
Bug: 183177268
Test: Builds
Change-Id: Ic6735e696bc868884adffddd1433a198a005cad6
Changes included:
* 4d36ab: Rename AppSearchSession in test message to avoid export bug.
* 0b2126: Update AppSearch to be in sync google3 update ag/13878956.
* e79e74: Add getRankingSignal method to SearchResult.
* 2c2383: Add a getNamespaces() API.
* 712009: Add getStorageInfo API.
* 81e601: Add resut grouping flags and limits.
* f23105: Support usage reporting by the system in AppSearchImpl.
* 05b7d3: Change schema version from per AppSearchSchema to overall.
* effe02: Support schema migration to another type.
* a0db44: Some minor fix for GetSchemaResponse
* 66a1c3: Support AppSearchResult to convert a failure result to another type.
Bug: 177266929
Bug: 182620003
Bug: 183031844
Bug: 180429302
Bug: 182909475
Bug: 179160886
Bug: 183042276
Bug: 181179404
Test: Presubmit
Change-Id: I091b25a78093d0c8c193903a58122d09788e31ff
There is a tiny gap between user unlock and when the unlock event
reaches AppSearch. The fact that unlock event haven't reach AppSearch
isn't suffice to say user is not unlocked. This CL added the logic to
check with UM when cache misses.
Bug: 151359749
Test: manual
Change-Id: I49f0754d53fc4d391245917bb35b726a305e4e30
Changes included:
* 517c1ee: Schema Migration API updates to match API council recommendations.
* 407144d: Refactor some migration helper methods to Utils class.
* 2297b3a: Add a test for migrate to a nonexistent schema.
* 16a38d0: Log the PutDocumentStats in AppSearchImpl
Bug: 178060626
Bug: 179804862
Bug: 173532925
Test: Presubmit
Change-Id: I8b879bc9a5f30f9be3ce08d07dc60f4b177fb11b
User could never call an uninitialized SearchSession, so convert and
propagate the initialize error in getAppSearchImpl to user
for every call is unnecessary.
Test: presubmit
Bug: 162450968
Change-Id: Ie2b3c7c0a56852d7e517c616960c19b7b9e9ad35
Changes included:
* bdc86ce: Remove parameters from javadocs for methods that differ in framework.
* c8e1f21: Add logger interface for AppSearch
* 1de2a5a: Remove parameters from javadocs for methods that differ in framework.
Bug: 173532925
Test: Presubmit
Change-Id: Ia27d60be83b6ac3a6ad53ceb9bda58d5bd91bcb7
This switches away from the package-private hasSchemaTypeLocked method
that is only package-private because VisibilityStore uses it. Instead,
use the publicly-supported getSchema API. Using getSchema will be less
efficient than hasSchemaTypeLocked, but it should only be called once
during initialization so it won't be reoccuring.
The change to remove hasSchemaTypeLocked from AppSearchImpl will be
made upstream in go/ag/13556686
Bug: 180058203
Test: presubmit
Change-Id: I2bafb8243bb15f321633eae5ed37676201e98c84
Changes included:
* 1fc8203: Add getAll() API to AppSearchBatchResult as recommended by API council
* aa94928: Updates to Query Documentation
* 63badf5: Create flavours of all Session tests to run against both backends.
* 03e917e: Move the decision to optimize out of AppSearchImpl.
* 4909a2f: Make AppSearchImpl closeable.
* 3ebce41: Fix and enforce MixedMutabilityReturnType errorprone warnings
* 6994b7e: Update documentation for GetByUri
* 4f632ca: Preinitialize map to proper size.
* efeb70b: Update documentation for RemoveByUriRequest
* daecb8a: Refactor SetSchemaResponse to merge SetSchemaResult
* 2682de4: SetSchemaResponse will be only returned in successful case.
* f0f0ec4: Update documentation for GenericDocument
Bug: 178060626
Bug: 179416188
Bug: 175763859
Bug: 175801531
Bug: 162450968
Bug: 179407490
Bug: 171758893
Test: Presubmit
Change-Id: I3937e877a84b6255a5ca0fd343a3de28ebaea174
Now that the visibility APIs are exposed, we can properly @link to the
methods in the documentation.
Bug: 169883602
Test: presubmit
Change-Id: Ic5e9cb5f4279077cae72a566a631163ca7dd7264
* Synchronize access to unlocked user cache. The cache will be checked
for each API call. Add synchronization blocks when reading/writing to
it.
* Synchronize and remove double locking for access to static array of
AppSearchImpl instances.
Bug: 179406838
Test: atest -m -c --rebuild-module-info CtsAppSearchTestCases
FrameworksCoreTests: android.app.appsearch
FrameworksServicesTests: com.android.server.appsearch
Change-Id: Ibaf0d6ff07b4e2f15f3479ff56e143a34ce453e3
IcingSearchEngine used to enforce that nested documents had to have a
non-empty uri. This decision was relaxed to allow for empty uris
upstream already. Remove the "placeholder" that we used to temporarily
work around this. This shouldn't affect any visibility settings for
clients since we don't actually retrieve or check what the nested
document's uri is.
Bug: 169883602
Test: presubmit
Change-Id: Ia99d5500801ca275242814bbe8086591267e8d89
Bug where we weren't passing the PackageIdentifiers from the
SetSchemaRequest properly.
Bug: 179416188
Test: atest -m -c --rebuild-module-info CtsAppSearchTestCases
Change-Id: Ie51a27a728ae7a2f25960ab47ee4054a56ed6abe