diff options
author | Nicolas Prevot <nprevot@google.com> | 2015-08-07 19:11:25 +0100 |
---|---|---|
committer | Nicolas Prevot <nprevot@google.com> | 2015-08-07 19:13:01 +0100 |
commit | b5ab2ffc213dbc976544ef6e0922d72d4fa241ff (patch) | |
tree | 5ca3247a40f093ee2fff57a2d5c000ec599f96d4 /services | |
parent | 375c792c176be43720da47db2cfced23613f537c (diff) | |
download | frameworks_base-b5ab2ffc213dbc976544ef6e0922d72d4fa241ff.zip frameworks_base-b5ab2ffc213dbc976544ef6e0922d72d4fa241ff.tar.gz frameworks_base-b5ab2ffc213dbc976544ef6e0922d72d4fa241ff.tar.bz2 |
Keep intent verification status of system apps when uninstalling them.
When creating a work profile, system apps are uninstalled and then
sometimes reinstalled.
In the process, they lose their intent verification status.
BUG:22943461
Change-Id:I5b008c6de2125f190063b08908076a649067c60d
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 11e30b5..4f945be 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -13054,7 +13054,8 @@ public class PackageManagerService extends IPackageManager.Stub { // they have set the special DELETE_SYSTEM_APP which requests different // semantics than normal for uninstalling system apps. if (DEBUG_REMOVE) Slog.d(TAG, "Only deleting for single user"); - ps.setUserState(user.getIdentifier(), + final int userId = user.getIdentifier(); + ps.setUserState(userId, COMPONENT_ENABLED_STATE_DEFAULT, false, //installed true, //stopped @@ -13062,7 +13063,7 @@ public class PackageManagerService extends IPackageManager.Stub { false, //hidden null, null, null, false, // blockUninstall - INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED, 0); + ps.readUserState(userId).domainVerificationStatus, 0); if (!isSystemApp(ps)) { if (ps.isAnyInstalled(sUserManager.getUserIds())) { // Other user still have this package installed, so all |