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

Commit 719161ad authored by Priyanka Advani's avatar Priyanka Advani Committed by Android (Google) Code Review
Browse files

Revert "Deprecate API: isAppSourceCertificateTrusted"

Revert submission 24590927-deprecate_fsv_sig

Reason for revert: b/299494922

Reverted changes: /q/submissionid:24590927-deprecate_fsv_sig

Change-Id: Icda4ecbb0b33f0fb991cf4930d45a38975de0845
parent 07ee8ed0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39353,7 +39353,7 @@ package android.security {
  public final class FileIntegrityManager {
    method @FlaggedApi(Flags.FLAG_FSVERITY_API) @Nullable public byte[] getFsVerityDigest(@NonNull java.io.File) throws java.io.IOException;
    method public boolean isApkVeritySupported();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public boolean isAppSourceCertificateTrusted(@NonNull java.security.cert.X509Certificate) throws java.security.cert.CertificateEncodingException;
    method @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public boolean isAppSourceCertificateTrusted(@NonNull java.security.cert.X509Certificate) throws java.security.cert.CertificateEncodingException;
    method @FlaggedApi(Flags.FLAG_FSVERITY_API) public void setupFsVerity(@NonNull java.io.File) throws java.io.IOException;
  }
+0 −2
Original line number Diff line number Diff line
@@ -133,13 +133,11 @@ public final class FileIntegrityManager {
     * also use this API to download the best signature on the running device.
     *
     * @return whether the certificate is trusted in the system
     * @deprecated The feature is no longer supported, and this API now always returns false.
     */
    @RequiresPermission(anyOf = {
            android.Manifest.permission.INSTALL_PACKAGES,
            android.Manifest.permission.REQUEST_INSTALL_PACKAGES
    })
    @Deprecated
    public boolean isAppSourceCertificateTrusted(@NonNull X509Certificate certificate)
            throws CertificateEncodingException {
        try {
+0 −1
Original line number Diff line number Diff line
@@ -180,7 +180,6 @@ java_library_static {
        "android.hardware.rebootescrow-V1-java",
        "android.hardware.power.stats-V2-java",
        "android.hidl.manager-V1.2-java",
        "com.android.server.security.flags-aconfig-java",
        "cbor-java",
        "display_flags_lib",
        "icu4j_calendar_astronomer",
+0 −7
Original line number Diff line number Diff line
@@ -90,13 +90,6 @@ public class FileIntegrityService extends SystemService {
                @NonNull String packageName) {
            checkCallerPermission(packageName);

            if (Flags.deprecateFsvSig()) {
                // When deprecated, stop telling the caller that any app source certificate is
                // trusted on the current device. This behavior is also consistent with devices
                // without this feature support.
                return false;
            }

            try {
                if (!VerityUtils.isFsVeritySupported()) {
                    return false;