Commit Graph

19562 Commits

Author SHA1 Message Date
Meng Wang
2b6ef05476 Merge "Introduce new App Ops permission USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER" 2020-12-10 00:59:08 +00:00
Pavel Grafov
83eeb33c2f Merge "Add DPM.getKeyPairGrants()" 2020-12-09 13:38:48 +00:00
Meng Wang
dae8db3eb2 Introduce new App Ops permission USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER
Bug: 174263375
Test: `atest android.telephony.cts.TelephonyManagerTest#testTelephonyManager` pass on crosshatch
Change-Id: Ic0e919d953be0422bf78477b8de13691b25b6cc3
2020-12-08 15:33:12 -08:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
358f0d4fc8 Merge changes from topic "dec5" am: c2793cf12b am: 9af6ac78b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2776a545a24f007ccb4b9ee14705978571265ef3
2020-12-08 16:43:19 +00:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
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
2020-12-08 08:36:28 -07:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
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
2020-12-08 08:36:27 -07:00
Garfield Tan
8fac2df868 Merge "Use equals() to check equality of PictureInPictureParams." 2020-12-08 00:00:01 +00:00
Hui Yu
d033f30a7f Merge "Create multiple temp allowlist types." 2020-12-07 19:05:56 +00:00
Julia Reynolds
440447194f Merge "Stop writing approved pkgs to Settings" 2020-12-07 18:31:22 +00:00
TreeHugger Robot
7344dac2f3 Merge "Exposed some DPM members as @TestApi." 2020-12-07 17:16:46 +00:00
Ruslan Tkhakokhov
39ede62cbf Merge "Update eligibility rules for adb backup" 2020-12-07 14:10:38 +00:00
Xin Li
8836e88707 DO NOT MERGE - Merge RQ1A.201205.011
Bug: 172690556
Merged-In: I26bed08456197721d07f2fab563be0c54e43efd2
Change-Id: Ic1ac100efa50687ccfcbb87ee91a57703105afad
2020-12-07 00:39:42 -08:00
Jeff Sharkey
db4ae71beb Merge changes from topic "nov30"
* 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.
2020-12-04 21:32:44 +00:00
Ruslan Tkhakokhov
735cbd5ad0 Update eligibility rules for adb backup
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
2020-12-04 20:57:52 +00:00
Felipe Leme
f9718b4eb7 Exposed some DPM members as @TestApi.
Test: m update-api devicepolicy-deviceside-common
Test: atest \
      CtsDevicePolicyManagerTestCases:DeviceOwnerTest#testDevicePolicySafetyCheckerIntegration \
      CtsDevicePolicyManagerTestCases:ProfileOwnerTest#testDevicePolicySafetyCheckerIntegration

Bug: 172376923

Change-Id: I7dbcf357404dcfe030f3206d3a222315c7c164af
2020-12-04 12:01:22 -08:00
Garfield Tan
c5bb439560 Use equals() to check equality of PictureInPictureParams.
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
2020-12-04 11:01:47 -08:00
Brian Stack
c57e2123d4 Expose UwbManager through Context.getSystemService am: 3163bf0d35 am: 2557747c4d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I5213f04b2bf1f0db39a872ab7dd7f0d45fd60103
2020-12-04 18:00:40 +00:00
Hui Yu
cc8af26b01 Create multiple temp allowlist types.
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
2020-12-04 09:51:40 -08:00
Brian Stack
2557747c4d Expose UwbManager through Context.getSystemService am: 3163bf0d35
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I14aa423224f37447024ddb4cc67cabe06d60a30a
2020-12-04 17:39:49 +00:00
TreeHugger Robot
880a021528 Merge "Add packageName to instantiation exception log." 2020-12-04 17:35:03 +00:00
TreeHugger Robot
8541fd2e4a Merge "Add new constants for managed account provisioning" 2020-12-04 17:23:56 +00:00
Martijn Coenen
4b0734e958 Add packageName to instantiation exception log.
So we can figure out what package we failed to instantiate an app class
for.

Bug: 174771490
Test: N/A
Change-Id: I554138375ede9421ba053547bbc0250f3b2e812a
2020-12-04 16:44:20 +01:00
arangelov
639001ec61 Add new constants for managed account provisioning
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
2020-12-04 14:50:12 +00:00
TreeHugger Robot
41572fda62 Merge "Fix background color resolution" 2020-12-04 08:21:49 +00:00
Charles Chen
9cf5401794 Merge "Fix WindowMetrics not get updated when moving a freeform activity" 2020-12-04 07:27:13 +00:00
Lucas Dupin
7ec7eb0fc5 Fix background color resolution
Test: manual
Bug: 174729670
Change-Id: Ib9fe70ea4be0a4b56ba9a964b8a08f4e48ebbd52
2020-12-03 20:09:57 -08:00
TreeHugger Robot
4dbc1bcc81 Merge changes I42839dac,I84b9519a
* changes:
  Move CheckPermissionDelegate API into PermissionManagerServiceInternal.
  Move default app related methods to role manager.
2020-12-04 04:09:13 +00:00
Hai Zhang
9c0907c3b5 Move default app related methods to role manager.
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
2020-12-03 17:28:27 -08:00
Julia Reynolds
cf389e7343 Stop writing approved pkgs to Settings
Test: xts, cts verifier for flows for setting and unsetting
Bug: 172839851
Bug: 172839327
Change-Id: I8206e9ced3472b10c26349ddb4b2fffae1d190ca
2020-12-03 14:52:31 -05:00
Kweku Adams
b6a9683439 Merge "First version of HPJs." 2020-12-03 17:57:15 +00:00
Pavel Grafov
148e31d70c Add DPM.getKeyPairGrants()
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
2020-12-03 16:50:52 +00:00
Joanne Chung
45b88d5001 Merge "Update TEST_MAPPINGs for autofill test in Activity path" 2020-12-03 04:33:03 +00:00
TreeHugger Robot
29bca68828 Merge "Move activity client operations to a separate interface" 2020-12-03 02:25:01 +00:00
TreeHugger Robot
6095771fe5 Merge "Don't use serialized system font map if disabled." 2020-12-02 23:06:16 +00:00
Brian Stack
3163bf0d35 Expose UwbManager through Context.getSystemService
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I04c1263a191fcfeee5824be5d6d1944354819d02
Merged-In: I04c1263a191fcfeee5824be5d6d1944354819d02
2020-12-02 13:58:28 -08:00
TreeHugger Robot
1d2102b503 Merge "Expose UwbManager through Context.getSystemService" 2020-12-02 21:58:01 +00:00
Jeff Sharkey
a2c132d9c6 Hand-migration to TypedXml interface.
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
2020-12-02 13:55:35 -07:00
Kohsuke Yatoh
a9248444ac Don't use serialized system font map if disabled.
Bug: 174672300
Test: device boots
Change-Id: I6ec96f6d2629b082a87997e86960234fac65ca57
2020-12-02 12:39:14 -08:00
Lucas Dupin
485e78b4cb Merge "1/N The road to Material NEXT (bouncer and shade)" 2020-12-02 15:59:55 +00:00
Riddle Hsu
6d0979e211 Move activity client operations to a separate interface
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
2020-12-02 23:14:09 +08:00
Charles Chen
cac2f8a093 Fix WindowMetrics not get updated when moving a freeform activity
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
2020-12-02 20:51:34 +08:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Kohsuke Yatoh
ef091d3ff7 Merge "Prepare switching font loading to system server." 2020-12-02 07:14:27 +00:00
Brian Stack
7d47f2c4d8 Expose UwbManager through Context.getSystemService
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I04c1263a191fcfeee5824be5d6d1944354819d02
2020-12-01 20:10:01 -08:00
Joanne Chung
9a81afc907 Update TEST_MAPPINGs for autofill test in Activity path
Bug: 154961272
Test: atest --test-mapping frameworks/base/core/java/android/app/
Test: TreeHugger
Change-Id: I1a94438cdf475b8b24308f02d40e104edcbbbf32
2020-12-02 11:55:40 +08:00
Kohsuke Yatoh
b11b963ed1 Prepare switching font loading to system server.
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
2020-12-01 16:05:33 -08:00