Commit Graph

20013 Commits

Author SHA1 Message Date
Jeff Sharkey
5a0c28dcf6 Merge "Add resource owners" am: d25ad6a116 am: 80382deadc am: 5195eb9abe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1580196

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8ac2127766ab9f24ab3110c08a94ebba25b4d00f
2021-02-08 17:50:22 +00:00
Jeff Sharkey
5195eb9abe Merge "Add resource owners" am: d25ad6a116 am: 80382deadc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1580196

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d3562d61b9a663a5911df18230867652d56ce51
2021-02-08 17:46:50 +00:00
Todd Kennedy
ce6c266d1a Add resource owners
Change-Id: I182d6b167ed33fa0d817e70c7811aa6a22840a69
2021-02-08 16:20:28 +00:00
Zimuzo Ezeozue
a0735849df Merge "Add AnrController to control ANR dialog delay" into sc-dev 2021-02-08 11:12:50 +00:00
Charles Chen
6e08c39554 Merge "Remove addWindowTokenWithOptions" into sc-dev 2021-02-07 03:14:57 +00:00
Eran Messeri
cb0bed367e Indicator for admin control over sensor permission grants
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
2021-02-06 21:13:45 +00:00
Charles Chen
b80fdde45f Remove addWindowTokenWithOptions
Since WindowContext won't add WindowToken from the client side,
addWindowTokenWithOption is no more needed. Also remove the logic
to invoke removeWindowToken from the client side.

Bug: 159767464
Bug: 153369119
Test: atest WindowManagerServiceTests WindowManagerPermissionTests
Change-Id: Ib0c948dca223cf8d056865ce3a0d4adaef07d247
2021-02-06 15:47:08 +08:00
Antoan Angelov
4c308df1b4 [RESTRICT AUTOMERGE] Revert "[RESTRICT AUTOMERGE] Remove DPMS#getProfileOwner in favor of getProfileOwnerAsUser" am: c6bda518da
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13462269

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia1a75f3468b7c316fb75dcfa2e270c73ee7a4553
2021-02-05 21:33:47 +00:00
Kholoud Mohamed
53fb73b912 Merge "Remove no longer needed broadcasts" into sc-dev 2021-02-05 17:53:19 +00:00
Kholoud Mohamed
28d66d71df Merge "Add user settings and intent filters to userTypeDetails" into sc-dev 2021-02-05 17:53:19 +00:00
TreeHugger Robot
1ac8aa5aa4 Merge "Changing IntentSender to become a listener." into sc-dev 2021-02-05 17:27:10 +00:00
Zim
ebede9715f Add AnrController to control ANR dialog delay
This will be used in subsequent cls to allow the StorageManagerService
delay the ANR dialog for an app undergoing transcoding at the time of
ANR

Test: Manual
Bug: 170486601
Change-Id: I5431d22bd8faa75e3deab1960a2f721784f98d42
2021-02-05 15:05:57 +00:00
Ruslan Tkhakokhov
9e8fef20a7 Merge "Refactor XML config parsing" into sc-dev 2021-02-05 13:29:11 +00:00
Antoan Angelov
c6bda518da [RESTRICT AUTOMERGE] Revert "[RESTRICT AUTOMERGE] Remove DPMS#getProfileOwner in favor of getProfileOwnerAsUser"
This reverts commit 10f79644fc.

Reason for revert: Explained in b/153995973#comment40

Bug: 153995973

Change-Id: I437400528cb98e9ce665ebc308bfe05f4f24ca13
2021-02-05 11:59:48 +00:00
Issei Suzuki
c6fa4e9892 Merge "Fix flicker when starting an activity from Recents." into sc-dev 2021-02-05 11:10:57 +00:00
Charles Chen
582247eef0 Merge changes from topic "window_context_2.0" into sc-dev
* changes:
  Apply WindowContext 2.0 for InputMethodMenuController
  Migrate WindowContext to WindowContextListener mechanism
2021-02-05 04:53:09 +00:00
Alex Buynytskyy
6f80c512a4 Changing IntentSender to become a listener.
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
2021-02-05 00:16:51 +00:00
Ruslan Tkhakokhov
343f126917 Refactor XML config parsing
Do a small refactor of include / exclude rules parsing. In a follow-up
CL we will introduce the logic that parses the new include / exclude
config format. To ensure some of the code can be reused, this CL
extracts parts of parseBackupSchemeFromXmlLocked() function into
separate functions.

Test: atest FullBackupTest
Bug: 174216309
Change-Id: I01e6bcfe4b772f35ece4b8cb21b2e003c28ae55c
2021-02-04 23:16:30 +00:00
Chris Li
cab4131e77 Merge "Allow non-resizable apps in split-screen (9/n)" into sc-dev 2021-02-04 19:40:51 +00:00
Kholoud Mohamed
352849ccbe Remove no longer needed broadcasts
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
2021-02-04 19:35:39 +00:00
Kholoud Mohamed
b2d15371a1 Add user settings and intent filters to userTypeDetails
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
2021-02-04 19:15:39 +00:00
Winson
ee612e99fe Address domain verification API comments
Changes package to pm.verify.domain, removes throwing InvalidDomainSet,
cleans up permissions, and renames DomainVerificationSet ->
DomainVerificationInfo.

Bug: 163565712
CTS-Coverage-Bug: 179382047

Test: atest com.android.server.pm.test.verify.domain

Change-Id: I5d60c227f0e529fe27c1844ada97716933a533b0
2021-02-04 10:27:01 -08:00
Winson
dd04535e9b Wire up DomainVerificationService to PackageManagerService
Sets up the callback and the actual service initialization so that
future domain verification changes can access PackageManager APIs.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 163565712

Test: none, device boots, tested implicitly as part of other changes

Change-Id: Ie75ad0ee002ae92c21387777ff41c2504c69b836
2021-02-04 10:26:58 -08:00
Felipe Leme
4af8d82444 Merge "New device policy API: UnsafeStateException.getReason()." into sc-dev 2021-02-04 16:36:43 +00:00
Makoto Onuki
2cfefc694b Merge "Move the "whitelist type" constants to PowerWhitelistManager." into sc-dev 2021-02-04 16:26:41 +00:00
TreeHugger Robot
d61ce319d4 Merge "Add metrics for the PO and DO provisioning APIs" into sc-dev 2021-02-04 15:37:26 +00:00
Charles Chen
9854a1e315 Migrate WindowContext to WindowContextListener mechanism
1. Use registerWindowContextListener instead of
   addWindowTokenWithOptions
2. Clean up the logic of sending the config to the client in WindowToken
3. Add a mechanism in WMS#addWindow, when a WindowContext adds a view,
   the server side will switch to register the WindowToken for the
   WindowContext.

In this way, we won't add a WindowToken until adding the fist view.
Also, we could apply an existing window token by overriding
WindowManager.LayoutParams.token.

Bug: 159767464
Bug: 153369119
Test: atest WindowContextTests WindowContextPolicyTests
Test: atest WindowContextTest
Test: atest WindowContextListenerControllerTests

Change-Id: I2396187c445306d18101706c4521edd9cf92facf
2021-02-04 23:27:03 +08:00
kholoud mohamed
2aade76a45 Add metrics for the PO and DO provisioning APIs
Added metrics for DPM#provisionFullyManagedDevice and
DPM#createAndProvisionManagedProfile, these metrics map
to the previously logged metrics in MP.

Test: Verified manually that the metrics are being reported.
Bug: 178458861
Change-Id: Ib950b511f8ca1200c56181ac51c906370279d212
2021-02-04 10:58:48 +00:00
TreeHugger Robot
f1aaec7b4b Merge "API: Suppress existing NullableCollections lints (S edition, die zweite)" into sc-dev 2021-02-04 09:04:23 +00:00
Remi NGUYEN VAN
5ab2994cf5 Merge "Use formal API for ActivityThread to set proxy" into sc-dev 2021-02-04 02:44:38 +00:00
Makoto Onuki
01f023a499 Move the "whitelist type" constants to PowerWhitelistManager.
And also rename them.

Fix: 179276056
Test: Build / treehugger
Change-Id: I7b794eb0c638d3fc00ad5b40d3b24c7f2ff5241b
2021-02-03 14:25:33 -08:00
Issei Suzuki
8bc3db2b30 Fix flicker when starting an activity from Recents.
In the task switcher, a user can choose a task by tapping or pulling
down the task image.

In the later case, the task image already occupies the full screen, so
the launcher suppresses an app transition animation by calling
ActivityOptions#makeCustomAnimation. However, due to task animation
lockdown, this API has no effect when the task opens or closes (the API
still works as expected when an activity starts within a same task).

The new API ActivityOptions#makeCustomTaskAnimation lets us to customize
an animation to run when the task opens or closes.

Test: atest ActivityTransitionTests
Bug: 170251468
Change-Id: I445e64fdbf6be2d4fdf1936844bcd27dbdf8d69a
2021-02-03 22:22:32 +01:00
Adrian Roos
17e3e829bf API: Suppress existing NullableCollections lints (S edition, die zweite)
Bug: 152525509
Test: make checkapi
Change-Id: Ia8cc585c6815c7b641ed3603862042eef70c369f
2021-02-03 19:34:54 +01:00
Mariia Sandrikova
546983419c Merge "Configurable letterbox background." into sc-dev 2021-02-03 11:50:38 +00:00
Junyu Lai
91d89b4880 Merge "[FUI21] Move scrubSubscriberId to utils class" am: f6c7f61d27 am: f0b03b1763 am: 582c042052
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565195

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If957a1c5017ab9600bbdece527543885a17ed2aa
2021-02-03 10:25:20 +00:00
Junyu Lai
582c042052 Merge "[FUI21] Move scrubSubscriberId to utils class" am: f6c7f61d27 am: f0b03b1763
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565195

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I59c31da9c2ba69ee74cbf64e3af42331e9b7bfca
2021-02-03 10:10:22 +00:00
Junyu Lai
f6c7f61d27 Merge "[FUI21] Move scrubSubscriberId to utils class" 2021-02-03 08:52:17 +00:00
TreeHugger Robot
e51a931cd2 Merge "Cache permission policy" into sc-dev 2021-02-03 06:41:02 +00:00
Riddle Hsu
6ab44a81d6 Merge "Restore overridePendingTransition to a sync binder call" into sc-dev 2021-02-03 03:05:20 +00:00
Chris Li
7dfa7106a9 Allow non-resizable apps in split-screen (9/n)
Cleanup SizeCompatModeActivityController

Bug: 176061101
Bug: 178327644
Test: pass existing
Change-Id: If4bb5e082976725b80bda5a95880a24201b6c595
2021-02-02 18:00:35 -08:00
Remi NGUYEN VAN
a26ffd97ee Use formal API for ActivityThread to set proxy
Add getProxyForNetwork to the public API, and use ConnectivityManager
APIs from ActivityThread (instead of hidden APIs) to get/set the proxy
for an app process.

getProxyForNetwork allows clients to find which proxy applies, which can
be a global proxy setting or a per-network proxy.

The default proxy is now initialized with getDefaultProxy instead of
getProxyForNetwork(null); this should not make a difference, as nothing
should have called bindProcessToNetwork at that point yet.

Bug: 174436414
Test: m; device boots
Change-Id: Ifb516194ecde1567cea4b6806946091cdcf2f015
2021-02-03 10:19:25 +09:00
TreeHugger Robot
5e1f9a630b Merge "Pass in split permissions to ParsingPackageUtils." into sc-dev 2021-02-03 00:34:44 +00:00
Chris Li
ee21983ae0 Merge "Allow non-resizable apps in split-screen (7/n)" into sc-dev 2021-02-03 00:24:54 +00:00
Mariia Sandrikova
c0f663fd35 Configurable letterbox background.
Allow three types of the letterbox wallpaper:
- Solid background using color specified in R.color.config_letterboxBackgroundColorSolid color
- Color specified in R.attr.colorBackground for the letterboxed application
- Color specified in R.attr.colorBackgroundFloating for the letterboxed application

Also, adding ADB commands for each config value:
- adb shell cmd window set-letterbox-background-color [reset|color]
- adb shell cmd window get-letterbox-background-color
- adb shell cmd window set-letterbox-background-type [reset|solid_color|app_color_background|app_color_background_floating]
- adb shell cmd window get-letterbox-background-type

Test: manual with ADB commands, atest LetterboxTest
Fix: 179088234
Change-Id: I23cf0b52c9f95d1f92255731bc7be165a575c7cd
2021-02-02 23:54:25 +00:00
TreeHugger Robot
e7a937b035 Merge "Clean up split system user code for device policy management" into sc-dev 2021-02-02 21:56:08 +00:00
Shashwat Razdan
ae26632fa2 Merge "Adding owners in smartspace packages" am: 10603d5102 am: 6bef558283 am: 5a53f7c676
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1570760

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ideffda52245794487ac6289f4046b88aab941e93
2021-02-02 21:52:24 +00:00
Shashwat Razdan
5a53f7c676 Merge "Adding owners in smartspace packages" am: 10603d5102 am: 6bef558283
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1570760

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9670927375fa2cbb52a8d7114b41d9475dcc7b7e
2021-02-02 21:02:27 +00:00
Chris Li
98d2d06106 Allow non-resizable apps in split-screen (7/n)
Add interface for SizeCompatUIController in WM shell to use
when refactoring SizeCompatModeActivityController from system UI.

Bug: 176061101
Bug: 178327644
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I37f72396e1769b7773722be6575506fc430b2739
2021-02-02 12:50:28 -08:00
Hai Zhang
f61f4fb849 Pass in split permissions to ParsingPackageUtils.
Similar to passing in display metrics. We can use
ActivityThread.currentApplication() as the context for getting
PermissionManager in system server process because it will be created
early in ActivityThread.attach() before any custom logic can run, but
it becomes a problem for apps because they can run their own logic by
overriding Application.attachBaseContext() and do things there before
ActivityThread.currentApplication() becomes non-null.

So pass in the split permissions explicitly as an external dependency
for ParsingPackageUtils, and move the getPackageArchiveInfo()
implementation from PackageManager to ApplicationPackageManager to
utilize the context there. PackageParser2 can get the split
permissions internally because it's only used in system server.

Fixes: 178155985
Test: manual
Change-Id: I8213cf752e16b08328ad1150b2639da18c5d0e83
(cherry picked from commit 7b8974d375)
2021-02-02 11:42:40 -08:00
TreeHugger Robot
b23f6d71ee Merge "Move GameManager to android.app package." into sc-dev 2021-02-02 19:36:13 +00:00