diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-04-05 14:33:01 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-04-05 18:37:57 -0700 |
commit | 6e52b5d76850ee60bbef2f3d8a2e47bd589e28e8 (patch) | |
tree | a09c600edeea1ef96e388eca20029169186e34c2 /services | |
parent | 01f6b75baa3b9144240fa8c9772859ab4ac948bd (diff) | |
download | frameworks_base-6e52b5d76850ee60bbef2f3d8a2e47bd589e28e8.zip frameworks_base-6e52b5d76850ee60bbef2f3d8a2e47bd589e28e8.tar.gz frameworks_base-6e52b5d76850ee60bbef2f3d8a2e47bd589e28e8.tar.bz2 |
2568467 System crash when installing corrupt APK
Also fix another crash I just saw in the package manager, when a
permission got left around from a previous install but as no
longer defined.
Change-Id: I33b87420f0c59e24b8b77fab8b0316461d99e048
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/PackageManagerService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index b95bae4..b1bd263 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -4006,6 +4006,9 @@ class PackageManagerService extends IPackageManager.Stub { if (bp.protectionLevel == PermissionInfo.PROTECTION_NORMAL || bp.protectionLevel == PermissionInfo.PROTECTION_DANGEROUS) { allowed = true; + } else if (bp.packageSetting == null) { + // This permission is invalid; skip it. + allowed = false; } else if (bp.protectionLevel == PermissionInfo.PROTECTION_SIGNATURE || bp.protectionLevel == PermissionInfo.PROTECTION_SIGNATURE_OR_SYSTEM) { allowed = (checkSignaturesLP(bp.packageSetting.signatures.mSignatures, pkg.mSignatures) |