From c1d07d9bebe487f8881f51f989a299b3c3c6d4fa Mon Sep 17 00:00:00 2001 From: Suchi Amalapurapu Date: Wed, 5 May 2010 13:37:12 -0700 Subject: Fix 2656989. Clean up update to updated system applications. Change-Id: Ic66b00926c45fac43396f1f8f23d0865ba77faba --- services/java/com/android/server/PackageManagerService.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'services') diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index ba326d6..b9204c7 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -5780,6 +5780,18 @@ class PackageManagerService extends IPackageManager.Stub { } mSettings.writeLP(); } + } else { + // If this is an update to an existing update, setup + // to remove the existing update. + synchronized (mPackages) { + PackageSetting ps = mSettings.getDisabledSystemPkg(packageName); + if (ps != null && ps.codePathString != null && + !ps.codePathString.equals(oldPkgSetting.codePathString)) { + int installFlags = 0; + res.removedInfo.args = createInstallArgs(0, oldPkgSetting.codePathString, + oldPkgSetting.resourcePathString); + } + } } } -- cgit v1.1