Commit Graph

10296 Commits

Author SHA1 Message Date
Kholoud Mohamed
afb12625a9 Exposed some testAPIs in UserManager
The following changes in UserManager are required for ongoing
improvements to CTS/GTS infrastructure.
- Exposed the following as testAPIs:
	* isGuestUserEphemeral
	* createUser
	* preCreateUser
	* createProfileForUser
	* createRestrictedProfile
	* getUsers
	* getUserType
- Added permissions to the following APIs:
	* CREATE_USERS for getUserName
	* INTERACT_ACROSS_USERS for getProfileParent
- Added CREATE_USERS permission to the documentation of
getUsers and the APIs that call it.

Test: Confirmed that a CTS test can call these APIs
Bug: 178695365
Change-Id: Id9105db3bfefb926139715b728acedefd2a5ca3e
2021-02-26 10:08:18 +00:00
Alex Buynytskyy
a1ec6ad5e2 Merge "Remove INSTALLER_V2 permission since the API is finalized in S." into sc-dev 2021-02-26 09:50:23 +00:00
Riddle Hsu
ed46310238 Merge "Optimize the Parcel read/write of common window data" into sc-dev 2021-02-26 04:07:39 +00:00
Alex Buynytskyy
28d0b7b712 Remove INSTALLER_V2 permission since the API is finalized in S.
Bug: 152310230
Fixes: 152310230
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I624eb44a455ba65f156064c57787af5903567d96
2021-02-25 19:50:42 -08:00
Alex Buynytskyy
2645c147b7 Fixing some AIDL warnings.
Can't change the enum values as they are a part of public API (and enum-zero is not a warning apparently).

Fixes: 179836890
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I4d59410ec3476298cc98fdcc9584468b1debcb41
2021-02-25 20:08:39 +00:00
Evan Severson
445abca30e Merge "Expose SensorPrivacy as SystemApi" into sc-dev 2021-02-25 18:29:43 +00:00
Sudheer Shanka
8632838c50 Merge "Allow EJs to obtain new network capability." into sc-dev 2021-02-25 09:19:15 +00:00
Charles Chen
f225921153 Merge "Unhide isUiContext()" into sc-dev 2021-02-25 04:05:49 +00:00
Alex Buynytskyy
414d9ecc26 API feedback: getVersion instead of isV2.
Bug: 181015045
Fixes: 181015045
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I623f73b834759d9a1c599d7c7f3ff585fa75c4aa
2021-02-25 02:06:08 +00:00
Sudheer Shanka
6831749cb4 Allow EJs to obtain new network capability.
- Introduce new oom_adj score to be used for EJs so that they won't
  be killed before normal jobs but before any FGS. Also, add a new
  bind flag to instruct the OomAdjuster about when to use this
  new oom_adj score.
- Unlike other capabilities, any app (regardless of it's proc_state)
  with network capability will be able to transfer it's capability
  to other app by binding to it.

Bug: 177641226
Test: atest ./tests/app/src/android/app/cts/ActivityManagerProcessStateTest.java
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest ./services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
Test: atest CtsJobSchedulerTestCases

Change-Id: I888764ff22fba92fe2cccf3d8442ed318a19ad2a
2021-02-24 17:17:55 -08:00
Evan Severson
0f9d5aea50 Expose SensorPrivacy as SystemApi
Rename the apis to be more consistent.
Also expose to test api.
Have the aosp mark that it supports the toggle features by default.

Test: atest CtsSensorPrivacyTestCases
Bug: 162549680

Change-Id: Ib38c16adfc5cec931347e1a1891618983d78248b
2021-02-24 15:39:19 -08:00
Ruslan Tkhakokhov
f7bc904f44 Merge "Introduce 'dataExtractionRules' manifest attribute" into sc-dev 2021-02-24 23:20:54 +00:00
Soonil Nagarkar
2409543ce8 Merge "Proposal: Reduce the number of IPCs in PendingIntent" into sc-dev 2021-02-24 21:48:46 +00:00
Ruslan Tkhakokhov
e32b3b5773 Introduce 'dataExtractionRules' manifest attribute
Introduce the attribute apps targeting Android S+ can use to point to an
XML file that contains rules for copying app data during backup and
transfer operations. If this attribute is specified, the config pointed
to by the existing 'fullBackupContent' will be ignored.

Bug: 174216309
Test: m -j
Change-Id: I6ad57a24b40cf5b80b312c719747e8ba89aa0a93
2021-02-24 21:48:37 +00:00
TreeHugger Robot
5c9a0355f8 Merge "Allow syncs to be scheduled as EJs." into sc-dev 2021-02-24 20:12:50 +00:00
Riddle Hsu
b293d933e0 Optimize the Parcel read/write of common window data
The Parcel read/write speed of MergedConfiguration/InsetsSource
becomes 4x+ faster.

Because writeParcelable sends additional type info which is
unnecessary if the type is known on the reading side, replace
the usages to writeTypedObject and well-written readFromParcel.
That saves the time of class lookup and object creation.

Bug: 181025587
Test: vogar --mode app_process --benchmark \
frameworks/base/core/tests/benchmarks/src/android/os/ParcelableBenchmark.java

Change-Id: I29548ce6c2e5886f0e90a5dc70d8e9ecc0fb25a8
2021-02-24 23:33:16 +08:00
Varun Shah
c516abcf46 Allow syncs to be scheduled as EJs.
Bug: 178852366
Test: atest SyncRequestTest
Test: atest SyncOperationTest
Test: atest SyncManagerTest
Test: atest CtsSyncManagerTest
Test: atest ContentResolverTest [all]
Change-Id: I4a78abdc1f2f5313ac18f739209b76fdf49388e5
2021-02-23 12:15:53 -08:00
Makoto Onuki
35c53e2a73 Merge "Throw more descriptive exceptions when service start isn't allowed." into sc-dev 2021-02-23 16:05:30 +00:00
TreeHugger Robot
3d187a3ff5 Merge "Expose ApplicationInfo compileSdkVersion" into sc-dev 2021-02-22 23:41:15 +00:00
Winson
1206e776d4 Expose ApplicationInfo compileSdkVersion
Bug: 178116560

Test: none, move to public API

Change-Id: I321feec49f7c9d1a94f5a2140e0c4244ab776ce8
2021-02-22 13:58:47 -08:00
TreeHugger Robot
c952ffe7a0 Merge "Require .dm to install with .fsv_sig if supported" into sc-dev 2021-02-22 17:46:27 +00:00
Charles Chen
aa6de2e6e8 Unhide isUiContext()
... because it is more tied to Context instance that developers
are working with.

Bug: 179308116
Test: atest ContextIsUiContextTest
Change-Id: I41d90c4b5b81b430fc8007a0bdf86c6fd1c54400
2021-02-22 08:38:52 +00:00
Gavin Corkery
515af7889f Merge "Add REBOOT_READY broadcast" into sc-dev 2021-02-20 10:44:38 +00:00
Nadav Bar
e8d124dc20 Merge "Add a system TextToSpeech implementation that initiates the connection through the system server." into sc-dev 2021-02-20 06:21:18 +00:00
Makoto Onuki
0549b1f782 Throw more descriptive exceptions when service start isn't allowed.
Fix: 180518252
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Change-Id: Ia38a159f9ededdc9885ce6b8dc61640c3af5ef72
2021-02-19 14:36:05 -08:00
Guojing Yuan
bade294311 Merge "Provide an example for FLAG_PERMISSION_SELECTED_LOCATION_ACCURACY" into sc-dev 2021-02-19 19:10:25 +00:00
Chavi Weingarten
c14465c2bb Merge "Added public APIs to generate and validate a DisplayHash." into sc-dev 2021-02-19 01:47:14 +00:00
Soonil Nagarkar
2501c2728b Proposal: Reduce the number of IPCs in PendingIntent
Several PendingIntent methods are named such that there is very little
hint they involve any IPC, leading devs to overuse them, and thus adds
substantial strain on the system. Caching some of the most used method
results could remove 1000s of unnecessary IPCs.

Bug: 180518680
Test: manual sanity check
Change-Id: I7658251113ebb1e51280a4b8f3b49159d4f764f0
2021-02-18 16:40:06 -08:00
Victor Hsieh
675088a491 Require .dm to install with .fsv_sig if supported
Previously, .fsv_sig for .dm is optional, and is only required if the
base apk has it. This change makes it required regardless of (base) apk,
when a system property is set to "true".

fs-verity is required for devices first launced with R (can also be opted
in). On older devices, .dm is still allowed to install without .fsv_sig.

The change contains 3 conceptual changes:
 - mVerityFound -> mVerityFoundForApks: since it now focuses on only
   APKs.
 - Bail out if .dm does not come with .fsv_sig (on supported devices).
 - Update tests

Bug: 180414192
Test: CtsAppSecurityHostTestCases:android.appsecurity.cts.ApkVerityInstallTest
Test: CtsDexMetadataHostTestCases
Test: ApkVerityTest
Test: Also run the above on a device without fs-verity support, and with
      the requirement disable by system property.

Change-Id: I1c93671b9b433a73b88ae23205eec2a57a147ae1
2021-02-18 12:25:55 -08:00
Gavin Corkery
a6a206f3ac Add REBOOT_READY broadcast
Adds a new REBOOT_READY intent
which may be sent from the system server,
indicating the device's reboot-readiness state.

This broadcast will be sent with a boolean extra,
which will provide a positive or negative signal
of whether the device is ready to reboot. This
broadcast may only be received if the REBOOT
permission is held.

Test: atest CtsRebootReadinessTestCases
Bug: 161353402

Change-Id: I70fa1c35c844189af86c519749144732ceceaaac
2021-02-18 19:37:16 +00:00
Alex Agranovich
50c987fbb8 Add a system TextToSpeech implementation that initiates the connection through the system server.
This change includes the new System Service that allows the supervised binding to the TextToSpeech service provider.
    It proxies the binding process from the client instead of the direct client -> texttospeech connection.

Bug: 178112052
Test: atest CtsSpeechTestCases
Test: forest apct/device_boot_health_check
Change-Id: I0709e71460fa01ab025c92753a20bce38f562845
2021-02-18 14:31:36 +02:00
Greg Kaiser
a2584ca155 Merge "Revert "Add a system TextToSpeech implementation that initiates ..."" into sc-dev 2021-02-18 05:39:24 +00:00
Greg Kaiser
c09430c189 Revert "Add a system TextToSpeech implementation that initiates ..."
Revert "Add CTS tests for TextToSpeech connection related functi..."

Revert submission 13547465-ttsproxy

Reason for revert: Setup wizard crashes due to "Service not registered: android.speech.tts.TextToSpeech$SystemConnection"
Reverted Changes:
Id4059e460:Add CTS tests for TextToSpeech connection related ...
Ie17800bae:Add a system TextToSpeech implementation that init...

Bug: 180519958
Change-Id: Ie43c485bd4d0f76f8bb0a1dc77d6d85d46ff8377
Test: Locally reverted this change and no longer see the exception in SUW we saw before.
2021-02-18 00:29:01 +00:00
Shawn Willden
c418d4ef15 Merge "Add support for app-generated attestation keys." am: 50a66e39cd am: 2da3a280d2 am: bbdb4d9ee5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1584474

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0e4b2bcfa54953e37452a7533a89b49586596502
2021-02-17 20:49:09 +00:00
TreeHugger Robot
e89b53ff78 Merge "Use @InstallScenario instead of @InstallReason" into sc-dev 2021-02-17 20:26:23 +00:00
Shawn Willden
bbdb4d9ee5 Merge "Add support for app-generated attestation keys." am: 50a66e39cd am: 2da3a280d2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1584474

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad2f426ed43fdb9b4e62c81902d9f7ff8e936535
2021-02-17 20:14:54 +00:00
Treehugger Robot
eb03672631 Merge "Expose a setter for install scenarios" am: 29ec0b24c7 am: 34312d2173 am: 04422ecae9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587776

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1ef7bdd1b1b1c3153613740e64dab458697f84fd
2021-02-17 19:48:02 +00:00
Shawn Willden
50a66e39cd Merge "Add support for app-generated attestation keys." 2021-02-17 19:12:20 +00:00
Treehugger Robot
04422ecae9 Merge "Expose a setter for install scenarios" am: 29ec0b24c7 am: 34312d2173
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587776

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I72aaba3a7214c8cb3a2d25293f175ce27e0da50e
2021-02-17 18:53:43 +00:00
Todd Kennedy
6fc18b4f94 Use @InstallScenario instead of @InstallReason
Test: builds
Bug: none
Change-Id: Ifb753f89eab42c6afc6b4d87e7291f45ccdb8d6f
2021-02-17 10:17:40 -08:00
chaviw
19de7eab9b Added public APIs to generate and validate a DisplayHash.
Added public APIs to call into WindowManagerService, which will then
call into DisplayHasherService in mainline. Also, renamed to DisplayHash

Test: atest DisplayHashManagerTest
Bug: 155825630
Change-Id: I1e10a773fba9471dff41894389e0a9508446d3cc
2021-02-17 08:24:54 -08:00
Shawn Willden
bffded442a Add support for app-generated attestation keys.
This allows apps to request that AndroidKeyStore generate attestation
keys that can be used to sign attestations of other keys that the app
generates or imports.

Bug: 163606833
Test: atest CtsKeystoreTests
Change-Id: I943a6922271cbe909cb3a9d67021663b5646aa70
2021-02-17 06:46:13 -07:00
Flavio Fiszman
44a79fa3f3 Merge "Cache shortcuts on People Tile creation" into sc-dev 2021-02-17 13:26:44 +00:00
Alex Agranovich
7c064eb586 Merge " Add a system TextToSpeech implementation that initiates the connection through the system server." into sc-dev 2021-02-17 09:16:48 +00:00
Gavin Corkery
37dbb4e5d5 Merge "Initialize RebootReadinessManagerService" into sc-dev 2021-02-17 07:43:18 +00:00
Abhijeet Kaur
6f6bdfd287 Merge "Add new API to check a collection of URIs at once" into sc-dev 2021-02-16 19:43:50 +00:00
Winson Chiu
766326b69a Merge changes I5e258e23,I72323430 into sc-dev
* changes:
  Update isLinkHandlingAllowed to mean all or nothing
  Update intent resolution logic with new rules
2021-02-16 19:12:22 +00:00
TreeHugger Robot
9c28f9708a Merge "pm: Require manifest.json for .dm (dex-metadata) files." into sc-dev 2021-02-16 18:59:42 +00:00
Chris Wailes
8c2a706895 Expose a setter for install scenarios
This CL adds a setter for the install scenario data of the SessionParams
object in PackageInstaller.

Test: atest InstallSessionParamsUnitTest
Bug: 179841918
Change-Id: I9260d58285a5d0a051d2bdafa6ba6b23a739de01
2021-02-16 09:01:24 -08:00
Gavin Corkery
1d94eb9ea5 Initialize RebootReadinessManagerService
Initialize reboot readiness service from the
system server. This service is started
by calling into service-scheduling.jar
directly.

Test: Manual, add logs to check that service
      is correctly started.
Bug: 161353402

Change-Id: I06d55ee6ee5c3dde7524cf508324fd408fb81d22
2021-02-15 21:30:23 +00:00