Different bootclasspath for droiddoc.

- If it's host module, don't set bootclasspath;
- If it's arget module,
  - It can build against the API stubs;
  - It can build against a historical SDK version;
  - It can build against core.jar

Change-Id: Id1ec3ba624bc38068b206ad7173f4facf590e021
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 41bd1d9..fb54ff2 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -51,20 +51,22 @@
 LOCAL_DROIDDOC_CUSTOM_ASSET_DIR := assets
 endif
 
-
-$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, core)
-
-ifneq ($(LOCAL_IS_HOST_MODULE),true)
+ifeq ($(LOCAL_IS_HOST_MODULE),true)
+$(full_target): PRIVATE_BOOTCLASSPATH :=
+else
 
 ifneq ($(LOCAL_SDK_VERSION),)
   ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
     # Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
     LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
+    $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, android_stubs_current)
   else
     LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
+    $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION))
   endif
 else
   LOCAL_JAVA_LIBRARIES := core ext framework framework2 $(LOCAL_JAVA_LIBRARIES)
+  $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, core)
 endif  # LOCAL_SDK_VERSION
 LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))