Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script that
identifies relevant "include" directives.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
* changes:
Hand-migration to TypedXml interface.
Mechanically apply TypedXml refaster template.
Mechanical refactoring to new typed XML classes.
Additional hand-migration to TypedXml interface.
"Resolve" both human-readable and binary XML.
1. Adb backup is enabled by default for "android" package that corresponds to SystemBackupAgent (no change from current behavior)
2. System and privileged apps can use android.backup.ALLOW_ADB_BACKUP manifest property to enable / disable adb backup. Disabled by default.
3. Other apps can only use adb backup when running in debuggable mode.
Bug: 171032338
Test: 1. atest BackupEligibilityRulesTest
2.1. Run adb backup / restore for SystemBackupAgent and verify
success (running in system_server)
2.2. Run adb backup / restore for NexusLauncher with
"allowAdbBackup=true" and verify success (privileged app)
2.3. Run adb backup / restore for a non-privileged debuggable app
and verify success.
Change-Id: Ifefe6d888377d3ac9482928b27c86b2e562ad8fa
Introduce equals() method to PictureInPictureParams and RemoteAction.
Also makes a dup of PictureInPictureParams when filling task info to
avoid the same instance being updated later which will interfere
equality checks.
Bug: 174786192
Test: PIP on YouTube looks OK.
Change-Id: Ifd8534589d784719dfd5f9b37412ca8779a46983
1. In BroadcastOptions, create multiple temp allowlist types,
TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_ALLOWED is the default which
allows both DeviceIdleController temp allowlist behavior and FGS start
from background.
TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED
only allows DeviceIdleController temp allowlist behavior.
2. Create FgsStartTempAllowList class to contain the UIDs that is
temporarily allowed to start FGS from background.
Bug: 171305836
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testTempAllowListType
Change-Id: I32a14d675550cd262976bb8e16a48a070387d318
So we can figure out what package we failed to instantiate an app class
for.
Bug: 174771490
Test: N/A
Change-Id: I554138375ede9421ba053547bbc0250f3b2e812a
This is part of the feature to make managed account
provisioning use the admin-integrated flow.
We introduce EXTRA_PROVISIONING_SUPPORTED_MODES
which can be set to one of
SUPPORTED_MODES_ORGANIZATION_OWNED,
SUPPORTED_MODES_PERSONALLY_OWNED or
SUPPORTED_MODES_ORGANIZATION_AND_PERSONALLY_OWNED.
These allow the admin app to
choose between fully-managed device/
organization-owned work profile, personally-
owned work profile or all three respectively.
PROVISIONING_TRIGGER_MANAGED_ACCOUNT will be used
only for logging purposes and determining whether
to respect EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS.
PROVISIONING_MODE_MANAGED_PROFILE_ON_PERSONAL_DEVICE
is a new provisioning mode choice which the admin app
can choose, if allowed.
EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES is an
ArrayList<Integer> extra which will be sent to the
admin app. It will contain a list of the provisioning
modes from which the admin app can choose. If it chooses
a mode that is not part of that list, provisioning
will fail.
This CL also updates the javadoc for
EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS to state
more correctly the cases when the extra is respected.
This CL also deprecates
PROVISIONING_TRIGGER_PERSISTENT_DEVICE_OWNER as it is now
covered by the broader PROVISIONING_TRIGGER_MANAGED_ACCOUNT.
Bug: 167955145
Test: tests to be added in ManagedProvisioning
Test: compiled - only defining new constants
Change-Id: I6cc8581ce5e609155480bc6aeb04af0c800267cd
Default apps (browser, dialer and home) are by no means a concept of
permission, so they should not be exposed as permission
manager API. Instead, they should be accessed via role manager API.
This change moves getDefaultBrowser() and setDefaultBrowser()'s AIDL
interface and implementation into RoleManagerService. Package manager
has a number of special behaviors regarding these default apps, so we
can not pretend that package manager doesn't know about these
roles. After all, we can say permission and role are at the same level
in the system after recent refactoring that split permission and
package. So package manager is reusing the public role API now.
The new methods moved to RoleManagerService needs to be system APIs on
RoleManager, because IRoleManager cannot be a system API and we need
to delegate method calls to it from ApplicationPackageManager.
The other methods directly calling into DefaultPermissionGrantPolicy
should be moved/refactored as well, depending on whether we want to
mainline it, in a later change.
Bug: 158736025
Test: presubmit
Change-Id: I84b9519a084e410875a3c3e88b33e9a612e7de98
The method returns names of the packages that have access
to the key grouped by UID since grants are stored on per-uid
basis. This is expressed as Set<Set<String>>
Since Binder currently doesn't support sets or lists of lists,
this data structure is flattened into a list of strings, with
null values used as a delimiter.
Bug: 160457441
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest android.admin.cts.DevicePolicyManagerTest
Change-Id: Ieee1048b145fb8400eccbf32c054afc64b5d90c0
Previous changes have applied mechanical refactorings, but this change
hand-migrates the remaining logic which was too complex to identify.
This change should have no behavior change; famous last words.
Bug: 171832118
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I85cd830eb6bfde18fca6e73ee7adfdc385a890de
This CL focuses on the methods used by Activity and ActivityThread.
Also remove getUriPermissionOwnerForActivity, notifyActivityDrawn
notifyLaunchTaskBehindComplete notifyEnterAnimationComplete
because they are only used between ATMS and WMS.
Bug: 174041144
Bug: 174040691
Test: CtsWindowManagerDeviceTestCases
Change-Id: I5a30ec30cf6acd9ae4c908e524141fd17a4e54ff
Previously, we only applied the config changes to Resources if a public
fields are updated. After WM#getCurrent(Maximum)WindowMetrics were
released, we should also update WindowConfiguration changes to the
Resources because WindowMetrics#getBounds is provided by
WindowConfiguration fields.
This CL updates the window configuration to Resources if there are
differences between current & updated window configuration.
Bug: 169687278
Test: atest WindowMetricsOnActivityTests
Change-Id: I822204dab226d0acae2a0966b8ea05cf8f578b49
Currently, fonts are loaded in Zygote.
This CL adds a preparation to switch it to system server and
bindApplication(), so that system server will be able to update font map
at runtime.
(1) Zygote will be initialized without fonts.
(2) System server will maintain a serialized font map in ashmem.
(3) Apps will load font map from the ashmem in bindApplication().
The change is guarded by Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION,
and the new behavior is disabled by default.
I tested with ENABLE_LAZY_TYPEFACE_INITIALIZATION = true.
Bug: 172891184
Test: atest FrameworksCoreTests:TypefaceTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest CtsWidgetTestCases
Change-Id: I40832962a4b27f6160c4dc6268689c52f6a4dd33