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

Commit 87389e8f authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Add @SystemApi(MODULE_LIBS) mainline stub in runtime

- It turned out the stub jar we use doesn't contain
MODULE_LIBS APIs.

- There's another jar containing that, so add that to classpath.

- However, the new one doesn't contain libcore APIs, so we still
need to keep the original jar.

- The new jar need to come before the original one, but unfortunately
CleanSpec.mk may not be working now, so instead of renaming the existing
one, let's give this weird name to the new one.

Fix: 416335279
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s
Test: manual test looking at the newly added jar
Flag: EXEMPT host test change only
Change-Id: I10986d5e20dd4efd0d2d2568c0847fc9f7efd025
parent 8245ed27
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -29,3 +29,10 @@ java_library {
    static_libs: ["all-updatable-modules-system-stubs"],
    visibility: ["//frameworks/base/ravenwood"],
}

java_library {
    name: "framework-updatable-stubs-module_libs_api-for-host",
    installable: false,
    static_libs: ["framework-updatable-stubs-module_libs_api"],
    visibility: ["//frameworks/base/ravenwood"],
}
+27 −1
Original line number Diff line number Diff line
@@ -655,6 +655,13 @@ java_library {
    visibility: ["//visibility:private"],
}

java_library {
    name: "z00-50-framework-updatable-stubs-module_libs_api",
    installable: false,
    static_libs: ["framework-updatable-stubs-module_libs_api-for-host"],
    visibility: ["//visibility:private"],
}

java_library {
    name: "z00-all-updatable-modules-system-stubs",
    installable: false,
@@ -706,7 +713,26 @@ android_ravenwood_libgroup {
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",

        // It's a stub, so it should be towards the end.
        // Below are the mainline API stubs. We put them after the test jar in the
        // classpath so that the test jar can include its own, non-stub version
        // of mainline classes.

        // System API stubs including @SystemApi(MODULE_LIBRARIES),
        // but it doesn't contain libcore APIs, which are included in
        // all-updatable-modules-system-stubs.
        //
        // We want this one before z00-all-updatable-modules-system-stubs
        // in the alphabetical order, but unfortunately CleanSpec.mk may
        // not be working now, so we can't rename it.
        // So for now, let's just use this ugly name...
        "z00-50-framework-updatable-stubs-module_libs_api",

        // System API stubs from all mainline modules, including ART,
        // so it contains classes in libcore (including libcore.*, dalvik.*,
        // android.system.*, java.*, org.xml, ...)
        // (It doesn't contain @SystemApi(MODULE_LIBRARIES) APIs, which are
        // covered in framework-updatable-stubs-module_libs_api. Libcore
        // doesn't have MODULE_LIBRARIES APIs.)
        "z00-all-updatable-modules-system-stubs",
    ],
    jni_libs: [