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
diff --git a/core/main.mk b/core/main.mk
index fd02a83..5767ef4 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1745,9 +1745,9 @@
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):