Skip to content

Commit c1d07d9

Browse files
author
Suchi Amalapurapu
committed
Fix 2656989. Clean up update to updated system applications.
Change-Id: Ic66b00926c45fac43396f1f8f23d0865ba77faba
1 parent a69e10d commit c1d07d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

services/java/com/android/server/PackageManagerService.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5780,6 +5780,18 @@ private void replaceSystemPackageLI(PackageParser.Package deletedPackage,
57805780
}
57815781
mSettings.writeLP();
57825782
}
5783+
} else {
5784+
// If this is an update to an existing update, setup
5785+
// to remove the existing update.
5786+
synchronized (mPackages) {
5787+
PackageSetting ps = mSettings.getDisabledSystemPkg(packageName);
5788+
if (ps != null && ps.codePathString != null &&
5789+
!ps.codePathString.equals(oldPkgSetting.codePathString)) {
5790+
int installFlags = 0;
5791+
res.removedInfo.args = createInstallArgs(0, oldPkgSetting.codePathString,
5792+
oldPkgSetting.resourcePathString);
5793+
}
5794+
}
57835795
}
57845796
}
57855797

0 commit comments

Comments
 (0)