am 16678ac6: Merge "Fixed upgrading from forward-lock application to system application"

* commit '16678ac66f7e6d5ce414536b7534d1e823f7ab30':
  Fixed upgrading from forward-lock application to system application
This commit is contained in:
Christopher Tate
2014-02-27 14:06:32 -08:00
committed by Android Git Automerger

View File

@@ -3674,6 +3674,7 @@ public class PackageManagerService extends IPackageManager.Stub {
updatedPkg = mSettings.getDisabledSystemPkgLPr(ps != null ? ps.name : pkg.packageName);
if (DEBUG_INSTALL && updatedPkg != null) Slog.d(TAG, "updatedPkg = " + updatedPkg);
}
boolean updatedPkgBetter = false;
// First check if this is a system package that may involve an update
if (updatedPkg != null && (parseFlags&PackageParser.PARSE_IS_SYSTEM) != 0) {
if (ps != null && !ps.codePath.equals(scanFile)) {
@@ -3728,6 +3729,7 @@ public class PackageManagerService extends IPackageManager.Stub {
synchronized (mPackages) {
mSettings.enableSystemPackageLPw(ps.name);
}
updatedPkgBetter = true;
}
}
}
@@ -3804,7 +3806,7 @@ public class PackageManagerService extends IPackageManager.Stub {
String codePath = null;
String resPath = null;
if ((parseFlags & PackageParser.PARSE_FORWARD_LOCK) != 0) {
if ((parseFlags & PackageParser.PARSE_FORWARD_LOCK) != 0 && !updatedPkgBetter) {
if (ps != null && ps.resourcePathString != null) {
resPath = ps.resourcePathString;
} else {