Commit Graph

33 Commits

Author SHA1 Message Date
Alexander Dorokhine
ede6a6469d Implement the AppSearch.deleteAll API.
Bug: 147636343
Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: I72dcdc950ad95e47505be00e1e190c917c8174a1
2020-03-09 14:47:25 -07:00
Alexander Dorokhine
4604f23c58 Support queries in AppSearchImpl and FakeIcing.
Bug: 145631811
Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: Ic47da9bca664999c5ba679a81e0c7e9d7471d4de
2020-03-06 15:30:34 -08:00
Alexander Dorokhine
bc6fae140a Port the getDocuments() API to be synchronous.
Bug: 146526096
Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: Ibd8bfecc900b5b563c5c1ecbc71506ee75753197
2020-03-06 13:53:14 -08:00
Alexander Dorokhine
773b82b168 Implement getDocuments() support in AppSearchImpl.
This is a second attempt to submit ag/10081469.

Bug: 146526096
Test: AppSearchManagerTest
Change-Id: Ic294679c29cd86b52dfdd1c7169396483c881c96
2020-03-06 10:43:16 -08:00
Alexander Dorokhine
93d531225d Switch AppSearchBatchResult from Throwable to error code and message.
Based on API review feedback:
> A map of Throwable objects is very unusual. Couldn't you return a
> structure of error code and reason string? If you know of specific
> error types, it's better to be explicit rather than have to parse
> just an exception string.

Bug: 143789408
Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: I8d3df1a176fd275db54783b387602ceb7b0d280a
2020-03-05 15:54:19 -08:00
Alexander Dorokhine
45b8551845 Merge "setSchema() API adjustments from API review." 2020-03-05 23:36:36 +00:00
Terry Wang
ac43312ffd Changes getProperty methods to return primitive type
Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: I2ae6d37c266211f8c6742d08ee2c778b48c67f54
2020-03-05 21:46:09 +00:00
Alexander Dorokhine
7b05862396 setSchema() API adjustments from API review.
Test: presubmit
Bug: 145635424
Change-Id: I548c2f986972c1a1fb5ef3ec55a5735b29e84b04
2020-01-27 00:58:33 -08:00
Alexander Dorokhine
70156bd8fe Merge "Revert "Implement getDocuments() support in AppSearchImpl."" 2020-01-27 07:54:55 +00:00
Alexander Dorokhine
f9efe4fcd9 Revert "Implement getDocuments() support in AppSearchImpl."
Revert "Add CTS tests for AppSearch.getDocuments APIs."

Revert submission 10081469-060-get-impl

Reason for revert: Breaks build due to collision with ag/10111175
Reverted Changes:
I013ac2f01: Implement getDocuments() support in AppSearchImpl....
Ia518a91fe: Add CTS tests for AppSearch.getDocuments APIs.

Change-Id: Ib6437eb41c53f7bf00aac7951b427455982f2247
2020-01-27 07:52:54 +00:00
Alexander Dorokhine
20f9567169 Merge "Implement getDocuments() support in AppSearchImpl." 2020-01-27 04:35:25 +00:00
Terry Wang
8eb86e8e2f Adds support for index Document properties in AppSearch.Document.
Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: Ie5d2b7a3c929cc5d0a6edee0a0a01eb06e9a4e3a
2020-01-24 15:36:31 -08:00
Terry Wang
d0b1e1057f Adds ttl and support for index byte array in AppSearch.Document.
Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: Ic3daf03ae232c0142d126c49e7e3ae7201076770
2020-01-24 15:36:20 -08:00
Terry Wang
7cc0c30d42 Refactor AppSearch to split into AppSearchDocument and AppSearchEmail.
This change is a no-op refactor.

Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: I36faca03a830fa87d0a40373d3f5ddd6dbdd6640
2020-01-24 14:15:49 -08:00
Alexander Dorokhine
2e225be9bc Implement getDocuments() support in AppSearchImpl.
Bug: 146526096
Test: AppSearchManagerTest
Change-Id: I013ac2f017ce138143bd9c0f1d6bfd92f880dd2c
2020-01-24 13:44:46 -08:00
sidchhabra
af0b52fdea Added ResultSpec, SnippetSpec and ScoringSpec.
Change-Id: Ib851feec672a0223ef8f05f2ba5849220cbd34e3
Test: atest core/tests/coretests/src/android/app/appsearch/SnippetTest.java
Bug: 145631811
2020-01-22 13:43:02 -08:00
Alexander Dorokhine
46e0337f25 Port the putDocuments() API to be synchronous.
This requires adding an object for reporting multiple results in a single call.

It is based on android.hardware.camera2.TotalCaptureResult.

Bug: 143789408
Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: Ia775a5cd722ef8fd05286d2c8ed4ec0da3f3b63a
2020-01-21 01:08:57 -08:00
Alexander Dorokhine
0c457e57e3 Implement putDocuments() support in AppSearchImpl.
Bug: 143789408
Test: AppSearchManagerTest
Change-Id: I4ef0540e0655a0b65a32b8d6a903ae955c687f4f
2020-01-19 03:00:28 -08:00
Alexander Dorokhine
aa6e9dd431 Switch setSchema API to be synchronous, based on discussion with API council.
Bug: 145635424
Test: Presubmit
Change-Id: I1419ca809eacea38bb8efd272771c0853d91efec
2020-01-18 11:15:00 -08:00
Alexander Dorokhine
e2e63a57b2 Merge "Add forceSetSchema and fix the setSchema API comment." 2020-01-18 03:46:14 +00:00
Cassie Wang
42b34aef9a Merge "Update appsearch with new upstream changes" 2020-01-18 03:42:23 +00:00
Alexander Dorokhine
aff0c2a9e1 Merge "Remove IndexingConfig and merge its constants into PropertyConfig." 2020-01-18 03:42:02 +00:00
Cassie Wang
d70271a839 Update appsearch with new upstream changes
* Switch CreationTimestampSecs to CreationTimestampMs.
* Switch SearchResult error handling

Bug: 143789408
Test: atest --rebuild-module-info CtsAppSearchTestCases
FrameworksCoreTests:android.app.appsearch
FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: Ib1381ba2714d1d0a2a2d5d4bfe1cc3a095ebcda4
2020-01-17 17:53:06 -08:00
Alexander Dorokhine
4079ea1d88 Add forceSetSchema and fix the setSchema API comment.
Bug: 145635424
Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: Ibf7f7f33226115a94efbc659c1366edd3ccb4a3c
2020-01-16 19:38:55 -08:00
Alexander Dorokhine
0a26313afb Remove IndexingConfig and merge its constants into PropertyConfig.
With 4-tab indents, these nested structures become difficult to write
and maintain. The information encoded here doesn't seem to benefit from
being separated into its own config.

Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Bug: 145635424
Change-Id: I6c771e0af1ca34a05b09d1532f0f227a069e0d2e
2020-01-16 19:37:58 -08:00
sidchhabra
16e5fefb59 Added query and SearchResults.
Bug: 145631811
Test: atest core/tests/coretests/src/android/app/appsearch/SearchResultsTest.java
Change-Id: Ie1bb0028b6ff999401cb96f9b9c4b121c9d0e448
2020-01-16 18:38:28 -08:00
Terry Wang
68b8332ebd Merge "Add AppSearch.java, containing the Document class, base Builder, and Email." 2020-01-16 00:01:28 +00:00
Alexander Dorokhine
0731f57193 Add AppSearch.java, containing the Document class, base Builder, and Email.
Document is the basic entity to be indexed and queried in AppSearch.
AppSearch.java contains all AppSearch Document types and their Builders.
They are grouped here to avoid potential collisions with other
generically-named classes like Email and Contact).

Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: I7bb607ad4114451a3db11b9ade9c197da1e6556a
2020-01-15 13:31:45 -08:00
Alexander Dorokhine
3d7993dcbf Add implementation tests for AppSearchSchema framework classes.
Test: atest FrameworksCoreTests:AppSearchSchemaTest
Bug: 145635424
Change-Id: I6e8b9c9d9748cc15b6b6d7872b0e9546d6ead1c6
2020-01-14 15:48:44 -08:00
Alexander Dorokhine
0e8fa4e65b Add a SetSchema API and builders.
They directly construct the proto in frameworks.jar.

The API is not yet implemented.

Test: atest CtsAppSearchTestCases
Bug: 145635424
Change-Id: I4f708fa845a87f171ace437788d2c45161fc38ff
2020-01-13 20:22:20 -08:00
Alexander Dorokhine
04a05a8bb2 Move framework-appsearch out of framework.jar.
Test: CtsAppSearchTestCases
Bug: 146218515
Change-Id: I55a8732e54e46877ee448973d735ded2870d9443
2019-12-17 10:41:21 -08:00
Alexander Dorokhine
a365421cb8 Add TEST_MAPPING files for AppSearch.
This replaces the previous @Presubmit solution.
This reverts commit 3638f66a5c.

Bug: 143900788
Test: presubmit
Change-Id: I9dbb60166b958d492c309fa5ab402368bdbf7159
2019-12-03 21:37:04 -08:00
Terry Wang
ecc0d1b2c1 Add a new system service for app search project
Bug: 142567528
Test: manual
Change-Id: Iefb426383f94ec89c896065c798b22cfb2977bf3
2019-11-21 14:15:22 -08:00