Adding a user property to dictate the behaviour to redirect
the contact calls to the parent user profile, thereby using
the parent's contacts database to serve its calls
Bug: 253004929
Test: atest UserManagerServiceUserPropertiesTest
Change-Id: Ifc81c067893aceab3afd8bf20fb7d931e3a529f9
- We need to add this action in the platform so that WearOS can also handle it, not only SysUi.
- Add tests for MediaOutputDialogReceiver class.
- Add android:priority=1 to the MediaOutputDialogReceiver so that it's always the default handler for the action.
Bug: 246997969
Test: atest MediaOutputDialogReceiverTest
Change-Id: I25d60eef7d4170b5f0b748b9b61ebf043a7c189c
Using separate locks adds a little bit of overhead to the get method.
Switch to a single lock to minimize the performance cost.
Also add a control flag to disable caching in the future, if so desired.
Bug: 257054989
Test: atest CorePerfTests:AccountManagerPerfTest
Change-Id: I5bbcc54f28cbe3c434995af8b3452debfc68c4ee
PermissionInfo.PROTECTION_FLAG_KNOWN_SIGNER is already @SystemApi, and
we need system API for accessing the actual certs in the modularized
permission subsystem.
The copy constructor missed knownCerts in ag/13504004 and is fixed now.
knownCerts isn't deep copied in the copy constructor because
PackageItemInfo.metaData isn't deep copied either.
Bug: 182523293
Test: atest CtsContentTestCases:PermissionInfoTest
Change-Id: I784764fdf7238f6b10455ff40c693de0823a94cb
Indicates whether and how user restrictions and device policies to be
inherited from parent profile.
Bug: 251401809
Test: atest UserManagerServiceUserPropertiesTest
Test: atest android.multiuser.cts.UserManagerTest
Test: atest com.android.server.pm.UserManagerTest
Change-Id: I899804813fbb2ad6c007600a14ce91cee89e7d88
Indicates whether apps in the given user profile should be displayed
with either parent, separately or not at all.
Bug: 235065648
Test: atest UserManagerServiceUserPropertiesTest
Test: atest android.multiuser.cts.UserManagerTest
Test: atest com.android.server.pm.UserManagerTest
Change-Id: I17e127cab37c11f806b535ab29762dd2a99716a5
The method UserHandle.getAppId() strips off the part of the Uid that is related to the current user (which may not be zero for multiuser).
Bug: 236100828
Change-Id: Ie27c8570ba2551b6d99d9848a0b2469fe76ac3d1
https://xkcd.com/927/
Many different components have created their own classes to represent a
userID+packageName combination. This means 1) duplicate code, 2)
duplicate objects in memory representing the same thing. Creating a
common class that limits itself to one object per userID+packageName
combo addresses those two concerns.
There are still others with similar classes. They're not included in
this CL because they have slight differences and would require a little
bit more work to consolidate.
Bug: 141645789
Bug: 247127880
Test: atest CtsAccountManagerTestCases
Test: atest CtsContentTestCases:OverlayManagerTest
Test: atest CtsShortcutManagerTestCases
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/tare
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/om
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/pm
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/tare
Test: atest FrameworksMockingServicesTests:PrefetchControllerTest
Test: atest FrameworksMockingServicesTests:QuotaControllerTest
Change-Id: I63d5bc946cc7b24a0536e8b2051da07a801b3a8a
The BackgroundInstallControlService monitors background installed apps.
It can provide the list of those apps to the service clients via binder.
See the following desgin doc and PRD for more details.
go/bg-install-control
go/BIC-prd
Bug: 244216300
Test: manual test (verify the binder service is published)
Change-Id: Ic45770061c1291ef3e650337514fca99e0c683b8
Address the feedback of API review, and change the return type
to CharSequence.
Bug: 255592779
Test: atest CtsContentTestCases:PreapprovalDetailsTest
Test: atest CtsPackageInstallTestCases:PreapprovalInstallTest
Change-Id: I777d54e8b9614f87c8a899c49ea476792ca8c515
getUserPropertiesCopy should use the standard way of querying whether a
caller has Query or Manage users permission. In particular, a caller
that has Manage should be treated as though it has Query as well, which
this cl will ensure. Some variable names and comments are updated to
make this clearer.
Test: atest UserManagerServiceUserPropertiesTest
Change-Id: I6ba312b27e6ab47498a03ecac6c1ffd6f60442e8
A subsequent change will actually move the files to the other git
project.
Bug: 243194720
Test: presubmit
Change-Id: If126bb68f74852528c4da8df79831b49b5129983
In case we decide not to provide pre-approval request to installer
for some reason (e.g., feature off), we need a way to disable this,
and let callers know the typical flow will be needed instead.
Bug: 242677131
Test: atest CtsPackageInstallTestCases:PreapprovalInstallTest
Change-Id: I42dead8044597238588dcf55ddd7d617ac21f671
This extra can be used to indicate that a ClipData comes from a
separate device rather than being local. It is a rendering hint
that can be used to take different behavior based on the source
device of copied data.
Bug: 246808749
Test: manual (no behavior change)
Change-Id: I6998b7a216fac73a1387367f4179efb95d7562c5
* changes:
Add deviceId to Context and allow for creating Contexts with different deviceId.
Open the visibility of VirtualDeviceManager and VirtualDeviceManager#getVirtualDevices.
Add an API to get the details of all virtual devices.
Applications may create contexts associated with the default host device or with any virtual device. The only way to create a non-default device context for now is via an explcit createDeviceContext call.
Bug: 239152561
Test: atest FrameworksCoreTests:ContextTest
Change-Id: If18dc7661fb232b0bc40121c723673ba880be9d5
To deliver a "resultTo" listener for a broadcast intent, we need to
know about the ProcessRecord we're returning the result to, so that
we can potentially unfreeze them and sequence the response through
their main thread.
Also offer to lookup the "system_server" process when the caller
provides an in-process resultTo instance; this smoothly handles
dozens of situations where the system sends broadcasts without
having easy access to its own ProcessRecord.
Bug: 251486235
Test: manual
Change-Id: I1ff58a0e918b620def25a056624f093d951667a6
Migrates getDefaultVrComponents used by SettingsProvider and
adds a flag for hidden API enforcement to ApplicationInfo.
This removes any dependency on SystemConfig from core/ and
so it can be moved into services/core and exposed as a
mainline API.
This was done instead of exposing all of the methods through
SystemConfigManager, as that is designed for use across
processes, and it's more efficient to expose SystemConfig
directly for modules running in the server process.
Although VrManager is a nullable service, so getDefaultVrComponents
had to live there to simplify the logic and maintain the existing
behavior.
Bug: 236389629
Change-Id: I4c2b14e1d34aaf439ceb1a3f9c8207e5d39fa6c2
Defines a new PermissionEnforcer class used to check permission as part
of the @EnforcePermission AIDL annotation. It is registered as a system
service to avoid the cost of creating a new object for each new client.
Bug: 234083358
Test: TH
Change-Id: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
Some apps keep adding the same resources to their theme key
objects on e.g. switching dark mode. Need to be prepared to
limit the size of the arrays, otherwise theme switching gets
slower with each toggle
+ a bit more efficient native handling
Bug: 242005877
Test: manual, 10k of theme switches with no noticable slowdown
Change-Id: Icf74770bd41ebeb0a31f527ae3616de00f23b0ae
Previously two AssetFileDescriptors pointing to the same file could be
using the same underlying file descriptor and reading from both would
provide unexpected results since they would both modify the file offset
in the kernel data structure.
Test: Added testTwoFileDescriptorsWorkIndependently() to
android.content.res.cts.AssetFileDescriptor_AutoCloseInputStreamTest
Test: atest AssetFileDescriptor_AutoCloseInputStreamTest
Fix: 168310122
Change-Id: Ibf3c9ff0207544e3b227511aae93c8f4ddf52867
Override getChannel() in AssetFileDescriptor.AutoCloseInputStream
Previous fix do not have getChannel() handled which caused issues. This
is to override getChannel().
Test: Added testGetChannel() to
android.content.res.cts.AssetFileDescriptor_AutoCloseInputStreamTest
Test: atest AssetFileDescriptor_AutoCloseInputStreamTest
Bug: 168310122
Change-Id: I472655c91491fd33ef0c2631d94fc0b8d0328404
Adding OffsetCorrectFileChannel help to correct offset
Test: Added testGetChannel() to
android.content.res.cts.AssetFileDescriptor_AutoCloseInputStreamTest
Test: atest AssetFileDescriptor_AutoCloseInputStreamTest
Bug: 168310122
Change-Id: I9ed584ac795cabbed6a4e297c61c224233b9575c
This was separated out to make review easier. Applies @SystemApi
to expose a subset of PackageState and its child type APIs.
Bug: 235462722
Bug: 246609797
Bug: 244444049
Bug: 229089418
Bug: 229090204
Bug: 229090094
Test: presubmit
Change-Id: Ifc0ee3584347a79fbb0e7815d42bac6d2c2f3a4a