Included changes:
* 4c1b251: Sync AppSearch with google3 update ag/14342999 (8f8b43)
* cdf1913: Add a GenericDocument#toBuilder API.
* 64f80f3: Improve snippeting and matching per API feedback.
* 23dd35c: Move AppSearchEmail out of the prod tree into the test utils.
Bug: 171882200
Bug: 186520196
Bug: 186717514
Test: Presubmit
Change-Id: I9d8e1fb87e6e74c57a38f3a27cdd04a1a3ccf90b
The Receiver could receive ACTION_PACKAGE_FULLY_REMOVED and
ACTION_PACKAGE_DATA_CLEARED broadcast and clean the package data.
The CL has been reverted back since the receiver tries to write
to /data/system_ce/appSearch before user storage has been unlocked.
And this prevents encryption policy from being setup correctly.
Added check and only handle those actions if used is unlocked.
PatchSet 1 is the old version that has been reverted.
Bug: 145759910
Test: atest --rebuild-module-info CtsAppSearchHostTestCases
Test: atest StagedRollbackTest:com.android.tests.rollback.host.StagedRollbackTest#testRollbackDataPolicy -- --abi x86_64
Change-Id: I41dc0501ac227551ae9bf2c59f57accc66adc85f
AppSearchStorageStatsAugmenter implements StorageStatsAugmenter for
reporting storage usage to system.
TODO:
Add test for multi-package storage.
Add test for multi-user storage.
Test: AppSearchSessionPlatformCtsTest
Bug: 179160886
Change-Id: Ic1edc241c31fd6be448fd29fe2cbaaca61bfdb07
Included changes:
* b7122be: Update Builders to comply with API council requirements.
* 60b34cd: Changes to AppSearchSchema builders to comply with API requirements.
* c6f7eee: Support property paths in GenericDocument.
* cbee331: Update documentation to distinguish between AppSearchSession and GlobalSearchSession
* cbdd3b9: Rename ReportUsage#usageTimeMillis to #usageTimestampMillis.
* cc09d3a: Implement value indices in GenericDocument.
* e7faa03: Rename isIndexNestedProperties to shouldIndexNestedProperties.
* aaa6e81: Support @CurrentTimeMillisLong in export.
* 388c2b4: Rename GenericDocument's "uri" to "id" everywhere.
Bug: 184576792
Bug: 184576806
Bug: 184174844
Bug: 180481315
Bug: 179797058
Bug: 175146044
Bug: 184175636
Bug: 185492298
Test: Presubmit
Change-Id: I81e396c1d4770479654a3a69ea598e23de88ac9a
This is a hidden API and is not compatible with becoming a mainline
module.
Bug: 181787682
Bug: 181096312
Test: Builds
Change-Id: Ic59b8e62eb2e1852a820203b770e2483c3fe53f4
It is a hidden API and cannot be used in mainline.
Bug: 180460796
Bug: 181787682
Test: AppSearchSessionUnitTest#testPutDocument_throwsNullException
Change-Id: Ie0a91ca9fd37c5c7dabd046836ffa533a6edb4b0
Revert "Added package-remove test to AppSearch host test"
Revert submission 14095007-appsearch-package-remove
Reason for revert: b/185306078 - creates appSearch directory before user is unlocked
Reverted Changes:
Iaae64c4ec:Added package-remove test to AppSearch host test
I81a1f5cae:Register PackageChangedReceiver to AppSearchManage...
Change-Id: I95736090a4334daf2b2b10ec68411532a5233dfd
If the service reaches the max pool size which is the number of
available processor, we should use LinkedBlockingQueue instead of
SynchronousQueue to queue the requests.
Bug: 185294190
Test: presubmit
Change-Id: I3a9a2f8a149f44fac7ddc01d61a6d1827a8d55bf
The Receiver could receive ACTION_PACKAGE_FULLY_REMOVED and
ACTION_PACKAGE_DATA_CLEARED broadcast and clean the package data.
Bug: 145759910
Test: atest --rebuild-module-info CtsAppSearchHostTestCases
Change-Id: I81a1f5cae823ed4780374b434b7a6be43d040cde
Changes included:
*05b7d39:Change schema version from per AppSearchSchema to overall.
*effe024:Support schema migration to another type.
*1be54dc:Minor fix for where we set version in schema.
Bug: 182620003
Test: AppSearchSchemaMigrationCtsTest
Change-Id: Ifabfaa65c32fc3684d7fc7a09dd021671ff3252d
The background executor could release binder thread earlier and
reduce work load of binder threads.
Bug: 173451571
Test: presubmit
Change-Id: I2ca247c8c396095f6975c335cf8327b0792ae956
The Receiver could receive ACTION_USER_REMOVED broadcast and wipe
the AppSearchImpl instance for the given user.
Bug: 179390369
Test: presubmit
Change-Id: I9a0f9e6cc41f89a098bc78146db1dccc48a173aa
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
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