diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-03-31 16:52:11 -0700 |
---|---|---|
committer | Svet Ganov <svetoslavganov@google.com> | 2015-03-31 16:52:49 -0700 |
commit | 37f05184b5641366b59c540ad6bf3e3b2a1ac6ea (patch) | |
tree | 2bbf5b61347c209d746adc70dea5304e260e4f24 /services | |
parent | 0b037e93fce761f923330432f51aba40f9a316c8 (diff) | |
download | frameworks_base-37f05184b5641366b59c540ad6bf3e3b2a1ac6ea.zip frameworks_base-37f05184b5641366b59c540ad6bf3e3b2a1ac6ea.tar.gz frameworks_base-37f05184b5641366b59c540ad6bf3e3b2a1ac6ea.tar.bz2 |
Fix clobbered shared user install permissions.
The install permissions for a shared user were clobbered when a pending
package for this user was matched to the shared user after reading the
state from XML. The reason was that the copy code in PackageSettingBase was
using the getter to get its settings state to which to copy the permissions
for the pending package but this is the permissions state for the shared
user instead of the package. Since the pending package has no permissions
we ended up clobbering the permissions for the shared user.
bug:19955926
Change-Id: Ia8d090883d50fc987a32ceeed6c7562c49698328
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageSettingBase.java | 2 | ||||
-rw-r--r-- | services/core/java/com/android/server/pm/SettingBase.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/pm/PackageSettingBase.java b/services/core/java/com/android/server/pm/PackageSettingBase.java index 20120de..daa6d64 100644 --- a/services/core/java/com/android/server/pm/PackageSettingBase.java +++ b/services/core/java/com/android/server/pm/PackageSettingBase.java @@ -204,7 +204,7 @@ abstract class PackageSettingBase extends SettingBase { */ public void copyFrom(PackageSettingBase base) { setPermissionsUpdatedForUserIds(base.getPermissionsUpdatedForUserIds()); - getPermissionsState().copyFrom(base.getPermissionsState()); + mPermissionsState.copyFrom(base.mPermissionsState); primaryCpuAbiString = base.primaryCpuAbiString; secondaryCpuAbiString = base.secondaryCpuAbiString; cpuAbiOverrideString = base.cpuAbiOverrideString; diff --git a/services/core/java/com/android/server/pm/SettingBase.java b/services/core/java/com/android/server/pm/SettingBase.java index 3a7b6ee..0c7f79d 100644 --- a/services/core/java/com/android/server/pm/SettingBase.java +++ b/services/core/java/com/android/server/pm/SettingBase.java @@ -24,7 +24,7 @@ abstract class SettingBase { int pkgFlags; int pkgPrivateFlags; - private final PermissionsState mPermissionsState; + protected final PermissionsState mPermissionsState; private int[] mPermissionsUpdatedForUserIds = PermissionsState.USERS_NONE; SettingBase(int pkgFlags, int pkgPrivateFlags) { |