From b24a96701a2724bf69c5a34bd70a1bc7177ef0f2 Mon Sep 17 00:00:00 2001 From: Suchi Amalapurapu Date: Wed, 1 Jul 2009 14:04:43 -0700 Subject: [PATCH] Remove the constraint to assign new uid when code path changes for system packages --- .../android/server/PackageManagerService.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index 4ea28310aa72c..b42cedc4bb1b4 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -5805,24 +5805,15 @@ class PackageManagerService extends IPackageManager.Stub { // Check to see if its a disabled system app PackageSetting ps = mDisabledSysPackages.get(name); if((ps != null) && ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0)) { - // Could be a replaced system package - // Note that if the user replaced a system app, the user has to physically - // delete the new one in order to revert to the system app. So even - // if the user updated the system app via an update, the user still - // has to delete the one installed in the data partition in order to pick up the - // new system package. + // This is an updated system app with versions in both system + // and data partition. Just let the most recent version + // take precedence. return p; - } else if ((p.pkg != null) && (p.pkg.applicationInfo != null) && - ((p.pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0)) { - // Check for non-system apps + } else if ((p.pkg != null) && (p.pkg.applicationInfo != null)) { + // Let the app continue with previous uid if code path changes. reportSettingsProblem(Log.WARN, "Package " + name + " codePath changed from " + p.codePath + " to " + codePath + "; Retaining data and using new code"); - } else { - reportSettingsProblem(Log.WARN, - "Package " + name + " codePath changed from " + p.codePath - + " to " + codePath + "; replacing with new"); - p = null; } } else if (p.sharedUser != sharedUser) { reportSettingsProblem(Log.WARN,