summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java15
-rw-r--r--services/core/java/com/android/server/pm/Settings.java11
2 files changed, 16 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index bf8c20c..2df4538 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -11743,6 +11743,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);
@@ -11773,7 +11774,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
@@ -12635,13 +12635,16 @@ 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());
- for (int oneUserId : sUserManager.getUserIds()) {
- scheduleWritePackageRestrictionsLocked(oneUserId);
+ if (mSettings.removeIntentFilterVerificationLPw(packageName,
+ sUserManager.getUserIds())) {
+ for (int oneUserId : sUserManager.getUserIds()) {
+ scheduleWritePackageRestrictionsLocked(oneUserId);
+ }
}
} else {
- mSettings.removeIntentFilterVerificationLPw(packageName, userId);
- scheduleWritePackageRestrictionsLocked(userId);
+ if (mSettings.removeIntentFilterVerificationLPw(packageName, userId)) {
+ scheduleWritePackageRestrictionsLocked(userId);
+ }
}
}
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index fb2b31a..eec1298 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -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) {