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
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
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
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
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
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
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
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
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
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
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)
Since the Permission Controller calls into DPM, to avoid a potential
circular dependency (where the DPMS holds a lock while the Permission
Controller calls it), cache the permission policy.
Bug: 158735247
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegation com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegation
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testPermissionAppUpdate com.android.cts.devicepolicy.MixedProfileOwnerTest#testPermissionPolicy com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPermissionAppUpdate com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPermissionPolicy com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionAppUpdate com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionPolicy
Change-Id: I6cfc027b063f43053d1ff4cc42d37935491064ff
This patch also removes the functionality of returning
original subscriberId in eng build since it is not really useful.
Test: atest NetworkIdentityUtilsTest
Bug: 174123988
Change-Id: I721457e571aa9403a2200b3e4261b4895e4f7a3e
Otherwise the calling activity is not blocked and can proceed
to change activity state, that may cause the override request
to be dropped. In addition, it is usually called after
startActivity and finish which are non-one-way binder calls.
The order also needs to be guaranteed to make the override
take effect.
Bug: 161781274
Bug: 179008865
Test: WindowUntrustedTouchTest# \
testWhenExitAnimationAboveThresholdFromSameUid_allowsTouch
Change-Id: I7ca018a934972c195040f2a9f63a18a59dce9c48