Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit caa17bb2 authored by Michael Groover's avatar Michael Groover Committed by Automerger Merge Worker
Browse files

Merge "Create new instance of shared lineage signers to preserve capabilities"...

Merge "Create new instance of shared lineage signers to preserve capabilities" into sc-dev am: 71f64ff1 am: a13fd1a4 am: 7fae0273

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15508291

Change-Id: I782c246185387e420616d046deb8699710d00b73
parents 153c4814 7fae0273
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -174,7 +174,16 @@ class PackageSignatures {
                                if (index >= 0 && index < readSignatures.size()) {
                                    Signature sig = readSignatures.get(index);
                                    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);
                                        }
                                        signatureParsed = true;
                                    } else {
                                        PackageManagerService.reportSettingsProblem(Log.WARN,