Move to using full java-lib-files from stubs.

java-lib-header-files (turbine) differ from java-lib-files (actual metalava
output) in how the private constructors are showing up in these jars.

in classes.jar android/telephony/AccessNetworkConstants.class
package android.telephony;

public final class AccessNetworkConstants {
    private AccessNetworkConstants() {
        throw new RuntimeException("Stub!");
    }
}

in classes-header.jar android/telephony/AccessNetworkConstants.class
package android.telephony;

public final class AccessNetworkConstants {
}

As you can see, turbine seems to skip adding the private constructor,
which means that it becomes public.

Bug: 145933077
Test: m out/target/common/obj/api.xml
      out/target/common/obj/api.xml -> no longer has public constructor
      for AccessNetworkConstants

Change-Id: Ie1763783667b41b9892c9c47e6b362d7962caf14
This commit is contained in:
Aurimas Liutikas 2019-12-09 16:36:15 -08:00
parent 1b9fd38513
commit 743c9c3b6b

View file

@ -1745,9 +1745,9 @@ else # TARGET_BUILD_APPS
endif
# Put XML formatted API files in the dist dir.
$(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml: $(call java-lib-header-files,android_stubs_current) $(APICHECK)
$(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml: $(call java-lib-header-files,android_system_stubs_current) $(APICHECK)
$(TARGET_OUT_COMMON_INTERMEDIATES)/test-api.xml: $(call java-lib-header-files,android_test_stubs_current) $(APICHECK)
$(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml: $(call java-lib-files,android_stubs_current) $(APICHECK)
$(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml: $(call java-lib-files,android_system_stubs_current) $(APICHECK)
$(TARGET_OUT_COMMON_INTERMEDIATES)/test-api.xml: $(call java-lib-files,android_test_stubs_current) $(APICHECK)
api_xmls := $(addprefix $(TARGET_OUT_COMMON_INTERMEDIATES)/,api.xml system-api.xml test-api.xml)
$(api_xmls):