The issue could be reproduced when the device defined an
overlay configuration file and an overlay package which
was in the configuration file also declared the required
system property in its manifest. The device works fine when
the required system property matches the corresponding
value on the device. But an IllegalStateException was thrown
from the system if it didn't match.
The root cause is that the package parser fails to parse the
overlay package if the required system property in the manifest
does not match the corresponding value on the device. It resulted
in the OverlayConfigParser could not find the package present
in the partition and throws the exception.
To resolve this issue, this CL skips the overlay configuration
if the package not found was caused by the system property
conditionon on the device.
Bug: 193422327
Test: atest OverlayConfigTest
Change-Id: I5650d796d92e3c4825b0d035e8e3b18f36d4cb47
checkUriPermissions is a new API added in Android S to check multiple
uri permissions via single API call.
However, checkUriPermissions is not working as intended for secondary
users. The root cause has been found and the fix is merged for later
releases.
Bug: 194700183
Test: atest --user-type secondary_user CtsScopedStorageDeviceOnlyTest:android.scopedstorage.cts.device.RedactUriDeviceTest#testSharedRedactedUri_openFileForRead
Change-Id: I72db7f0b4ddf97dce14880b6341799106d711c5c
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
Description: Replaced `Parcel.readList()` call with empty classLoader.
Calling `Parcel.readList(,null)` could be dangerous as an attacker can
abuse the call to deserialize arbitrary parcelables. To avoid such an
attack vector, we should switch in using `Parcel.readTypedList()`
instead.
Test: atest CtsInstantAppTests
Test: atest CtsWindowManagerDeviceTestCases:MultiWindowTests
Test: atest RemoteTransitionTest
Test: Boot and observe systemUI works
Bug: 195622897
Change-Id: I7c8cb23f6f3d26b1d4d47696e70982797b5f0210
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
The system is overwhelmed by an enormous label string returned by
the load label api. This cl truncates the label string if it exceeds
the maximum safe length.
Bug: 67013844
Test: atest PackageManagerTest
Change-Id: Ia4d768cc93a47cfb8b6f7c4b6dc73abd801809bd
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)