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

Commit 4e86dcad authored by Anton Hansson's avatar Anton Hansson
Browse files

Inline two constants from CorePlatform

Inlining these constants allow the public api metalava run to depend on
ART's public API rather than the "internal" CorePlatform API, which
prevents picking up unintentional classes (such as annotations) from the
CorePlatform API in the public stubs.

Because these constants get inlined in the API/stubs, and the constants
have been finalized for many years, they can never change. Because they
cannot change, reusing the constant is of limited value. I've added
some comments to point readers to other places the constant is used.

Bug: 154796679
Test: m checkapi
Change-Id: I0b347a2964cfe5a1206145fdc56934727b890469
parent c7f5e7d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -522,7 +522,7 @@ stubs_defaults {
        "android.hardware.usb.gadget-V1.0-java",
        "android.hardware.vibrator-V1.3-java",
        "framework-protos",
        "stable.core.platform.api.stubs",
        "art.module.public.api",
        // There are a few classes from modules used by the core that
        // need to be resolved by metalava. We use a prebuilt stub of the
        // full sdk to ensure we can resolve them. If a new class gets added,
+2 −1
Original line number Diff line number Diff line
@@ -424,7 +424,8 @@ public class Build {
         * Magic version number for a current development build, which has
         * not yet turned into an official release.
         */
        public static final int CUR_DEVELOPMENT = VMRuntime.SDK_VERSION_CUR_DEVELOPMENT;
        // This must match VMRuntime.SDK_VERSION_CUR_DEVELOPMENT.
        public static final int CUR_DEVELOPMENT = 10000;

        /**
         * October 2008: The original, first, version of Android.  Yay!
+2 −1
Original line number Diff line number Diff line
@@ -74,8 +74,9 @@ public final class Debug
     *
     * @deprecated Accurate counting is a burden on the runtime and may be removed.
     */
    // This must match VMDebug.TRACE_COUNT_ALLOCS.
    @Deprecated
    public static final int TRACE_COUNT_ALLOCS  = VMDebug.TRACE_COUNT_ALLOCS;
    public static final int TRACE_COUNT_ALLOCS  = 1;

    /**
     * Flags for printLoadedClasses().  Default behavior is to only show