am fa956598: am 51f3b19c: am aef02104: Merge "Add IntentFilter auto verification - part 8" into mnc-dev
* commit 'fa95659833421c4faa2097310fe0523d37ef1185': Add IntentFilter auto verification - part 8
This commit is contained in:
@@ -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);
|
||||
@@ -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
|
||||
@@ -12744,13 +12744,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user