Merge "Instant app uninstallation fix."
This commit is contained in:
committed by
Android (Google) Code Review
commit
2981683fbf
@@ -222,8 +222,12 @@ final class DeletePackageHelper {
|
||||
deleteFlags | PackageManager.DELETE_CHATTY, info, true);
|
||||
}
|
||||
if (res && pkg != null) {
|
||||
final boolean packageInstalledForSomeUsers;
|
||||
synchronized (mPm.mLock) {
|
||||
packageInstalledForSomeUsers = mPm.mPackages.get(pkg.getPackageName()) != null;
|
||||
}
|
||||
mPm.mInstantAppRegistry.onPackageUninstalled(pkg, uninstalledPs,
|
||||
info.mRemovedUsers);
|
||||
info.mRemovedUsers, packageInstalledForSomeUsers);
|
||||
}
|
||||
synchronized (mPm.mLock) {
|
||||
if (res) {
|
||||
|
||||
@@ -444,14 +444,14 @@ public class InstantAppRegistry implements Watchable, Snappable {
|
||||
}
|
||||
|
||||
public void onPackageUninstalled(@NonNull AndroidPackage pkg, @NonNull PackageSetting ps,
|
||||
@NonNull int[] userIds) {
|
||||
@NonNull int[] userIds, boolean packageInstalledForSomeUsers) {
|
||||
if (ps == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
synchronized (mLock) {
|
||||
for (int userId : userIds) {
|
||||
if (ps.getInstalled(userId)) {
|
||||
if (packageInstalledForSomeUsers && ps.getInstalled(userId)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user