diff options
| author | Yifan Hong <elsk@google.com> | 2019-12-19 18:56:13 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-12-19 18:56:13 +0000 |
| commit | bdc465991f838e063aa779b29c7796afc60d9df1 (patch) | |
| tree | 236048980cdf881ce76bd10c155e98a837dcf9ee /core/java | |
| parent | 63bf3e4d989797f54f2199f32b22a7e0ef691efb (diff) | |
| parent | 12ebf362b45d906fca55017c9d06bd6a676f6629 (diff) | |
Merge "Delete VINTF compatibility checks during OTA."
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/VintfObject.java | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/core/java/android/os/VintfObject.java b/core/java/android/os/VintfObject.java index 1c78b081120a..7af8f71aa4aa 100644 --- a/core/java/android/os/VintfObject.java +++ b/core/java/android/os/VintfObject.java @@ -17,6 +17,7 @@ package android.os; import android.annotation.TestApi; +import android.util.Slog; import java.util.Map; @@ -28,6 +29,8 @@ import java.util.Map; @TestApi public class VintfObject { + private static final String LOG_TAG = "VintfObject"; + /** * Slurps all device information (both manifests and both matrices) * and report them. @@ -46,12 +49,33 @@ public class VintfObject { * @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.) + * > 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 */ - public static native int verify(String[] packageInfo); + @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 |
