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

Commit 27022ac8 authored by Yifan Hong's avatar Yifan Hong
Browse files

vintf: delete deprecated VintfObject.verify.

It is not used anywhere.

Test: TH
Bug: 270169217
Change-Id: Ifcc8412ed3629d2447908513faf1d6f5ed3f483c
parent de8baa8a
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.os;

import android.annotation.NonNull;
import android.annotation.TestApi;
import android.util.Slog;

import java.util.Map;

@@ -43,41 +42,6 @@ public class VintfObject {
    @TestApi
    public static native String[] report();

    /**
     * Verify that the given metadata for an OTA package is compatible with
     * this device.
     *
     * @param packageInfo a list of serialized form of HalManifest's /
     * CompatibilityMatri'ces (XML).
     * @return = 0 if success (compatible)
     *         > 0 if incompatible
     *         < 0 if any error (mount partition fails, illformed XML, etc.)
     *
     * @deprecated Checking compatibility against an OTA package is no longer
     * supported because the format of VINTF metadata in the OTA package may not
     * be recognized by the current system.
     *
     * <p>
     * <ul>
     * <li>This function always returns 0 for non-empty {@code packageInfo}.
     * </li>
     * <li>This function returns the result of {@link #verifyWithoutAvb} for
     * null or empty {@code packageInfo}.</li>
     * </ul>
     *
     * @hide
     */
    @Deprecated
    public static int verify(String[] packageInfo) {
        if (packageInfo != null && packageInfo.length > 0) {
            Slog.w(LOG_TAG, "VintfObject.verify() with non-empty packageInfo is deprecated. "
                    + "Skipping compatibility checks for update package.");
            return 0;
        }
        Slog.w(LOG_TAG, "VintfObject.verify() is deprecated. Call verifyWithoutAvb() instead.");
        return verifyWithoutAvb();
    }

    /**
     * Verify Vintf compatibility on the device without checking AVB
     * (Android Verified Boot). It is useful to verify a running system