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

Commit 6485e6d0 authored by Yan Yan's avatar Yan Yan
Browse files

Use the new vendor API format

Starting with Android V, the vendor API format has switched
to YYYYMM instead of using the SDK version

Bug: 330583731
Test: Presubmit
Change-Id: I32c8ac40547e24f64ee8820d18e334a96833eed5
parent 71e98529
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1232,6 +1232,18 @@ public class Build {
        public static final int VANILLA_ICE_CREAM = 35;
    }

    /**
     * The vendor API for 2024 Q2
     *
     * <p>For Android 14-QPR3 and later, the vendor API level is completely decoupled from the SDK
     * API level and the format has switched to YYYYMM (year and month)
     *
     * @see <a href="https://preview.source.android.com/docs/core/architecture/api-flags">Vendor API
     *     level</a>
     * @hide
     */
    public static final int VENDOR_API_2024_Q2 = 202404;

    /** The type of build, like "user" or "eng". */
    public static final String TYPE = getString("ro.build.type");

+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class TelephonyFrameworkInitializer {
        // Check SDK version of the vendor partition.
        final int vendorApiLevel = SystemProperties.getInt(
                "ro.vendor.api_level", Build.VERSION.DEVICE_INITIAL_SDK_INT);
        if (vendorApiLevel < Build.VERSION_CODES.VANILLA_ICE_CREAM) return true;
        if (vendorApiLevel < Build.VENDOR_API_2024_Q2) return true;

        // Check SDK version of the client app.
        if (!Compatibility.isChangeEnabled(ENABLE_CHECKING_TELEPHONY_FEATURES)) return true;