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

Commit 70e02d42 authored by Ryan Mitchell's avatar Ryan Mitchell
Browse files

Fix <overlay-config-signature> comments

Fix comments that refer to <overlay-config-signature> as
<config-signature>.

Bug: none
Test: build
Change-Id: I1d3e5e66ec3da993082f3441997b0d243d61520b
parent 7d0ccc13
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -71,9 +71,9 @@ Result<Unit> CheckOverlayable(const LoadedPackage& target_package,
  if (!target_package.DefinesOverlayable()) {
  if (!target_package.DefinesOverlayable()) {
    return (sDefaultPolicies & fulfilled_policies) != 0
    return (sDefaultPolicies & fulfilled_policies) != 0
               ? Result<Unit>({})
               ? Result<Unit>({})
               : Error(
               : Error("overlay must be preinstalled, signed with the same signature as the target,"
                     "overlay must be preinstalled or signed with the same signature as the "
                       " or signed with the same signature as the package referenced through"
                     "target");
                       " <overlay-config-signature>.");
  }
  }


  const OverlayableInfo* overlayable_info = target_package.GetOverlayableInfo(target_resource);
  const OverlayableInfo* overlayable_info = target_package.GetOverlayableInfo(target_resource);
+1 −1
Original line number Original line Diff line number Diff line
@@ -243,7 +243,7 @@ public class SystemConfig {
    // partition that is used to verify if an overlay package fulfills
    // partition that is used to verify if an overlay package fulfills
    // the 'config_signature' policy by comparing their signatures:
    // the 'config_signature' policy by comparing their signatures:
    // if the overlay package is signed with the same certificate as
    // if the overlay package is signed with the same certificate as
    // the package declared in 'config-signature' tag, then the
    // the package declared in 'overlay-config-signature' tag, then the
    // overlay package fulfills the 'config_signature' policy.
    // overlay package fulfills the 'config_signature' policy.
    private String mOverlayConfigSignaturePackage;
    private String mOverlayConfigSignaturePackage;


+2 −2
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ final class IdmapManager {
    private final PackageManagerHelper mPackageManager;
    private final PackageManagerHelper mPackageManager;


    /**
    /**
     * Package name of the reference package defined in 'config-signature' tag of
     * Package name of the reference package defined in 'overlay-config-signature' tag of
     * SystemConfig or empty String if tag not defined. This package is vetted on scan by
     * SystemConfig or empty String if tag not defined. This package is vetted on scan by
     * PackageManagerService that it's a system package and is used to check if overlay matches
     * PackageManagerService that it's a system package and is used to check if overlay matches
     * its signature in order to fulfill the config_signature policy.
     * its signature in order to fulfill the config_signature policy.
@@ -159,7 +159,7 @@ final class IdmapManager {
            fulfilledPolicies |= OverlayablePolicy.ACTOR_SIGNATURE;
            fulfilledPolicies |= OverlayablePolicy.ACTOR_SIGNATURE;
        }
        }


        // If SystemConfig defines 'config-signature' package, given that
        // If SystemConfig defines 'overlay-config-signature' package, given that
        // this package is vetted by OverlayManagerService that it's a
        // this package is vetted by OverlayManagerService that it's a
        // preinstalled package, check if overlay matches its signature.
        // preinstalled package, check if overlay matches its signature.
        if (!TextUtils.isEmpty(mConfigSignaturePackage)
        if (!TextUtils.isEmpty(mConfigSignaturePackage)
+4 −3
Original line number Original line Diff line number Diff line
@@ -12161,9 +12161,10 @@ public class PackageManagerService extends IPackageManager.Stub
                    // A non-preloaded overlay package, without <overlay android:targetName>, will
                    // A non-preloaded overlay package, without <overlay android:targetName>, will
                    // only be used if it is signed with the same certificate as its target OR if
                    // only be used if it is signed with the same certificate as its target OR if
                    // it is signed with the same certificate as a reference package declared
                    // it is signed with the same certificate as a reference package declared
                    // in 'config-signature' tag of SystemConfig.
                    // in 'overlay-config-signature' tag of SystemConfig.
                    // If the target is already installed or 'config-signature' tag in SystemConfig
                    // If the target is already installed or 'overlay-config-signature' tag in
                    // is set, check this here to augment the last line of defence which is OMS.
                    // SystemConfig is set, check this here to augment the last line of defense
                    // which is OMS.
                    if (pkg.getOverlayTargetName() == null) {
                    if (pkg.getOverlayTargetName() == null) {
                        final PackageSetting targetPkgSetting =
                        final PackageSetting targetPkgSetting =
                                mSettings.getPackageLPr(pkg.getOverlayTarget());
                                mSettings.getPackageLPr(pkg.getOverlayTarget());