Add a flag indicating whether an admin may or may not control permission
grants for sensors-related permissions.
By default, on a fully-managed device, the admin may control sensor
permission grants. The admin may opt-out by providing the newly-added
provisioning extra, EXTRA_PROVISIONING_PERMISSION_GRANT_OPT_OUT.
On a managed profile, will no longer be able to control sensor
permission grants.
This change adds the provisioning extra and state flag in the
ActiveAdmin, a follow-up change will make the permission controller
utilize the flag.
Bug: 158735247
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAdminControlOverSensorPermissionGrantsDefault com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAdminControlOverSensorPermissionGrantsDefault com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAdminControlOverSensorPermissionGrantsDefault com.android.cts.devicepolicy.MixedProfileOwnerTest#testAdminControlOverSensorPermissionGrantsDefault
Change-Id: Iffd02450ee624416eccda8301ff84676f226c0d0
Add the audio session ID to the information in
AudioPlaybackConfiguration and make it available
to privileged apps via a system API.
Bug: 178909700
Test: atest AudioPlaybackConfigurationTest
Change-Id: I089ad0ed7f7efd5fd6db017ad1e86e013de7f05c
For the incoming connectivity mainline, it need to compute the
intersection of a set of uids and appIds for the permission
control. As @UserIdInt values are internal implementation details
of the OS, any mainline modules should use strongly-typed
UserHandle arguments. Thus, create a new API that accepts
UserHandle and appId to get the computed uid.
Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I046546d2c5c76eac7a251e63e4234776975bf2bc
This change promotes DeviceStateManager to a TestApi and exposes three
additional methods:
- getSupportedStates: returns a list of state ids that can be used with
requestState().
- submitRequest: requests that the device enter the supplied state.
- cancelRequest: clears the current requested device state.
to be used initially in CTS tests.
Bug: 177235528
Bug: 177236115
Test: atest DeviceStateManagerServiceTest
Test: atest DeviceStateManagerGlobalTest
Change-Id: Ieae9208420ddecea641a5c44f1610d3cb7071b07
Listener is more secure as nobody can send a broadcast with invalid
digests.
Bug: 160605420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5f6ec3f0fa975d274d456d11d57be61d0b245e80
Added a new permission QUERY_USERS, granted the
new permission and MODIFY_USERS to shell.
These permissions are required to enable CTS
tests to access the following APIs:
* UserManager#getUsers and any other API that depend on it
* UserManager#getProfileParent
* UserManager#requestQuietModeEnabled
Test: Confirmed that a CTS test can call these APIs
Bug: 178695365
Merged-In: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
Change-Id: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
Added a new permission QUERY_USERS, granted the
new permission and MODIFY_USERS to shell.
These permissions are required to enable CTS
tests to access the following APIs:
* UserManager#getUsers and any other API that depend on it
* UserManager#getProfileParent
* UserManager#requestQuietModeEnabled
Test: Confirmed that a CTS test can call these APIs
Bug: 178695365
Change-Id: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
Removed broadcasts that were sent from the framework
to Managed Provisioning during DPM#createAndProvisionManagedProfile
and DPM#provisionFullyManagedDevice to handle system apps
snapshotting. This is no loger needed as Managed
Provisioning is directly applying that logic after calling the APIs.
Bug: 178478031
Test: N/A
Change-Id: Ic78828f3be05f154414f53c9c78915cf92341765
Added the capability to set default user settings and
default cross profile intent filters for different user
types in UserTypeDetails.
Also added default values for managed profiles.
The following is mostly copied from existing code in MP:
* DefaultCrossProfileIntentFilter class
* DefaultCrossProfileIntentFiltersUtils class
* setDefaultCrossProfileIntentFilters and
* resetDefaultCrossProfileIntentFilters in UserManagerService
NOTE REGARDING FILE HISTORY: Several classes moved from ManagedProvisioning
to the framework. There is a comment on this CL that points to an internal
link to the change history of these files in ManagedProvisioning.
Bug: 176973252
Test: atest UserManagerServiceUserTypeTest
Test: atest BundleUtilsTest
Test: atest UserRestrictionsUtilsTest
Test: atest com.android.server.pm.UserManagerTest
Test: atest UserManagerServiceTest
Test: atest com.android.server.devicepolice.DevicePolicyManagerTest
Change-Id: I3d4cbfcbcad6b6419c5306ae025d4cb9dca317ba
Completely deletes all the code for v1 of domain verification,
delegating everything to the new DomainVerificationService.
Exempt-From-Owner-Approval: Already approved by owners on main branch
Bug: 171251883
Test: none, removal of effectively dead code
Change-Id: Ib222ccd46019c1c28b402c0f68466077b62871c1
Contains the core SDK @SystemApi portion of the domain verification
APIs, including the state codes and get/set methods for package/user
state.
Set methods are gated by corresponding permissions, but get methods
were left available as general @SystemApi in case someone finds a use
case for them.
Adds a new exception which allows the manager to be more specific in
what caused a failure.
Exempt-From-Owner-Approval: Already approved by owners on main branch
Bug: 163565712
Test: none, just API interfaces, will be tested with implementation
Change-Id: I86802fe4b88a8a0f63a1798944c5d8c3a3bab09b
One for the domain verification agent package, one for the agent's
broadcast receiver, and one for Settings to mutate the user state.
Exempt-From-Owner-Approval: Already approved by owners on main branch
Bug: 163565712
Test: none, will be tested as part of implementation/enforcement
Change-Id: I680a495103ae1bc0c22695c38b3e9ad74ca47d8f
Eventually will be used to store state that's included as part of
com.android.server.pm.Settings.
Also adds equality and Kotlin index operator mutation support to
SparseArray, to improve ease of use.
Exempt-From-Owner-Approval: Already approved by owners on main branch
Bug: 163565712
CTS-Coverage-Bug: 179382047
Test: none, will be tested as part of follow up change
Change-Id: Ie4eca3a99633465337758ee165e07f35c8db87c8
Includes the request class sent to the verification agent and the 2
data classes returned by the to-be-added DomainVerificationManager.
Exempt-From-Owner-Approval: Already approved by owners on main branch
Bug: 163565712
CTS-Coverage-Bug: 179382047
Test: atest DomainVerificationCoreApiTest
Change-Id: If9f1b987f0d06c930f6c44b58af101b83947acb9
We renamed them to expedited jobs and the deprecated API is not being
used.
Bug: 171305774
Test: atest CtsJobSchedulerTestCases
Change-Id: I35dd6bf3c9188f621da49da7c9ed513d163afed8