Loading services/core/java/com/android/server/pm/PackageManagerService.java +9 −6 Original line number Diff line number Diff line Loading @@ -11853,6 +11853,7 @@ public class PackageManagerService extends IPackageManager.Stub { synchronized (mPackages) { if (deletedPs != null) { if ((flags&PackageManager.DELETE_KEEP_DATA) == 0) { clearIntentFilterVerificationsLPw(deletedPs.name, UserHandle.USER_ALL); if (outInfo != null) { mSettings.mKeySetManagerService.removeAppKeySetDataLPw(packageName); outInfo.removedAppId = mSettings.removePackageLPw(packageName); Loading Loading @@ -11883,7 +11884,6 @@ public class PackageManagerService extends IPackageManager.Stub { } } clearPackagePreferredActivitiesLPw(deletedPs.name, UserHandle.USER_ALL); clearIntentFilterVerificationsLPw(deletedPs.name, UserHandle.USER_ALL); } // make sure to preserve per-user disabled state if this removal was just // a downgrade of a system app to the factory package Loading Loading @@ -12744,15 +12744,18 @@ public class PackageManagerService extends IPackageManager.Stub { /** This method takes a specific user id as well as UserHandle.USER_ALL. */ void clearIntentFilterVerificationsLPw(String packageName, int userId) { if (userId == UserHandle.USER_ALL) { mSettings.removeIntentFilterVerificationLPw(packageName, sUserManager.getUserIds()); if (mSettings.removeIntentFilterVerificationLPw(packageName, sUserManager.getUserIds())) { for (int oneUserId : sUserManager.getUserIds()) { scheduleWritePackageRestrictionsLocked(oneUserId); } } } else { mSettings.removeIntentFilterVerificationLPw(packageName, userId); if (mSettings.removeIntentFilterVerificationLPw(packageName, userId)) { scheduleWritePackageRestrictionsLocked(userId); } } } @Override public void resetPreferredActivities(int userId) { services/core/java/com/android/server/pm/Settings.java +7 −4 Original line number Diff line number Diff line Loading @@ -1067,19 +1067,22 @@ final class Settings { return result; } void removeIntentFilterVerificationLPw(String packageName, int userId) { boolean removeIntentFilterVerificationLPw(String packageName, int userId) { PackageSetting ps = mPackages.get(packageName); if (ps == null) { Slog.w(PackageManagerService.TAG, "No package known for name: " + packageName); return; return false; } ps.clearDomainVerificationStatusForUser(userId); return true; } void removeIntentFilterVerificationLPw(String packageName, int[] userIds) { boolean removeIntentFilterVerificationLPw(String packageName, int[] userIds) { boolean result = false; for (int userId : userIds) { removeIntentFilterVerificationLPw(packageName, userId); result |= removeIntentFilterVerificationLPw(packageName, userId); } return result; } boolean setDefaultBrowserPackageNameLPr(String packageName, int userId) { Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +9 −6 Original line number Diff line number Diff line Loading @@ -11853,6 +11853,7 @@ public class PackageManagerService extends IPackageManager.Stub { synchronized (mPackages) { if (deletedPs != null) { if ((flags&PackageManager.DELETE_KEEP_DATA) == 0) { clearIntentFilterVerificationsLPw(deletedPs.name, UserHandle.USER_ALL); if (outInfo != null) { mSettings.mKeySetManagerService.removeAppKeySetDataLPw(packageName); outInfo.removedAppId = mSettings.removePackageLPw(packageName); Loading Loading @@ -11883,7 +11884,6 @@ public class PackageManagerService extends IPackageManager.Stub { } } clearPackagePreferredActivitiesLPw(deletedPs.name, UserHandle.USER_ALL); clearIntentFilterVerificationsLPw(deletedPs.name, UserHandle.USER_ALL); } // make sure to preserve per-user disabled state if this removal was just // a downgrade of a system app to the factory package Loading Loading @@ -12744,15 +12744,18 @@ public class PackageManagerService extends IPackageManager.Stub { /** This method takes a specific user id as well as UserHandle.USER_ALL. */ void clearIntentFilterVerificationsLPw(String packageName, int userId) { if (userId == UserHandle.USER_ALL) { mSettings.removeIntentFilterVerificationLPw(packageName, sUserManager.getUserIds()); if (mSettings.removeIntentFilterVerificationLPw(packageName, sUserManager.getUserIds())) { for (int oneUserId : sUserManager.getUserIds()) { scheduleWritePackageRestrictionsLocked(oneUserId); } } } else { mSettings.removeIntentFilterVerificationLPw(packageName, userId); if (mSettings.removeIntentFilterVerificationLPw(packageName, userId)) { scheduleWritePackageRestrictionsLocked(userId); } } } @Override public void resetPreferredActivities(int userId) {
services/core/java/com/android/server/pm/Settings.java +7 −4 Original line number Diff line number Diff line Loading @@ -1067,19 +1067,22 @@ final class Settings { return result; } void removeIntentFilterVerificationLPw(String packageName, int userId) { boolean removeIntentFilterVerificationLPw(String packageName, int userId) { PackageSetting ps = mPackages.get(packageName); if (ps == null) { Slog.w(PackageManagerService.TAG, "No package known for name: " + packageName); return; return false; } ps.clearDomainVerificationStatusForUser(userId); return true; } void removeIntentFilterVerificationLPw(String packageName, int[] userIds) { boolean removeIntentFilterVerificationLPw(String packageName, int[] userIds) { boolean result = false; for (int userId : userIds) { removeIntentFilterVerificationLPw(packageName, userId); result |= removeIntentFilterVerificationLPw(packageName, userId); } return result; } boolean setDefaultBrowserPackageNameLPr(String packageName, int userId) { Loading