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
2 files changed