2866 Commits

Author SHA1 Message Date
Alexander Dorokhine
83fbf50685 Merge "Update statsd config to be mainline compatible." into sc-dev 2021-05-20 20:36:23 +00:00
Alexander Dorokhine
c9429f43e0 Merge "Remove PackageManagerInternal from AppSearchService." into sc-dev 2021-05-20 20:36:04 +00:00
Alexander Dorokhine
6737deacc2 Merge "Fix HiddenApiTest#testSignatureMethodsThroughReflection." into sc-dev 2021-05-20 17:47:00 +00:00
Pinyao Ting
381b1b8433 Update OWNERS for AppSearch
Change-Id: I981abcc9a1122cc788e7be410dc8e9bc1c3e8855
2021-05-20 17:03:23 +00:00
lifr
46c3c694d4 Improve the net-capabilities scheme for backward compatibility
- Create a new XML tag for the new format. The new format should
  persist the arrays of values without assuming they necessarily
  have different bits.

- Upon reading, if the new tag is present, use that. If the new
  tag is not present but the old tag is present, then limit the
  contents to the capabilities/transports that existed in R.

- Catch all exceptions and ignore the requests if they can't be
  re-read from disk. This is a measure to avoid any mistake where
  the device couldn't boot when JS tries to restore state.

Bug: 183071974
Test: atest JobStoreTest
Change-Id: I56cde50d2adab81134c8be4f6996d68018f4212a
2021-05-21 01:00:21 +08:00
Artur Satayev
98d5c6b32f Merge "Add systemserverclasspath_fragment." into sc-dev 2021-05-20 14:27:23 +00:00
Anton Hansson
eaf26d5a41 Update API txt following a metalava fix
The txt was previously referencing VcnGatewayConnectionConfig.MIN_MTU_V6
which isn't part of the API. The API txt should be complete on its own,
so inline the value instead.

Similar case for appsearch annotations referencing non-API values.

Bug: 188527836
Test: m checkapi
Change-Id: Ideb34ab78c9a8fc4d589e58e810316b6f36b7a43
2021-05-20 11:14:05 +01:00
Alexander Dorokhine
a4354f989e Update statsd config to be mainline compatible.
Instead of using the "framework" module, we use our own module for
generating the atoms.

Bug: 181787682
Test: Builds
Change-Id: I626e2ddcad60d7a15c33b7a143b9e5d0ed0bb289
2021-05-19 21:52:06 +00:00
Alexander Dorokhine
ad8a40a56f Remove PackageManagerInternal from AppSearchService.
Most public and system APIs use UserHandle instead of UserIdInt, so this
CL ports AppSearch to do so as well, so that there are less conversions
required.

Bug: 181787682
Test: Presubmit
Change-Id: I29e4ba6bc73b994f1ece077ce515e1465ce54b12
2021-05-19 13:59:45 -07:00
Alexander Dorokhine
cadaa8b892 Fix HiddenApiTest#testSignatureMethodsThroughReflection.
It could not parse the annotation.

Bug: 188503851
Test: atest HiddenApiTest#testSignatureMethodsThroughReflection
Test: flash image, remove jetpack @SdkSuppress, and run jetpack tests
Change-Id: I05093b61b8658ad95db4f7e49c2f64bc314aa4b1
2021-05-18 16:54:25 -07:00
satayev
b720291b96 Add systemserverclasspath_fragment.
Note that the contents of the fragment are added as dependencies to an
apex, so there is no need to duplicate them in java_libs.

Bug: 180105615
Test: atest CtsClasspathsTestCases
Change-Id: Ie4732ee602983047859b29b939585a3f716d5bdc
2021-05-18 14:43:38 +01:00
Alexander Dorokhine
72ac81f5df Merge "Update framework from jetpack" into sc-dev 2021-05-18 01:17:30 +00:00
Sudheer Shanka
252eef4aa9 Merge "Revert "Add API to allow apps with location permission to access data blobs."" into sc-dev 2021-05-17 22:31:53 +00:00
Sudheer Shanka
e9a38062dc Revert "Add API to allow apps with location permission to access data blobs."
This reverts commit e0237fa50b43c7eb0892d7988bf1b344597fa091. Reverting
based on the feedback from Permissions and privacy team.

Bug: 158705914
Test: atest --test-mapping apex/blobstore
Change-Id: Id057e8c61dcf9d3d111ab20530a2074083052392
2021-05-17 22:31:09 +00:00
Alexander Dorokhine
a6d8d8e66c Update framework from jetpack
Included changes:
* b692f37: Rename `Int64` in annotation processor to `Long`.
* 05fe08c: Get QueryLength from Native
* 8f46606: Logging stats for remove (1)
* 237c134: Alter inheritance of LongProperty for backwards compatibility.

Bug: 187820569
Bug: 173532925
Bug: 173532925
Bug: 187820569
Test: Presubmit
Change-Id: Ia27e00250e7aa7c7a1acc974f24c63cc456739be
2021-05-17 15:13:40 -07:00
TreeHugger Robot
60b32709f0 Merge "Relaxing minimum alarm window requirements" into sc-dev 2021-05-14 21:15:53 +00:00
Xiaoyu Jin
05e3aca989 Merge "Log CallStats for more api calls" into sc-dev 2021-05-14 05:26:58 +00:00
Suprabh Shukla
0d3bf483bc Relaxing minimum alarm window requirements
Minimum allowed window is now a function of the futurity of the alarm.
So for alarms in the near future, it is smaller and it increases as time
to alarm increases maxing out at 10 minutes.

Test: atest AlarmManagerServiceTest

Bug: 185199076
Change-Id: I57f275adab7f9bcc7f0f7535bb810aa9b359287b
2021-05-13 22:25:16 -07:00
Xiaoyu Jin
193cbf3c74 Merge "Log InitializeStats in the platform" into sc-dev 2021-05-14 02:25:22 +00:00
Xiaoyu Jin
0c59d91acc Merge "Log SearchStats in the platform" into sc-dev 2021-05-14 00:27:37 +00:00
Xiaoyu Jin
2830ace18c Log CallStats for more api calls
+ CALL_TYPE_SET_SCHEMA
+ CALL_TYPE_GET_DOCUMENTS
+ CALL_TYPE_REMOVE_DOCUMENTS
+ CALL_TYPE_FLUSH

Bug: b/173532925
Test: ./gradlew  -Pandroidx.allWarningsAsErrors
appsearch: appsearch:build appsearch:appsearch-compiler:build
appsearch: appsearch-local-storage:build  icing:build
icing: nativeLib:build appsearch:appsearch:connectedCheck
appsearch: appsearch-local-storage:connectedCheck
appsearch: appsearch:lintDebug
appsearch: appsearch-local-storage:lintDebug
Change-Id: Ib1521b0920d40828f30a7ee00e6996ab032c9ef6
2021-05-13 14:36:49 -07:00
Xiaoyu Jin
3a95c180c7 Log InitializeStats in the platform
Bug: b/173532925
Test: atest
CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch
FrameworksServicesTests:AppSearchImplTest
FrameworksServicesTests:com.android.server.appsearch.stats.PlatformLoggerTest

Change-Id: Ib2f1b13addbd8ec2fe95db38313b870672370910
2021-05-13 13:21:38 -07:00
Alexander Dorokhine
c09e57ce61 Merge "Link framework-appsearch against the module_current SDK." into sc-dev 2021-05-13 20:03:08 +00:00
Xiaoyu Jin
d6d22f0ecf Log SearchStats in the platform
Bug: b/173532925
Test: atest
CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch
FrameworksServicesTests:AppSearchImplTest
FrameworksServicesTests:com.android.server.appsearch.stats.PlatformLoggerTest

Change-Id: I6545cb6722ad6f4680e6b0f7800e1833ecc80e0e
2021-05-13 12:51:29 -07:00
Alexander Dorokhine
0777c474cf Update framework from jetpack.
Changes included:
* 8acc04a: Remove unnecessary clones in some builders.
* d3ad52e: Build-gated trace logs for AppSearchImpl.
* 6ff6bd3: Reimplement AppSearchImpl's initialization flow.
* 02658df: Minor fixes to AppSearchImpl.
* 15aa2a1: Clarify docs around AppSearchBatchResult.Builder.
* 3041027: Document how to get an AppSearchSession for developers.
* 6cf5f78: Document parameters of report usage requests.
* ad3f9fa: Implement MagrationFailure.toString()
* dc74c99: Add coverage to the public api MigrationFailure.
* 755bf36: Add API coverage for SetSchemaRequest.

Bug: 184575938
Bug: 184575880
Bug: 175430168
Bug: 187849451
Bug: 187351264
Bug: 187351084
Bug: 186242890
Bug: 187420294
Bug: 187880094
Bug: 183239679
Bug: 183239898
Test: Presubmit
Change-Id: Ibe1a6422326c8d19b18f49dac6b8826617cd2bc2
2021-05-13 11:55:09 -07:00
Paul Duffin
a6e369bb32 Merge "Add media-module-sdk build target." 2021-05-13 09:48:42 +00:00
Alexander Dorokhine
332dd22ff9 Merge "Refactor VisibilityStore's docs and maps to separate objects." into sc-dev 2021-05-13 05:33:54 +00:00
TreeHugger Robot
85dda65c28 Merge "Clarify the semantics of ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED" into sc-dev 2021-05-12 23:28:51 +00:00
Alexander Dorokhine
487406300a Refactor VisibilityStore's docs and maps to separate objects.
This reduces the volume of code VisibilityStore has to manage.

Bug: 169883602
Test: VisibilityStoreTest
Change-Id: I422f1c5f35fd4ded49cbd102530c574092bb4a74
2021-05-12 15:10:16 -07:00
TreeHugger Robot
b65503ecc2 Merge "Add bootclasspath_fragment." into sc-dev 2021-05-12 20:06:22 +00:00
Alexander Dorokhine
c0bf81a526 Link framework-appsearch against the module_current SDK.
This requires removal of all hidden APIs from the framework code.

Preconditions are jarjar'd into the jar.
Other APIs are replaced with system-visible equivalents.

Bug: 181787682
Bug: 146218515
Test: Presubmit
Change-Id: I6649bed3260ac08a0f66abd7a8ec545c401761fe
2021-05-12 11:34:51 -07:00
Makoto Onuki
1cd708bb0b Clarify the semantics of ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED
Bug: 187206399
Test: build
Change-Id: Ibe450f0d7c29ada5848508b6ac6a585bfabad72b
2021-05-12 09:53:15 -07:00
Alex Buynytskyy
8e1f1debde Better error message for missing job services.
Bug: 141645789
Test: presubmit
Change-Id: I334639d624f08ae2ec5ee235d609c780a09a1338
2021-05-12 16:01:53 +00:00
satayev
daed7671fb Add bootclasspath_fragment.
Note that the contents of the bootclasspath_fragment are added as
dependencies to an apex, so there is no need to duplicate them in
java_libs.

Bug: 180105615
Test: atest CtsClasspathsTestCases
Change-Id: Idf501d35b631782d6c0b6eed6f6063cfb332d8e6
2021-05-12 16:44:08 +01:00
Hai Zhang
977345eba5 Add media-module-sdk build target.
Bug: 177884752
Test: m media-module-sdk
Merged-In: Ib37f2861a3c12526686b6ec78d9345aead6d51c9
Change-Id: Ib37f2861a3c12526686b6ec78d9345aead6d51c9
(cherry picked from commit a2fd7fd012e49a51cb72af1c516a8dc434f0b129)
2021-05-12 14:15:35 +01:00
Terry Wang
f192dbf7f8 Merge "Handle user stopping in AppSearch." into sc-dev 2021-05-11 22:29:19 +00:00
Alexander Dorokhine
ffa64b6009 Update framework from jetpack.
Changes included:
* 25ca4ff: Sync AppSearch with google3 update ag/14473436 (f13a174)
* a1ad7b4: Make GenericDocument#toString print results in a deterministic order.
* bf3051b: Sync AppSearchResult and AppSearchBatchResult to framework.
* dd3c05f: Add more call types
* fb27537: Add API coverage for SearchSpec.getProjections

Bug: 185445694
Bug: 187424629
Bug: 146218515
Bug: 173532925
Bug: 183239965
Test: Presubmit
Change-Id: I5392a10fe03451a895136cdbc75d5bf0df081aa3
2021-05-11 12:42:17 -07:00
Alexander Dorokhine
48df6c6055 Merge "Unhide the storage attribution API with system visibility." into sc-dev 2021-05-11 18:00:42 +00:00
Alexander Dorokhine
e3eea0e2a5 Merge "Delete deprecated methods after dogfood transition." into sc-dev 2021-05-11 17:29:35 +00:00
TreeHugger Robot
111df38202 Merge "Refactor how AppSearchResult and AppSearchBatchResult are parcelled." into sc-dev 2021-05-11 17:06:08 +00:00
Makoto Onuki
987f904072 Merge "Implement requestForegroundServiceExemption, without enabling it" into sc-dev 2021-05-11 15:55:14 +00:00
Lorenzo Colitti
1d4fb5b91c Rename unwanted capabilities to forbidden capabilities.
Addresses API council feedback.

Bug: 184890428
Test: atest FrameworksNetTests CtsNetTestCases
Test: atest CtsNetTestCasesLatestSdk:NetworkCapabilitiesTest on R device
Change-Id: Id7c68fbf56ee08fcad8e8e3aacf037fa1885936b
2021-05-11 17:46:13 +09:00
Terry Wang
9a950ce716 Handle user stopping in AppSearch.
When a user stops, we can close its AppSearchImpl instance to release
resources. We'll also remove it from our cache of unlocked users so
future API calls won't execute on a locked user.

Bug: 179407490
Test: atest --rebuild-module-info CtsAppSearchHostTestCases
Change-Id: I09953d32ad4aaf2989386e99c93623b58d564c27
2021-05-11 01:00:07 -07:00
TreeHugger Robot
5d9fa9063e Merge "Increase RESTRICTED timeout to 45 days." into sc-dev 2021-05-11 06:46:59 +00:00
Alexander Dorokhine
7de178b090 Delete deprecated methods after dogfood transition.
Bug: 181887768
Test: Presubmit
Change-Id: I729f6cc0acb15cfc78b4c39be165d72443c26879
2021-05-10 23:20:10 -07:00
Alexander Dorokhine
1b90731237 Merge "Update framework from Jetpack." into sc-dev 2021-05-11 06:07:41 +00:00
Alexander Dorokhine
a0553f4d59 Update framework from Jetpack.
Changes included:
* 8b28ee6: Adds cts test to verify that CJK search.
* 96876cf: Display a single document selected from the documents list
* 8acd6a2: Add PackageIdentifier CTS test.
* 7e6f029: Add SearchSpec.Builder CTS tests.
* 7a545c8: Add CTS tests for AppSearchSchema property config builders.
* 9224f38: Add RemoveByDocumentIdRequest CTS tests.
* 6dadb66: Add tests for ReportUsageRequest and ReportSystemUsageRequest.
* 08b6b0a: Add StorageInfo.Builder Cts Tests
* b178f79: Add cts test for SearchResult, MatchInfo and MatchRange
* 158a0fa: Add GetByDocumentIdRequestCtsTest CTS tests.
* b3d5fb0: Logging stats for SetSchema.
* 7605e1e: Add test coverage for SetSchemaRequest.
* 55e10b2: Add test coverage for GenericDocument.
* 0038649: Allow reuse of SearchSpec.Builder.
* 1a309db: Mark testDocument_toString test as @Ignore
* d682ee2: Add test coverage to androidx.appsearch.exceptions
* 9dce38b: Refactor SetSchemaResponseCtsTest to unit test
* c24fd88: Prevent SearchSpec.Builder from copying members unless reused.
* 0b3b84f: Allow reuse of SearchResult.Builder.
* 56d897c: Allow reuse of builders related to AppSearchSchema.
* 27c774a: Allow reuse of remaining builders except GenericDocument.
* ffffb62: Add test coverage for SetSchemaResponse.
* 8b61217: Refactor CTS package to put 'cts' at the highest level.

Bug: 183574903
Bug: 179680545
Bug: 183239895
Bug: 183239507
Bug: 183239552
Bug: 183239611
Bug: 183239665
Bug: 183239677
Bug: 183239702
Bug: 183239768
Bug: 183239769
Bug: 183240150
Bug: 183239894
Bug: 183239741
Bug: 183239511
Bug: 183239590
Bug: 184396610
Bug: 182958600
Bug: 184396708
Bug: 183239760
Bug: 183239899
Bug: 183239508
Bug: 183239762
Bug: 183239705
Bug: 183240098
Bug: 173532925
Bug: 183239669
Bug: 183239682
Bug: 187424629
Bug: 183239509
Bug: 183151637
Bug: 178060626
Bug: 184575547
Bug: 184575981
Bug: 184575930
Bug: 184175556
Bug: 180481315
Bug: 183239740
Test: Presubmit
Change-Id: I5a119d5c779ac48601f88e28867fd5bc3e373065
2021-05-10 16:34:29 -07:00
Alexander Dorokhine
610afe52c4 Unhide the storage attribution API with system visibility.
Bug: 179160886
Test: StorageStatsManagerLocalTest
Change-Id: I3a8994e215baff123df65d89d2d71b9e12de2af5
2021-05-10 15:59:31 -07:00
Makoto Onuki
26f28d4a29 Merge "Send a broadcast when an app is granted SCHEDULE_EXACT_ALARM" into sc-dev 2021-05-10 22:14:48 +00:00
Makoto Onuki
619c5a46d8 Implement requestForegroundServiceExemption, without enabling it
Bug: 187429663
Test: Checked ApplicationInfo.hasRequestForegroundServiceExemption()
  of a test app, with and without the new attribute set.

Change-Id: I98342a35a82e44327db896c9820806eb3eda5b4c
2021-05-10 11:50:32 -07:00