This allows apps to specify the minimum versions they need
of extension sdks, and fails install if they aren't met.
There is additional work required to prevent local rollbacks
from triggering a downgrade of SDK versions after an install.
Bug: 137191822
Test: atest PackageParserTest
Exempt-From-Owner-Approval: PS4 was approved
Change-Id: If61ae6c67ceb752bec6876006a29e52b996901e7
Authorities defined in the manifest may support multiple authorities
split by the ';' character. This change adds support for this feature
when calculating visibility.
Bug: 145677500
Test: atest AppSecurityTests
Change-Id: Ifc2ff8ab95ce06502d9bf309c69ccd734526ef94
This allows apps to get the string used so they can properly instruct
the user on how to grant a background permission.
Test: Manual, multiple languages
Bug: 147440267
Change-Id: Ibdc6563e85cae930c25a9338513f747440fee8b4
Add public broadcast
CrossProfileApps#ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED =
"android.content.pm.action.CAN_INTERACT_ACROSS_PROFILES_CHANGED" and
hidden API CrossProfile#setInteractAcrossProfilesAppOp.
This new hidden API should be used rather than setting the app-op
directly. It ensures that the app-op is set for each user in the profile
group and that the new broadcast is sent when an app's ability to
interact across profiles has changed.
Unit tests are added alongside these changes. CTSVerifier changes should
be subsequently added to enforce the behaviour of the new public
broadcast.
Test: atest frameworks/base/services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose
BUG: 136249261
BUG: 147490565
Change-Id: Iad190a4b972da40bae7ffcf215b8962e8225f4af
Expose the initiating package's signing details.
Document that we return the details of the initiating package even if
it has been uninstalled, and under what circumstances we do so.
Test: atest PackageManagerTests PackageVerifierTest
Bug: 134746019
Bug: 146555198
Change-Id: I3a5799a804a955fc52269cfac7e45173f0c06e46
The service is already registered in ServiceManager. It needs to be
accessible from SystemServiceRegistry so that other mainline modules
can communicate with it.
Bug: 147255753
Test: Dependent CLs using the service
Change-Id: I940c62064466c3b3b8d2a195b810e90eaade7e6c
Merged-In: I940c62064466c3b3b8d2a195b810e90eaade7e6c
The service is already registered in ServiceManager. It needs to be
accessible from SystemServiceRegistry so that other mainline modules
can communicate with it.
Bug: 147255753
Test: Dependent CLs using the service
Change-Id: I940c62064466c3b3b8d2a195b810e90eaade7e6c
Overlays targeting shared libraries should be loaded into the
resources of every target that depends on the shared library.
Static shared libraries are currently not supported because overlays
should override all versions of static shared libraries and there is
not currently support for an overlay targeting multiple APKs.
Also created a test instrumentation and host test suite for testing
overlays and packages on the system image.
Bug: 140790224
Test: atest OverlayRemountedTest
Change-Id: I20a217b6368d6cf92b2b9f46908fd58012933f72
* changes:
Check if number of packages enabled for rollback is equal to number of sessions
Rollback user data of apks-in-apex while rolling back the apex
FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT is used by wifi mainline
module, promoting to a @SystemApi.
Bug: 147374337
Test: Compiles
Change-Id: Ib822706700533c0b79833504dad5c8d5253d5d55
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I6ab53570aca580fbee1fcc927871caa09780f58f
Merged-In: I6ab53570aca580fbee1fcc927871caa09780f58f
Creates intent to open the relevant settings page for the
user to enable/disable the INTERACT_ACROSS_PROFILES appop.
BUG: 140728653
BUG: 136249261
Test: atest CrossProfileAppsPermissionHostSideTest
Change-Id: Ia86ae5c8318190374ee73377b81cfade3b0e34c8
Currently, the RollbackManager is not aware of the apk-in-apex being
installed since the install is done by PM during scan phase of boot. As
such, RM does not backup the user data of the apk-in-apex.
In the new implementation, we ask the RM to snapshot/restore user data
of apk-in-apex while resuming the apex session in StagingManager.
Bug: 142712057
Test: atest StagedRollbackTest#testRollbackApexWithApk
Test: atest AppDataRollbackHelperTest
Test: atest RollbackStoreTest
Test: atest RollbackUnitTest
Change-Id: Ibbaa5d0c98cb883588c085d77bc89c3e8217d76a
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I6ab53570aca580fbee1fcc927871caa09780f58f
Merged-In: I6ab53570aca580fbee1fcc927871caa09780f58f
Add CrossProfileApps#canRequestInteractAcrossProfiles,
and CrossProfileApps#canInteractAcrossProfiles public APIs.
This provides apps the ability to check if they can interact across profiles,
or can they request that from the user if not.
BUG: 136249261
Test: in progress
Change-Id: Ifd561d5d5efcd167e24a5f05c22496d1fe9c81fc
Also, add RequiresPermission annotation for INTERACT_ACROSS_PROFILES
INTERACT_ACROSS_PROFILES should work as a replacement for INTERACT_ACROSS_USERS
for this API when binding to the caller package in some user of the same user
group as the caller, so we don't have to give privileged system components a
permission that is more powerful than is necessary.
BUG: 136249261
BUG: 138645036
Test: Build succeeds
Change-Id: I53c59ecc78a67ea9d324d60787d3b647b7251ea9