This CL creates a new API PackageManager#mayPackageQuery for
applications that share details about other applications to
determine if those details should be withheld from callers
that do not otherwise have visibility of them.
Bug: 145916881
Test: atest AppEnumerationTests
Change-Id: I2dfba1169bce3d9fa88a75c92a22f53e1efe01b5
Moves all the PackageInfo/ApplicationInfo values into core SDK side
interfaces which represent all the mirrored functionality.
Creates AndroidPackageApi, PackageState, and a new PackageUserState
interface that act as the actual exposed interfaces for consumers like
mainline.
To avoid taking the PackageManagerService lock, and to avoid mutability
issues, PackageSettings are shallowly copied into PackageState objects.
And class PackageUserState objects into interface PackageUserState.
Eventually PackageSetting/class PackageUserState should be migrated to
the corresponding interfaces.
Miscellaneous additional changes:
- Removes PackageSetting#uidError, was never used
- Removes PackageUserState#categoryHint, was a package level field
without per-user difference, use PackageSetting#categoryHint instead
- Add locking to class PackageUserState overlay paths so they can be
copied for the new interface.
Bug: 173455397
Test: atest com.android.server.pm.ScanTests
Change-Id: Ib98c66a9b4d78d09151724eaf14c16074c3621c9
Cannot use both `{@docRoot}` and leading `/` when specifying URLs
Bug: 197663210
Change-Id: If6762b95a3d6991b4732684853d974a06da032bc
Test: make ds-docs
Exempt-from-Owner-Approval: Docs-only change
This CL adds the API to StatusBarManager, as well as the constants. It
also wires things into SystemUI so the API actually works as intended.
TODO:
* Rate limit requests (b/197534249)
Fixes: 197207978
Test: manual using test app
Test: atest SystemUITests
Change-Id: I2a9d18535fde1d77e9d6792bd45002ce04b49dab
We will use this new intent filter to determine which activities have opted-in to hub mode.
Test: locally on device`
Change-Id: I518763c7b43d60c7b90ea331895d2701ffd01139
Bug: 198325938
Whenever suspension conditions change, if there is a user-visible
suspension-related dialog, dismiss it to ensure the user is never
looking at stale information.
Bug: 169137795
Test: atest SuspendPackagesBroadcastTest#sendPackagesSuspendModifiedForUser
Test: manual (steps below)
-enable EBS, tap on suspended app to see dialog
-enable Focus mode, ensure dialog is dismissed
-tap on suspended app again to see relevent dialog,
disable Focus mode, ensure dialog is dismissed
-tap on suspended app again to see relevant dialog,
disable EBS, ensure dialog is dismissed correctly
-can permute enable/disable steps to further verify
Change-Id: Ib1650f910f7441498424ab4bc92185ce432ac405
An application can declare that it must be installed with a specific
split types using the manifest attribute "android:requiredSplitTypes".
Listing the required split types in this attribute, the application
can't be installed without these split types.
Bug: 189882156
Test: atest android.appsecurity.cts.SplitTests
Test: atest android.appsecurity.cts.IsolatedSplitsTests
Change-Id: Icf6cde57596fe0fdf9764ef0f1a3812da16ec5ff
In order to avoid unnecessary auto-boxing/unboxing, these fields to
primitive types in the parsed components.
Fix: 197579270
Test: atest -p core/java/android/content/pm \
services/core/java/com/android/server/pm
Change-Id: I91a61b38ccbb7242f12859d1db298c3262254a63
The test config takes longer than 900 seconds to run. Move it to a
dedicated group for running slow presubmit Test Mapping test.
Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.
Bug: 174654670
Bug: 174495337
Test: treehugger
Change-Id: Id9769bbc625b42257af603d69098ae69c0fabb80
With the change ag/15315839, explicit intents also have to match the
declared intent filters. The existing implementation of
resolveTypeIfNeeded() assumes all explicit intents will always be
delivered and will skip resolving types for content:// uris. Update the
implementation to only skip resolution if the intent is bound to the
same app it was created, or the caller is either root or the system.
Bug: 196573010
Test: atest CtsContentTestCases:PackageManagerTest
Change-Id: Ic3b51c68fd971422242db42af35e13f691d65c07
With the refactoring in ag/9507174, UserInfo.FLAG_DEMO is
deprecated, but ARC demo mode is still relying on it. This is
a temporary fix to keep ARC demo mode working. A proper fix will
be put in by b/179010471.
Bug: 178460880
Bug: 179010471
Test: UserManager.isDemoUser() returns true during ARC demo session.
Apps show demo mode behaviors.
Change-Id: I825d3e6c0a799005982372baa3fea5fa16c99fd2
(cherry picked from commit b652b79cb36166092063ff9df82e404129f67f3c)
(cherry picked from commit 3a72c3ec0bbc0a1dc41a8187c37504f3db4c1da1)
We need a mechanism to allow developers to opt-out of
shared UID without removing the android:sharedUserId
attribute to maintain compatibility with older Android
versions.
The developer can set the highest API level at which the
sharedUserId attribute will be recognized, analogous to
using maxSdkVersion in <uses-permission>.
Bug: 196261070
Test: build + flash + TH
Change-Id: I12d2bc0997d1291991b1289a7b0dda0d954f2bd2
See go/component-alias-prototype-overview for what it does.
This is disabled by default. Enable it via device config.
Test: atest ComponentAliasTests
Bug: 196254758
Change-Id: I2d177f6a475d878abbde55c3642c09da99dfea30
This cl creates a new API setComponentsEnabledSetting in PackageManager.
It accepts a list of component changes that applies them all atomically
in order to improve performance and minimize the risk of errors for the
applications.
Bug: 189883959
Test: atest PackageManagerTest
Change-Id: I64d9f46198e26e001e79ca9c198c26929adf8596