Introduces a UserProperties class, which holds (potentially dynamic)
information about each user, where the (default) values depend on the
user type.
This can usually be used instead of
isManagedProfile() calls, giving fine-grained information, rather than
course-grained queries about the user type.
The system copies this object before delivering it to any callers,
filtering the properties by the permissions held by the caller.
The object can be parsed from XML, which is used for both persisting a
user's properties to disk, as well as for reading in the default
properties for each user type.
Bug: 235065648
Bug: 237399048
Bug: 170249807
Bug: 234439331
Test: atest UserManagerServiceUserPropertiesTest
Test: atest android.multiuser.cts.UserManagerTest
Test: atest com.android.server.pm.UserManagerTest
Test: atest UserManagerServiceUserTypeTest
Change-Id: If37480abafa784ce197b482103b6537a60fe2653
The cameraserver has a need for attributing connect calls to particular
processes. This patch introduces pids as a property of an
AttributionSource.
Test: Smoke test on cuttlefish
Bug: 190657833
Bug: 199526514
Change-Id: I6cdffed62447bbb741290dd9c2e5937254d02e3c
We're defining a new compat framework change id that indicates whether a
given app should use the split screen aspect ratio.
Test: As manual testing use 'adb shell am compat disable/enable 208648326 <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'.
Fixes: 208648326
Change-Id: I0232d6d98b10e546b840c08ffbf6e7be9c465965
The commit 9c5a330 skips package checks if the package-equivalent
components are set. However, it could also result in inconsistent
behavior on #filterHashCode.
Fixing the original issue from the intent itself instead.
Bug: 64108432
Bug: 64789334
Test: atest TaskTests
Change-Id: I18c717e29072df91fb19eddbddc78153a28f9563
Making addCrossProfileIntentFilter and clearCrossProfileIntentFilters as
TestApis so that we can write CTS device side test cases to emulate
behaviour used by 3P apps or profile owners. This is to ensure that no
malicious user can add/remove filters by following access control rules.
Bug: 238019465
Test: atest CtsAppCloningDeviceTestCases
Change-Id: I4084826cbc63b1afc5569bd310be694b11202aee
Bug: 237309566
The maximum size of selected binder caches is increased to avoid
overflow. The overflow was found in a partner bug report.
The maximum size does not affect memory consumption until the cache
hits the limit, so caches that were not overflowing before will not
see increased memory consumption. Also, the caches that are affected
by this change are either static (one per process) or exist in just a
few intances per process, so the total memory impact is small.
Note that most of the overflows occurred in vendor processes.
Test: atest
* android.app.ApplicationPackageManagerTest
* com.android.server.pm.PackageManagerTests
* com.android.server.pm.PackageManagerServiceTest
* com.android.server.compat.PlatformCompatTest
* com.android.server.compat.CompatConfigTest
* android.app.compat.CompatChangesTest
* PlatformCompatGating
Change-Id: I7f60ad9008bf894d6cb967ce1a54ab33af650efc
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.
Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.
This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.
This is also a step to enable the client to perform local window layout.
Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
This adds a new permission flag, REQUESTED_PERMISSION_IMPLICIT, which
denotes that a permission is an implicitly-requested permission.
The concept of an implicit permission already existed (we just didn't
have a flag for it) and means that the permission acts as a "requested
permission" despite not being explicitly requested in the
AndroidManifest.xml as a <uses-permission>. For example, split
permissions result in implicit permissions, as well as a few unique
permissions.
Bug: 195016052
Test: atest ImplicitFlagTest
Change-Id: I5aaff487d653767b50fda7860d6fd0434a088dee
Considering the sequence has wrapped around if the sequence number has
a significant large jump. Obviously the original value (0x10000) is not
big enough nowadays.
Also taking the negative jump into account, where the wrap around may
happen on the `other` configuration.
Bug: 239371596
Test: ConfigurationTest
Change-Id: I8ac5ee8c1589b68e63e8e29f961c7fcba719949e
After the fix for b/222231605, permission pre-grants are no longer tied
to the package that provides ContentCaptureService, so this test API is
no longer needed. However the API is still referenced from GTS tests
(though it won't be invoked on T and above), so we need to keep the
method in the SDK to compile the test code.
Bug: 229662628
Test: Presubmit
Change-Id: Iddc201ba8afde816446377e509a3f2de35215f61
Bug: 216731966
Test: Compile and Test
Cherry-picked from tm-dev
Merged-In: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5
Change-Id: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5
The code that assigned target to min if min was not specified was
only checking for min codenames, but if the manifest specified a
numerical minSdkVersion, that is valid and would incorrectly prevent
the package from installing.
Bug: 237059024
Test: mts-tradefed > mts-eng-only -m ApkInApexTest
Change-Id: I3a2b9baa82ebb8ca9031c9fa128ce12bff17226e