Commit Graph

8479 Commits

Author SHA1 Message Date
Ryan Mitchell
a12b9e0c3f Merge "Allow the system AssetManager to be reinitialized for testing" 2019-11-20 04:01:11 +00:00
TreeHugger Robot
5c407dc002 Merge "Remove @SystemApi annotation for an overriding method" 2019-11-20 00:22:32 +00:00
Ryan Mitchell
260d13b27d Allow the system AssetManager to be reinitialized for testing
ResourcesPerfWorkloads replays record resources calls for 1P and 3P
apps. The recordings use private resource ids. Since private
resources ids can change between builds, the replay must have the
ability to use a stable version of framework resources with the
correct resource ids.

Bug: 136085555
Test: atest ResourcesPerfWorkloads
Change-Id: I46297e355ed6347ce8063e7f1c26708f28faacc8
2019-11-19 14:05:16 -08:00
Artur Satayev
785d3a03b9 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-19 15:05:51 +00:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Jiyong Park
1620457e34 Remove @SystemApi annotation for an overriding method
Context.registerReceiverForAllUsers are already marked as @SystemApi.
The same method in ContextWrapper overriding it doesn't need to be
annotated as such. In fact, that API is even not recorded in
system-current.txt.

Bug: 144424011
Test: atest CtsSystemApiAnnotationTestCases
Change-Id: I60890104bf20a2c674edd91ec6b487cca1b4e37b
2019-11-19 22:48:36 +09:00
Mohammad Samiul Islam
7da3588356 Merge "Allow staging multiple session with non-overlapping packages (apk-only)" 2019-11-19 12:03:51 +00:00
Ilya Matyukhin
d6b829939a Merge "Implemented and integrated AuthService" 2019-11-19 02:03:13 +00:00
TreeHugger Robot
ce934c7d78 Merge "Removed UserInfo.FLAG_MASK_USER_TYPE, it's not used anywhere anymore" 2019-11-18 23:24:54 +00:00
Ilya Matyukhin
e4675b3067 Implemented and integrated AuthService
AuthService in its current form is a thin wrapper around
BiometricService. It initializes BiometricService in onStart();
registers fingerprint, face, and iris authenticators; and forwards all
of the incoming calls to the corresponding methonds in BiometricService.

The next step will be to move non-biometric related functionality from
BiometricService to AuthService, and turn BiometricService into a module
with a stable API.

Bug: 141025588
Test: atest AuthServiceTest
Test: atest BiometricServiceTest
Test: BiometricPrompt works in BiometricPromptDemo
Change-Id: Ia861b7c2d80bfca386c3e0b44ec35b4aca3b0ffc
2019-11-18 22:10:50 +00:00
Jeff Sharkey
eca95ef9e8 Merge changes from topic "nov15"
* changes:
  Expand ContentProviderOperation support of extras.
  Extend insert/update/delete to provide extras.
  Query arguments for grouping, other SQL clauses.
2019-11-16 04:20:10 +00:00
Jeff Sharkey
243d5f197c Expand ContentProviderOperation support of extras.
Now that we allow extras in more ContentProvider calls, we should
also allow CPO to define and pass those extras into a provider.  We
recently added flexible utility methods like withExtraBackReference(),
so this change starts passing those values to insert, update, delete,
and query.

Bug: 131643582
Test: atest CtsContentTestCases
Change-Id: I4a445c061bbd84f45bdb80d336a2d0928b7fbe9c
2019-11-15 14:11:42 -07:00
Jeff Sharkey
e9fe152f31 Extend insert/update/delete to provide extras.
A few releases ago we added ContentResolver.QUERY_ARG_* constants
to query() as a new best-practice that will help wean us off raw
SQL arguments.  (For example, a provider could add their own
custom arguments like QUERY_ARG_INCLUDE_PENDING to cause the query
to reveal pending items that would otherwise be hidden.)  This
change expands update() and delete() to accept those arguments.

This change also expand insert() to accept extras too, as part of
preparing to support an upcoming MediaProvider feature that will let
apps place new media "adjacent" to an existing media item.  (Sending
that adjacent item through extras is cleaner than trying to send it
through escaped query parameters.)

Bug: 131643582
Test: atest CtsContentTestCases
Change-Id: I436296155b9b5f371b4cbe661feaf42070285fcc
2019-11-15 13:46:31 -07:00
Adam Bookatz
b9a57da94c Merge "Introduce user types" 2019-11-15 19:15:37 +00:00
Mohammad Samiul Islam
da00497f07 Allow staging multiple session with non-overlapping packages (apk-only)
Bug: 141843321
Test: atest StagedInstallTest#testAllowNonOverlappingMultipleStagedInstall_BothSinglePackage_Apk
Test: atest StagedInstallTest#testFailOverlappingMultipleStagedInstall_BothSinglePackage_Apk
Test: atest StagedInstallTest#testFailOverlappingMultipleStagedInstall_BothSinglePackage_Apex
Test: atest StagedInstallTest#testAllowNonOverlappingMultipleStagedInstall_MultiPackageSinglePackage
Test: atest StagedInstallTest#testFailOverlappingMultipleStagedInstall_BothMultiPackage
Test: atest StagedInstallTest#testMultipleStagedInstall_ApkOnly
Test: atest RollbackManagerHostTest#testApkOnlyMultipleStagedRollback
Test: atest RollbackManagerHostTest#testApkOnlyMultipleStagedPartialRollback
Test: atest StagedInstallTest
Change-Id: Iad2e35b50fd22e207e3ad91b48a767827d8e8926
2019-11-15 19:05:10 +00:00
Jeff Sharkey
b500cb85ff Query arguments for grouping, other SQL clauses.
Over time we've expanded ContentResolver to accept a Bundle of
arguments to influence how a query is performed, and this change
expands that set to allow setting of raw GROUP BY, HAVING, and
LIMIT clauses.  Note that providers are not required to implement
each of these arguments; they simply need to inform callers which
of them were honored via EXTRA_HONORED_ARGS.

This change also adds support to MediaProvider for handling
these arguments.

Bug: 143966486
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ia839b5a1917d7833f03e022cfef65652c0d7a01d
2019-11-14 15:42:52 -07:00
Roshan Pius
a32d3a51eb Merge "Context: Make sendBroadcastMultiplePermissions a @SystemApi" 2019-11-14 19:28:34 +00:00
TreeHugger Robot
9f43c201fe Merge "Do not look for R.class of overlays" 2019-11-14 19:04:48 +00:00
Bookatz
029832a951 Introduce user types
Introduces the notion of 'user types' to UserManager.
Previously, users only had properties, set by UserInfo flags. We now
solidify some of these as formal user types. Each user must be of
precisely one user type. The configuration of each type is defined
in a UserTypeDetails object.

Prior 'types' - namely Guest, Restricted, ManagedProfiles, Demo, and
'normal' - that were set via UserInfo flags are now controlled via
UserType. Previous UserInfo flag methods for categorizing these are
still supported as long as no user of of more than one type.

If a user was (e.g.) previously both Guest and Demo, it is now
invalid and will be prevented from upgrading. This should not be a
problem in AOSP, where these 'types' were assumed mutually exclusive.

UserTypeDetails is sufficiently general to support future non-managed
profiles. To this end, the logic for specifying badges and their
colors/labels is contained by UserTypeDetails, and therefore
UserManager is responsible for delivering the corresponding badge
information.

Bug: 142151520

Test: added new test class UserManagerServiceUserTypeTest
Test: added additional tests in UserManagerServiceUserInfoTest
Test: added additional tests in UserManagerTest
Test: added additional tests in UserManagerServiceCreateProfileTest
Test: created UserTests to run the various pm.User*Test's

Test: atest \
  com.android.server.pm.UserTests \
  UserLifecycleTests \
  ManagedUserContentResolverTest \
  CtsDevicePolicyManagerTestCases \
  CtsMultiUserHostTestCases \
  com.android.server.devicepolicy.DevicePolicyManagerTest \
  com.android.server.am.UserControllerTest \
  CreateManagedProfileTaskTest

Test: atest com.android.server.pm.UserManagerServiceCreateProfileTest
   using adb shell getprop persist.sys.max_profiles # for 5 and -1

Change-Id: Id1183a76055e9a7610965cf40b256d1392afe6f8
2019-11-14 10:00:50 -08:00
Roshan Pius
3fe42f0906 Context: Make sendBroadcastMultiplePermissions a @SystemApi
This API is used by wifi mainline module, so converting it to a formal
API.

Bug: 141943978
Test: Compiles
Change-Id: I563b6b37002975639fde036014cd0955fc8edef9
2019-11-14 05:55:52 -08:00
Jeff Sharkey
03263747d8 Merge "Allow sending of bulk Uri change notifications." 2019-11-14 03:48:02 +00:00
Jeff Sharkey
1307f428af Allow sending of bulk Uri change notifications.
MediaProvider makes heavy use of Uri change notifications, which
currently need to be delivered one at a time through the Binder
interface.  To optimize this, allow callers to provide a collection
of multiple Uris to notify with a single Binder call.

Bug: 134170767
Test: atest cts/tests/tests/content/src/android/content/cts/ContentResolverTest.java
Change-Id: Ifef778e88bb772b5580f70929c6f2e9c166d1c0e
2019-11-13 18:17:02 -07:00
Ryan Mitchell
73bfe41bab Do not look for R.class of overlays
Now that RROs are loaded as shared libraries,
LoadedApk#makeApplication is attempting to find the onResourcesLoaded
method of the overlays. This is a performance hit and causes more
memory than necessary to be allocated during application start up.

Bug: 143314947
Test: com.android.performance.tests.HermeticMemoryTest
Change-Id: I3b8cd22dae83e0164d6678c80279f9fffceb34e6
2019-11-13 14:51:14 -08:00
TreeHugger Robot
3839bf8357 Merge "Add test for default apps UI." 2019-11-13 18:34:13 +00:00
Vadim Caen
fce6ba29b4 Merge "Add OrientationConfig IntDef" 2019-11-13 17:12:10 +00:00
Vadim Caen
600e4908f8 Add OrientationConfig IntDef
Bug: N/A
Test: N/A
Change-Id: I6e33720339174e7426a231b597c2f6e0852f2e85
2019-11-13 16:21:27 +01:00
Artur Satayev
f0b7d0ba51 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Hai Zhang
09134e6560 Add test for default apps UI.
Bug: 136503238
Fixes: 144118797
Test: atest RoleManagerTest
Change-Id: I3ae43ae97a01fd09890c1a305b6213b7e7f0a446
2019-11-12 12:50:43 -08:00
TreeHugger Robot
fd74d7645a Merge "Update SyncStorageEngine to use protos." 2019-11-12 17:55:03 +00:00
Varun Shah
816cf63bc5 Update SyncStorageEngine to use protos.
Status and Statistics info within SyncStorageEngine was being stored
using Parcels, which is not recommended. Updating both of them to use
protos now. Additionally, because of protos, storage space on disk
consumed by these files are reduced by more than 50%.

Also added unit tests for SyncStorageEngine.

Bug: 38177679
Test: atest com.android.server.content.SyncStorageEngineTest
Test: build and flash - no errors in logs
Change-Id: I187cb6c271333f366f5c7f651f75b4161fee90d4
2019-11-11 10:56:08 -08:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00
Meng Wang
d4976c4f46 Merge "System API: Context#registerReceiverForAllUsers" 2019-11-08 18:03:02 +00:00
Joanne Chung
b26a6c567a Merge "Allow to use ExtService as TextClassifierService" 2019-11-08 05:15:30 +00:00
Sudheer Shanka
a83671193b Merge "Add a new system service for blob store management." 2019-11-08 04:05:35 +00:00
Joanne Chung
0ad8fe3b87 Merge "Grant permissions to ContentCapture and remove permission for TC." 2019-11-08 01:51:15 +00:00
Andrew Solovay
61d29f3953 Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev am: de21a30cda am: c5f06a08c8 am: 8e351a1c14
am: 3657108803

Change-Id: I70677fe070b1c1ac101e53490cf81d4983c62133
2019-11-07 17:47:09 -08:00
Andrew Solovay
3657108803 Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev am: de21a30cda am: c5f06a08c8
am: 8e351a1c14

Change-Id: I13175f879d36c6e89e1a6772098455496904f907
2019-11-07 17:41:20 -08:00
Andrew Solovay
8e351a1c14 Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev am: de21a30cda
am: c5f06a08c8

Change-Id: Ic61f305c81ebeaa0e4002c4f23007f2edacc6e4a
2019-11-07 17:35:10 -08:00
TreeHugger Robot
de21a30cda Merge "docs: Clarified behavior of TypedArray.getBoolean()" into qt-dev 2019-11-08 01:17:29 +00:00
Meng Wang
3f9e036f11 System API: Context#registerReceiverForAllUsers
Bug: 141193711
Test: make
Change-Id: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
2019-11-07 15:03:13 -08:00
Sudheer Shanka
f5b36964e0 Add a new system service for blob store management.
This change adds a bare-bones system service, implementation will follow
later.

Bug: 143559646
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Change-Id: Idf21dfcd11dd32a42b62c6ad965d6f5ad7eed1b4
2019-11-07 13:37:14 -08:00
TreeHugger Robot
861e255614 Merge "Add an override for getUser in ContextWrapper" 2019-11-07 11:12:43 +00:00
James Lin
5da87df5bb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." am: 303c5dc0fb am: b815ee2bb9
am: 35a357814c

Change-Id: I6790023bd43b6787e2e9a46e6ec4f645a69b95ee
2019-11-06 19:47:30 -08:00
James Lin
35a357814c Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." am: 303c5dc0fb
am: b815ee2bb9

Change-Id: I58e1e01f6901cc1630a6f34358e3008a1bbb1da7
2019-11-06 19:41:37 -08:00
James Lin
b815ee2bb9 Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony."
am: 303c5dc0fb

Change-Id: Ibcd4e3ab7c60c1446019d652e5603b02ca9f34b2
2019-11-06 19:33:36 -08:00
James Lin
303c5dc0fb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." 2019-11-07 03:26:08 +00:00
Bill Lin
bc687cd1f3 Merge changes from topic "apex_migration" am: 8eacf37ef3
am: 42a049c287

Change-Id: Ic951da75a0b4548fe30f583b5af59b811f6b3db5
2019-11-06 18:40:45 -08:00
Bill Lin
42a049c287 Merge changes from topic "apex_migration"
am: 8eacf37ef3

Change-Id: If897274a7d2b9258142a55a628525821d713af4b
2019-11-06 18:30:09 -08:00
Joshua Baxter
8ee6203bcb Merge "docs: fix typo" into qt-dev am: 4fa49b4541 am: 5cc0a67503 am: ffbebe1fde
am: 3cccaaf983

Change-Id: I8c3efd39e090ed07931afc4b80992fc6a874b561
2019-11-06 14:15:17 -08:00
Joshua Baxter
3cccaaf983 Merge "docs: fix typo" into qt-dev am: 4fa49b4541 am: 5cc0a67503
am: ffbebe1fde

Change-Id: I2e9a580dad500431c1eca2aabed8d2c723009bd4
2019-11-06 14:01:24 -08:00