enable PDK to use platform JAVA API

- make platform-java will add necessary Java stuffs from out/target/common/
  to platform.zip
- make platform works as before: no Java libraries
- normal fusion build will pick up the file, and define TARGET_BUILD_PDK_JAVA
  besides TARGET_BUILD_PDK if Java stuffs are included
- For TARGET_BUILD_PDK_JAVA, java.mk does not touch LOCAL_SDK_VERSION, which will lead into
  pulling non-SDK Java APIs

Bug: 6482799

Change-Id: I90b1a0b06dc774150711680a6612f2b97b9eab3f
diff --git a/core/java.mk b/core/java.mk
index 7e4af79..2b6851b 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -4,10 +4,12 @@
 # all_res_assets
 
 ifeq ($(TARGET_BUILD_PDK),true)
+ifeq ($(TARGET_BUILD_PDK_JAVA),)
 # LOCAL_SDK not defined or set to current
 ifeq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
 LOCAL_SDK_VERSION := $(PDK_BUILD_SDK_VERSION)
 endif
+endif # !PDK_JAVA
 endif #PDK