OSDN Git Service

PackageSettingBase needs to copy volume UUID.
authorJeff Sharkey <jsharkey@android.com>
Sat, 31 Oct 2015 20:58:54 +0000 (13:58 -0700)
committerThe Android Automerger <android-build@google.com>
Mon, 2 Nov 2015 21:21:07 +0000 (13:21 -0800)
When copying all fields from one PackageSettingBase to another, we
also need to copy volumeUuid, which had previously been missed.

Without this, packages using sharedUserId that are installed on
adopted storage devices will be destroyed, since after reboot we
think they actually belong on internal storage (where volumeUuid is
null).

Bug: 25334169
Change-Id: I223361bd1e19e7d5dd78626682ac7c5cbecb9fa1

services/core/java/com/android/server/pm/PackageSettingBase.java

index bbdfe31..78328f5 100644 (file)
@@ -239,6 +239,7 @@ abstract class PackageSettingBase extends SettingBase {
         keySetData = base.keySetData;
         verificationInfo = base.verificationInfo;
         installerPackageName = base.installerPackageName;
+        volumeUuid = base.volumeUuid;
     }
 
     private PackageUserState modifyUserState(int userId) {