From 743c9c3b6b27e583467e3efe803c8864d1aaef21 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Mon, 9 Dec 2019 16:36:15 -0800 Subject: [PATCH] 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 --- core/main.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/main.mk b/core/main.mk index fd02a8320d..5767ef4912 100644 --- a/core/main.mk +++ b/core/main.mk @@ -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):