Merge "Create new instance of shared lineage signers to preserve capabilities" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
71f64ff1ac
@@ -174,7 +174,16 @@ class PackageSignatures {
|
|||||||
if (index >= 0 && index < readSignatures.size()) {
|
if (index >= 0 && index < readSignatures.size()) {
|
||||||
Signature sig = readSignatures.get(index);
|
Signature sig = readSignatures.get(index);
|
||||||
if (sig != null) {
|
if (sig != null) {
|
||||||
|
// An app using a shared signature in its signing lineage
|
||||||
|
// can have unique capabilities assigned to this previous
|
||||||
|
// signer; create a new instance of this Signature to ensure
|
||||||
|
// its flags do not overwrite those of the instance from
|
||||||
|
// readSignatures.
|
||||||
|
if (isPastSigs) {
|
||||||
|
signatures.add(new Signature(sig));
|
||||||
|
} else {
|
||||||
signatures.add(sig);
|
signatures.add(sig);
|
||||||
|
}
|
||||||
signatureParsed = true;
|
signatureParsed = true;
|
||||||
} else {
|
} else {
|
||||||
PackageManagerService.reportSettingsProblem(Log.WARN,
|
PackageManagerService.reportSettingsProblem(Log.WARN,
|
||||||
|
|||||||
Reference in New Issue
Block a user