Need to keep new package's cert when using original-package.

Fixes bug #2504353: Lost all widgets and shortcuts after upgrading form FRE68 to FRE69

Change-Id: I62bab66bbd90bf0956d1716bae1b6073d01e2d8a
This commit is contained in:
Dianne Hackborn
2010-03-11 16:20:08 -08:00
parent 26b1ef9583
commit 4b45041006

View File

@@ -7707,7 +7707,11 @@ class PackageManagerService extends IPackageManager.Stub {
resourcePath, vc, pkgFlags);
if (DEBUG_UPGRADE) Log.v(TAG, "Package " + name
+ " is adopting original package " + origPackage.name);
// Note that we will retain the new package's signature so
// that we can keep its data.
PackageSignatures s = p.signatures;
p.copyFrom(origPackage);
p.signatures = s;
p.sharedUser = origPackage.sharedUser;
p.userId = origPackage.userId;
p.origPackage = origPackage;